This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let UnionToString (u: 'a) = | |
| match FSharpValue.GetUnionFields(u, typeof<'a>) with | |
| | case, _ -> case.Name | |
| let StringToUnion<'a> (s: string) = | |
| match FSharpType.GetUnionCases typeof<'a> |> Array.filter (fun case -> case.Name = s) with | |
| | [| case |] -> FSharpValue.MakeUnion(case, [||]) :?> 'a | |
| | _ -> failwithf "Unable to parse %A" s | |
| type UnionStringSerializer<'a>() = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Migrate GPaste history to CopyQ. | |
| Reads GPaste history format (UUID: content with multiline support) | |
| and imports each entry into CopyQ using its CLI. | |
| """ | |
| import subprocess | |
| import re | |
| import sys |
OlderNewer