PYCIRKUIT(1)

πŸ¦‹ pycirkuit(1) β€” the group chat edition πŸ¦‹

okay so bestie, welcome to pycirkuit(1), which lives in the General Commands Manual section, and today we're gonna understand it together πŸ’– no cap.


✨ NAME ✨

pycirkuit β€” a GUI/CLI front-end for "Circuit Macros" and the PIC language. yes she does both. versatile queen πŸ‘‘


🌸 SYNOPSIS 🌸

pycirkuit [ options ] [ path [ path2 ...] ]

so like, options first, then one or more paths, and the paths are optional-ish, iykyk 🫢


πŸ’… DESCRIPTION πŸ’…

PyCirkuit is a front-end for Dwight Aplevich's Circuit Macros β€” which is literally a set of macros for drawing high-quality line diagrams to include in TeX, LaTeX, etc. (the "etc." is doing a lot of work there and I respect it).

PyCirkuit builds a live preview and lets you export it as TikZ, PDF, PNG or JPEG. preview now, flex later. that's the whole energy ✨


πŸŽ€ OPTIONS πŸŽ€

okay this is the part everyone skips and I will NOT let you skip it. every single flag, right here, no gatekeeping:

  • -h, --help β€” pops up a help menu. your bestie when you're lost πŸ™ˆ
  • -v, --version β€” shows you the version info. gotta know which era of pycirkuit you're living in πŸ’«
  • -t, --tikz β€” flips on batch (unattended) mode and converts the files you named in path to TIkZ format. and yes, several output formats can be used together β€” she's flexible like that.
  • -f, --pdf β€” flips on batch (unattended) mode and converts the files named in path to PDF format. several output formats can be used together πŸ’–
  • -p, --png β€” flips on batch (unattended) mode and converts the files named in path to PNG format. several output formats can be used together 🌸
  • -j, --jpeg β€” flips on batch (unattended) mode and converts the files named in path to JPEG format. several output formats can be used together πŸ“
  • -s, --svg β€” flips on batch (unattended) mode and converts the files named in path to SVG format. several output formats can be used together πŸ¦‹
  • --dpi N β€” sets the resolution of the output raster images (png, jpg), in dots per inch. value N is mandatory, fr fr. if you don't set it, the default is 150dpi (and that default is defined in the 'settings' dialog, just so you know where to go change it πŸ‘€).
  • --quality Q β€” sets the quality of the output raster lossy images (jpg), in percent. value Q is mandatory. if you don't set it, the default is 80% (also defined in the 'settings' dialog πŸ’…).
  • --destination directory β€” saves all the converted files into the same destination directory D (the value is mandatory, don't forget her).
  • --links β€” follow symbolic links.
    • if it's not set, the destination file gets saved into the same directory where the source file is, whether that source is a real file or a symbolic link.
    • if it is set, the destination file will be saved into the directory
okay so the manpage literally just stops mid-sentence there and leaves us hanging 😭 not me rereading it three times. she said ✨mystery✨. we report, we don't invent.
  • --overwrite β€” overwrites the converted files by default if they're already there. if it's not set, the user gets asked at runtime. so she will check in with you first 🫢
  • -r β€” with this one, the pattern ** will match any files and zero or more subdirs. so **/*.ckt matches all files with the ckt extension in the current directory and all its subdirectories. recursive queen behavior πŸ‘‘

🌈 EXAMPLES 🌈

here's the part where it all clicks, bestie. three real ones:

1. convert every ckt file in examples to PNG:

pycirkuit --png examples/*.ckt

2. convert them to JPEG and PDF, with JPEG quality cranked to 100% and dpi set to 200:

pycirkuit --jpeg --pdf --quality 100 --dpi 200  examples/*.ckt

3. convert everything with a ckt extension under the current directory to TikZ and PNG, dump it all in the output directory, set PNG dpi to 300, and just overwrite stuff without asking:

pycirkuit --tikz --png --dpi 300 --overwrite -r **/*.ckt --destination output

see? batch mode goes hard πŸ”₯


πŸ‘‘ SEE ALSO πŸ‘‘

more info lives in the PyCirkuit Git repository, so go lurk:

https://github.com/orestesmas/pycirkuit/

also dpic(1) β€” go say hi to her too πŸ’œ


πŸ’– AUTHOR πŸ’–

PyCirkuit was written by Orestes Mas <orestes@tsc.upc.edu>.

This manual page was written by Aniol Marti <amarti@caliu.cat>.

Permission is granted to copy, distribute and/or modify this document under the terms of the BSD 3-Clause license. slay, and legally so πŸŽ€


and that's the whole page bestie!! this one's dated 2019-07-22 and belongs to the PYCIRKUIT(1) crew β€” go forth and draw ur circuits, you absolute icon 🧚✨

πŸ“¦ where this page comes from