CPTSVG(1)
π CPTSVG(1) π
okay bestie, sit down, hydrate, because we're about to talk about cptsvg β a lil User commands girly who converts GMT colour palette tables (cpt) into SVG gradients. she's giving utility, she's giving converter, she's lowkey iconic. π
β¨ NAME β¨
cptsvg β convert GMT colour palette tables (cpt) to SVG gradients. no cap, that's the whole job. π
πΈ SYNOPSIS πΈ
cptsvg [-g geometry] [-h] [-o path] [-p] [-v] [-V] [path]
π¦ DESCRIPTION π¦
okay so. the cptsvg utility converts the colour palette table (cpt) files used by GMT into the gradients in the Scalar Vector Graphics (SVG) format. literally glow-up energy for your colour ramps. π
the program will read from stdin if a file is not specified as the final argument, and write to stdout if the --output option is not specified. main character behaviour: if you don't tell her where to look, she just takes it from the stream. β¨
π OPTIONS π
--backtrace-filepath β specify a file to which to write a formatted backtrace. the file will only be created if there is a backtrace created, typically when an error occurs. so like, it only spawns when things go π.--backtrace-formatformat β specify the format of the backtrace written to the files specified by--backtrace-file, one ofplain,xmlorjson.--comments-readpath β read the comments from the specified path and add them to the output gradient.
the format is simply a plain text multi-line document without any comment delimiters (those will be added by the program). she handles the delimiters for you, bestie, you just write your lil thoughts. π
--comments-writepath β write the comments in the input to the specified path.--comments-retainβ use the comments in the input file as the comments for the output file.--comments-generateβ create a comment with summary data (the date of creation, name and version of thecptutilspackage) in the output file. receipts, but make it metadata. π§Ύ-g,--geometrywidthxheight β specify the size of the SVG preview in pixels.-h,--helpβ brief help. your girl explains herself, briefly.--hinge-activeβ if the input cpt has aSOFT_HINGEdirective, then activate that hinge (resulting in independent scaling of the two halves of the gradient either side of the hinge).
if the input does not have such a directive, then this option has no effect. so don't come for her if nothing happens, she warned you. π
-o,--outputpath β write the output to path, rather thanstdout.-p,--previewβ include a preview in the SVG output. see also the--geometryoption. they're a matched set, fr fr.-v,--verboseβ verbose operation. she will tell you everything she's doing. π£οΈ-V,--versionβ version information.
π EXAMPLE π
create an SVG file from CPT:
cptsvg -v -o foo.svg foo.cpt
that's it. one line.-vfor the running commentary,-o foo.svgfor the destination,foo.cptfor the source. ate and left no crumbs. π₯
π«Ά AUTHOR π«Ά
J.J. Green β the legend herself. π
and that's the whole page, bestie!! cptutils version 1.82, dated 9 July 2024. mwah, go convert something gorgeous. πβ¨π
π¦ where this page comes from
- fedora 43: cptutils 1.82-4.fc43 Β· GPL-2.0-or-later
- fedora 44: cptutils 1.82-6.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms