PYP(1)

🌸 PYP(1) β€” the manual page, but make it cute 🌸

okay bestie, this is the PYP(1) page from the General Commands Manual and I'm gonna walk you through it like we're texting at 2am, except every single fact stays exactly where it is. no cap. πŸ’…


✨ NAME ✨

pyp β€” The Pyed Piper: A Modern Python Alternative to awk, sed and Other Unix Text Manipulation Utilities

like. the name literally tells you the vibe. it's giving "awk but make it Python." 🐍


✨ SYNOPSIS ✨

pyp [options] files ...

that's it. that's the whole entrance. options, then files, periodt. πŸ’–


✨ DESCRIPTION ✨

okay so pyp β€” the Pyed Piper β€” is a command line tool for text manipulation. it does the same kind of job as awk and sed, but its subcommands are Python based, which means a LOT of programmers will already feel at home. no cap, it's the same energy but in a language you actually speak. 🫢

it can operate both on a per-line base and on the complete input stream. so like, line by line if that's your thing, or the whole stream at once if you're feeling main character. and different features can be pipelined in a single command by using the pipe character β€” you know the one, the familiar | from shell commands. chain it up, bestie. 🌈

here's the tea though: pyp backs up its input for reruns with modified commands, and it can save commands as macros. iconic. BUT β€” and this is the downside, not gonna lie β€” the rerun feature makes it unsuitable for continuous pipe operation. so don't try to run it forever in a pipe, it's not that girl. 😭


✨ OPTIONS ✨

so these programs follow the usual GNU command line syntax, with long options starting with two dashes (-). a summary of options is included below. and for a complete description, use --manual. yes, the manual has a manual. we love a self-aware queen. πŸ‘‘

  • -h, --help β€” show this help message and exit. the classic. the emergency exit. πŸšͺ
  • -m, --manual β€” prints out extended help. the deluxe version of help, the director's cut. ✨
  • -l, --macro_list β€” lists all available macros. inventory check, bestie. πŸ“‹
  • -s MACRO_SAVE_NAME, --macro_save=MACRO_SAVE_NAME β€” saves current command as macro. use "#" for adding comments. EXAMPLE:
pyp -s "great_macro # prints first letter" "p[1]"

save it, name it, comment it, slay it. πŸ’Ύ

  • -f MACRO_FIND_NAME, --macro_find=MACRO_FIND_NAME β€” searches for macros with keyword or user name. detective mode activated. πŸ”
  • -d MACRO_DELETE_NAME, --macro_delete=MACRO_DELETE_NAME β€” deletes specified public macro. it's over for that macro fr fr. πŸ’€
  • -g, --macro_group β€” specify group macros for save and delete; default is user. so like, whose macros are these anyway? πŸ‘€
  • -t TEXT_FILE, --text_file=TEXT_FILE β€” specify text file to load. for advanced users, you should typically cat a file into pyp. noted, noted. πŸ“„
  • -x, --execute β€” execute all commands. full send. πŸ”₯
  • -c, --turn_off_color β€” prints raw, uncolored output. sometimes you just want the plain truth, no glitter. 🌚
  • -u, --unmodified_config β€” prints out generic PypCustom.py config file. fresh out the box, untouched, no edits. πŸŽ€
  • -b BLANK_INPUTS, --blank_inputs=BLANK_INPUTS β€” generate this number of blank input lines; useful for generating numbered lists with variable n. blank lines but make them productive. πŸ¦‹
  • -n, --no_input β€” use with command that generates output with no input; same as --dummy_input 1. for when you're self-sufficient and need nobody. πŸ’…
  • -k, --keep_false β€” print blank lines for lines that test as False. default is to filter out False lines from the output. so by default the false ones get ghosted, and this flag says "no actually, keep them." πŸ™ˆ
  • -r, --rerun β€” rerun based on automatically cached data from the last run. use this after executing "pyp", pasting input into the shell, and hitting CTRL-D. the comeback tour. πŸ”

✨ SEE ALSO ✨

the OGs, the ancestors, the ones who walked so pyp could run:

go say hi, they're family. 🌸


✨ AUTHOR ✨

pyp was written by Toby Rosen <tobyrosen@gmail.com>. king behavior, honestly. πŸ‘‘

this manual page was written by Khalid El Fathi <khalid@elfathi.fr>, for the Debian project (and may be used by others). shoutout Debian, always holding it down. 🫢


and that's the whole page bestie!! General Commands Manual, March 19, 2012 β€” that's the date and the source, we're closing the book on this one. go forth and pipe responsibly (but not continuously, remember?? 😭). mwah πŸ’–βœ¨πŸŽ€
πŸ“¦ where this page comes from