pft-grab man page
pft grab — Grab a file as attachment or picture
pft grab [options] <file> [<file> ...]
Grab one or more files as attachments or pictures, put it in the right place under
The command will assume by default that the file is an attachment, that is a binary file to be stored under
"ROOT/content/attachments". This behavior can be overridden by specifying the
"--picture" option: as result the
"ROOT/content/pcitures" directory will be used instead as destination.
This command outputs the Markdown code for linking, which can be pasted in your text entry. The output will be consistent with the attachment/picture choice: if
"--picture" is specified, the Markdown notation for including a picture will be used, otherwise the output will be the syntax for links:
$ pft grab /tmp/tux.png [tux.png]: :attach:tux.png $ pft grab /tmp/tux.png --picture ![tux.png](:pic:tux.png)
"pft grab" command work also with URLs:
pft grab --picture http://example.com/picture.png ![picture.png](:pic:picture.png)
If you are using the vim editor, probably you want to call this command from within it as follows:
:read ! pft grab [options] file [file...]
- --today | -d
Store the file inside a content directory named after the current day. This is meant to avoid name conflict with previously stored attachments or pictures having the same name.
$ pft grab /tmp/tux.png --picture --today ![tux.png](:pic:2016-04-20/tux.png)
- --picture | -p
Store the files into the
"ROOT/content/pics"directory and output the Markdown code required to show it as a picture.
Note that no check is performed on the file content.
- --rename=<name> | -r <name>
Rename the file. The supplied name must explicitly set file extensions, if any is needed. This however will not imply a format change.
This option is not allowed if multiple files are grabbed with the same command.
- --year=<Y> | -y <Y>
"--today", overload year. Implies
- --month=<M> | -m <M>
"--today", overload month. Implies
- --day=<D> | -d <D>
"--today", overload day. Implies
- --help | -h
Show this help.