PFT-GRAB(1)

πŸ“¦
version 1.4.1 Β· 2 versions
, in fedora 43

✨ PFT-GRAB(1) ✨

okay bestie, this is the manual page for pft grab from the User Contributed Perl Documentation collection, and it's literally one of those little commands that just works. no cap. let's get into it πŸ’…


NAME

pft grab β€” grab a file as an attachment or a picture 🫢


SYNOPSIS

pft grab [options] file [file ...]

DESCRIPTION

so the vibe is: you grab one or more files as attachments or pictures, and it puts them in the right place under ROOT/content. that's the whole thing. it's giving personal assistant energy fr fr.

by default the command assumes your file is an attachment β€” aka a binary file that belongs under ROOT/content/attachments. that's the default and it's lowkey perfect.

but bestie, you can override that whole situation with the --picture option: when you do, ROOT/content/pics becomes the destination directory instead. πŸŽ€

then this command spits out the Markdown code for linking the grabbed content item inside a PFT page. you can just paste that output straight into the PFT entry. and it matches whatever choice you made β€” if --picture is specified, you get the Markdown notation for including a picture; otherwise you get the syntax for links. see EXAMPLE below for the receipts. ✨

if you're a ViM editor user, you might find it useful to invoke this command from inside the editor like this:

:read ! pft grab [options] file [file...]

periodt. πŸ’–


OPTIONS πŸ‘‘

  • --today | -t β€” store the file inside a content directory named after the current day. this exists so you don't get name conflicts with attachments or pictures you already stored that have the same name (peep the EXAMPLE). πŸ—“οΈ
  • --picture | -p β€” store the files into the ROOT/content/pics directory and output the Markdown code required to show it as a picture.
heads up bestie: no check is performed on the file format to verify it is actually a picture. the command trusts you. it believes in you. it will not double-check. 😭
  • --rename=name | -r name β€” rename the file. the alternate file name you supply with this option must explicitly set the extension, if an extension is desired. supplying the wrong extension will not imply a format change. nope, not even a little.
this option is not allowed if multiple files are grabbed with the same command. sorry babe, one rename per grab. πŸ’€
  • --year=Y | -y Y β€” when using --today, overload year with Y. implies --today. 🌸
  • --month=M | -m M β€” when using --today, overload month with M. implies --today. 🌸
  • --day=D | -d <D> β€” when using --today, overload day with D. implies --today. 🌸
  • --help | -h β€” show this help. 🫢

EXAMPLE πŸ¦‹

 $ pft grab /tmp/tux.png
 [tux.png]: :attach:tux.png

 $ pft grab /tmp/tux.png --picture
 ![tux.png](:pic:tux.png)

 $ pft grab /tmp/tux.png --picture --today
 ![tux.png](:pic:2016-04-20/tux.png)

 $ pft grab --picture http://example.com/picture.png
 ![picture.png](:pic:picture.png)

look at that output. absolutely ate. πŸ”₯


SEE ALSO


and that's the whole page, bestie! this one shipped as part of perl v5.42.0, dated 2025-07-25. go grab some files, you've got this. πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from