CONTEXTFREE(1)
π CONTEXTFREE(1) β the Context Free era π
okay bestie, sit down, hydrate, because we're about to talk about Context Free and its little command-line icon cfdg. she's giving generative art, she's giving grammar queen, she's lowkey the blueprint. π¦
β¨ NAME β¨
cfdg β image generator based on context-free grammars. periodt. πΈ
π SYNOPSIS π
cfdg [options] input.cfdg [output.png/svg/mov]
that's it. that's the whole vibe. π
π DESCRIPTION π
so Context Free is a whole system that makes images out of context-free grammars. it's giving math but make it art. and cfdg is the command-line program that actually generates the images (in PNG or SVG format, bestie) from that input.cfdg file where the grammars live. no cap.
and not me telling you that .cfdg files can also be animated?? they can!! the output can either be PNG files of individual frames or a QuickTime .mov file. your choice, main character.
if you put - instead of an input file, the grammar gets read from standard input. very demure, very mindful. π
the output filename can just be β¨left outβ¨ if you're using the -o/--outputtemplate option or the -C/--check option. and if you specify --display and there's no output file, the output gets saved in a temporary file instead.
β οΈ okay real talk, this is the important one: the output mode (PNG, SVG, or MOV) is NOT detected from the file extension you give it. it is not doing that. you have to explicitly set it with-V/--svgor-Q/--quicktime. do not come for me when your.svgcomes out as a PNG, bestie, I warned you. π
π OPTIONS π
every command-line option is a single letter with an optional argument, and longer "GNU-style" options exist too. here's the full summary of what cfdg supports, no skips, no cuts. π«Ά
-w WIDTH,--width=WIDTHβ sets the width of the output image, in pixels for PNG or millimeters for SVG. default is500. πΈ-h HEIGHT,--height=HEIGHTβ sets the height of the output image, in pixels for PNG or millimeters for SVG. default is500. πΈ-s SIZE,--size=SIZEβ sets both width and height of the output image to the same value, in pixels for PNG or millimeters for SVG. one number, two dimensions, iconic. β¨-s WIDTHxHEIGHT,--size=WIDTHxHEIGHTβ sets both width and height of the output image, in pixels for PNG or millimeters for SVG. β¨-T SIZE,--tile=SIZEβ multiplies both width and height of the tiled output image by the same amount. π§-T WIDTHxHEIGHT,--tile=WIDTHxHEIGHTβ multiplies both width and height of the tiled output image by the given amounts. π§-m MAXSHAPES,--maxshapes=MAXSHAPESβ sets the maximum number of shapes rendered. default is no maximum, so likeβ¦ be careful out there. π-x MINIMUMSIZE,--minimumsize=MINIMUMSIZEβ sets the minimum size for a shape to be rendered, in pixels/mm. default is0.3. π-b BORDERSIZE,--bordersize=BORDERSIZEβ sets the border size. the values are:-1for a-8pixel border,0for no border,1for an8pixel border, or2for a variable-sized border. pick your fighter. π-v VARIATION,--variation=VARIATIONβ sets the variation code. default israndom. this code is literally what determines what the final image looks like when your input has non-deterministic rules. it's the β¨destinyβ¨ field.-DNAME=VALUEβ declares a variable, configuration, or function. any declaration you could make at global scope can be entered at the command line with this option, fr fr. command line declarations override any global-scope declarations in the.cfdgfile with the same name. π heads up though: function declarations need a space-delimited type identifier in front, so you'd need quotes to force the shell to group the function declaration parts as one entity.-o NAMETEMPLATE,--outputtemplate=NAMETEMPLATEβ sets the output filename. inside this filename,%fgets replaced by the animation frame number (if any),%vand%Vget replaced by the variation code (lower case and upper case respectively), and%%gets replaced by a literal%. π-a NUM,--animate=NUMβ generatesNUManimation frames at 15 fps. π¦-a TIMExFPS,--animate=TIMExFPSβ generates TIME x FPS animation frames at the specified fps. π¦-f FRAME,--frame=FRAMEβ generates animationFRAMEonly. just the one. she's singular. π-z,--zoomβ zooms out during animation, when producing an animation using-a. β¨-V,--svgβ generates SVG (vector) output. π-Q,--quicktimeβ generates Quicktime movie output. π¬--proresβ generates Quicktime movie output using the ProRes codec instead of the H.264 codec. fancy. π₯--display=DISPLAY EXECUTABLEβ displays output with the specified program. π-c,--cropβ crops image output. βοΈ-q,--quietβ quiet mode; suppresses non-error output. shhh. π€«-C,--checkβ checks the syntax of the.cfdgfile, then exits. a lil vibe check for your grammar. π©Ί-t,--timeβ time output; outputs the time taken to render the.cfdgfile. β±οΈ-d,--cleanupβ deletes old temporary files. π§Ή-P,--paramdebugβ enables debug mode to test if all parameter blocks are deallocated. π-?,--helpβ shows a summary of options. bestie behavior. π«Ά
πΈ SEE ALSO πΈ
more info lives on the Context Free website, at:
https://www.contextfreeart.org/index.html
go. click. absorb. iykyk. β¨
π AUTHOR π
Context Free was written by Chris Coyne, John Horigan and Mark Lentczner. legends, honestly. π
this manual page was written by Bram Senders <bram@luon.net>, for the Debian project (but may be used by others). slay. π
and that's the whole page, bestie!! version 3.3.1, dated 2020-04-04. go make some generative art, you absolute icon. ππ¦β¨π
π¦ where this page comes from
- debian bookworm: contextfree 3.4+dfsg-1+b1 Β· GPL-2.0-or-later
- debian trixie: contextfree 3.4.2+dfsg-1+b2 Β· GPL-2.0-or-later
- ubuntu noble: contextfree 3.4+dfsg-1.1build1 Β· GPL-2.0-or-later
- ubuntu questing: contextfree 3.4.2+dfsg-1build3
- ubuntu resolute: contextfree 3.4.2+dfsg-1build5 Β· GPL-2.0-or-later
- ubuntu stonking: contextfree 3.4.2+dfsg-1build5 Β· 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