CPTSVG(1)

πŸ“¦ version 1.82, in fedora 43, fedora 44

πŸ’– 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-file path β€” 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-format format β€” specify the format of the backtrace written to the files specified by --backtrace-file, one of plain, xml or json.
  • --comments-read path β€” 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-write path β€” 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 the cptutils package) in the output file. receipts, but make it metadata. 🧾
  • -g, --geometry widthxheight β€” 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 a SOFT_HINGE directive, 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, --output path β€” write the output to path, rather than stdout.
  • -p, --preview β€” include a preview in the SVG output. see also the --geometry option. 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. -v for the running commentary, -o foo.svg for the destination, foo.cpt for 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