Converts macOS .textClipping files to plain text or HTML.
go install github.com/agent2x0r/tclip2@latestOr build from source:
go build -o tclip2 .tclip2 [-html] [-txt] [-out dir] file.textClipping [...]
-txt— output plain text (default)-html— output HTML-out dir— write output todirinstead of the source file's directory
.textClipping files can store text in two ways:
- Data fork — a binary plist containing a
UTI-Datadictionary with typed entries (public.utf8-plain-text,public.html, etc.). This is the modern format. - Resource fork — Mac resource fork with
TEXT,utf8,HTML, orutxtresources. This is the legacy format.
tclip2 tries the data fork first, then falls back to the resource fork.
MIT