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 "ROOT/content".

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

The "pft grab" command work also with URLs:

pft grab --picture

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
--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>
When using "--today", overload year. Implies "--today".
--month=<M> | -m <M>
When using "--today", overload month. Implies "--today".
--day=<D> | -d <D>
When using "--today", overload day. Implies "--today".
--help | -h
Show this help.


2016-09-03 perl v5.24.0 User Contributed Perl Documentation