CPTUPDATE(1)

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

πŸ’– CPTUPDATE β€” the glow-up your colour palette table has been waiting for πŸ’–

okay bestie, so this is the cptupdate manual page, from the User commands section of the manual, and I'm about to make it make sense. grab a strawberry πŸ“, sit down, we're doing this.


✨ NAME ✨

cptupdate β€” create a GMT colour palette table (cpt) file with a different version to the input. it's giving "same palette, new era". πŸ’…


✨ SYNOPSIS ✨

cptupdate [-h] [-H] [-m model] [-o path] [-S] [-v] [-V] [-z] [-Z] [-4]
          [-5] [-6] [path]

✨ DESCRIPTION ✨

so basically, the cptupdate program updates the colour palette in the input to a more recent (or older) version, and if you want, it can also add/remove features to the input while it's at it. lowkey a makeover AND a time machine. πŸ•°οΈβœ¨

and here's the iconic part: the program reads any version of the format, so you can also use it to add hinges, or normalise/denormalise version 6 input, or even convert to versions 5 or 4. no gatekeeping, every version is welcome at this party. πŸŽ€

if you don't specify a file as the final argument, the program will read from stdin. and if you don't give it the --output option, it writes to stdout. classic. 🌈


✨ OPTIONS ✨

okay here's the full menu, no skips, no crumbs left behind:

  • --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's the receipts file, but only for when things go wrong. πŸ’€
  • --backtrace-format format β€” specify the format of the backtrace written to the files specified by --backtrace-file, one of plain, xml or json. pick your aesthetic.
  • --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). so you bring the words, it brings the little # decorations. πŸŽ€
  • --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. same energy, carried forward. 🫢
  • --comments-generate β€” create a comment with summary data (the date of creation, name and version of the cptutils package) in the output file. it writes its own lil autograph ✨
  • -h, --help β€” brief help. just a lil summary, not the whole saga.
  • -H, --hinge-hard β€” adds a HARD_HINGE to the ouput provided the output version is at least 6. (no hinge, no glory, and it's a v6+ only situation, sorry.)
  • -m, --model model β€” on writing the output, convert all colours to the specified model, one of "rgb" or "hsv". this has no effect on non-colour segments. know the difference bestie.
  • -o, --output path β€” write the output to path, rather than stdout.
  • -S, --hinge-soft β€” adds a SOFT_HINGE to the ouput provided the output version is at least 6. soft launch of a hinge, literally. πŸ™ˆ
  • -v, --verbose β€” verbose operation. it will yap (helpfully).
  • -V, --version β€” version information.
  • -z, --z-normalise β€” normalise the z-values in the cpt output into the range 0/1 (or to -1/1 if a hinge is present) and add a RANGE directive if not present in the input. this is the form used in GMT master files.
⚠️ this option requires that output cpt version is at least 5. no v5, no normalising, periodt.
  • -Z, --z-denormalise β€” set the z-values in the cpt output into the range given by the RANGE directive, and remove that directive. if there is no RANGE then this option does nothing. truly does nothing. it's just standing there. 🧍
  • -4, --gmt4 β€” use GMT 4 conventions when writing the cpt output: the colour-model code is uppercase, and the colours are separated by spaces. this option allows one to downgrade to version 4. if the input is normalised it will be denormalised, if the input has hinges, those will be removed. yeah, it's a full glow-<em>down</em>. πŸ’€
  • -5, --gmt5 β€” use GMT 5 conventions when writing the cpt output: the colour-model code is lowercase, and the colours are separated by a solidus for RGB, CMYK, by a dash for HSV. this option allows one to downgrade from version 6 (in which case hard/soft hinges will be converted to explicit hinges at zero) or upgrade from version 4. the middle child of versions, and honestly? it's thriving. πŸ’œ
  • -6, --gmt6 β€” as the -5 option, but allows the HARD_HINGE and SOFT_HINGE directives in place of the explicit HINGE = directive. this option is the default, so redundant (but one might wish to fix version 6 in anticipation later versions of the format). it's the default bestie. you don't have to say it, but you can. πŸ‘‘

✨ EXAMPLE ✨

say you want to update a version 4 cpt to version 6, adding a hard hinge and normalising the result, the typical format for a master file. the main character move is:

cptupdate -v -z -H -o new.cpt old.cpt

look at that. verbose, normalised, hinged, output to new.cpt, input from old.cpt. ate. πŸ”₯


✨ AUTHOR ✨

J.J. Green β€” the icon, the legend, the one who wrote this. πŸ‘‘


and that's the whole thing bestie, no notes. this page is from cptutils version 1.82, dated 9 July 2024, and it lives in the CPTUPDATE(1) section of the manual. go forth and update your palettes. mwah πŸ’‹πŸ’–πŸ¦‹

πŸ“¦ where this page comes from