1PFT-GRAB(1)           User Contributed Perl Documentation          PFT-GRAB(1)
2
3
4

NAME

6       pft grab - Grab a file as attachment or picture
7

SYNOPSYS

9       pft grab [options] <file> [<file> ...]
10

DESCRIPTION

12       Grab one or more files as attachments or pictures, put it in the right
13       place under "ROOT/content".
14
15       The command will assume by default that the file is an attachment, that
16       is a binary file to be stored under "ROOT/content/attachments". This
17       behavior can be overridden by specifying the "--picture" option: as
18       result the "ROOT/content/pics" directory will be used instead as
19       destination.
20
21       This command outputs the Markdown code for linking, which can be pasted
22       in your text entry. The output will be consistent with the
23       attachment/picture choice: if "--picture" is specified, the Markdown
24       notation for including a picture will be used, otherwise the output
25       will be the syntax for links:
26
27           $ pft grab /tmp/tux.png
28           [tux.png]: :attach:tux.png
29
30           $ pft grab /tmp/tux.png --picture
31           ![tux.png](:pic:tux.png)
32
33       The "pft grab" command work also with URLs:
34
35           pft grab --picture http://example.com/picture.png
36           ![picture.png](:pic:picture.png)
37
38       If you are using the vim editor, probably you want to call this command
39       from within it as follows:
40
41           :read ! pft grab [options] file [file...]
42

OPTIONS

44       --today | -d
45           Store the file inside a content directory named after the current
46           day. This is meant to avoid name conflict with previously stored
47           attachments or pictures having the same name.
48
49               $ pft grab /tmp/tux.png --picture --today
50               ![tux.png](:pic:2016-04-20/tux.png)
51
52       --picture | -p
53           Store the files into the "ROOT/content/pics" directory and output
54           the Markdown code required to show it as a picture.
55
56           Note that no check is performed on the file content.
57
58       --rename=<name> | -r <name>
59           Rename the file. The supplied name must explicitly set file
60           extensions, if any is needed. This however will not imply a format
61           change.
62
63           This option is not allowed if multiple files are grabbed with the
64           same command.
65
66       --year=<Y> | -y <Y>
67           When using "--today", overload year. Implies "--today".
68
69       --month=<M> | -m <M>
70           When using "--today", overload month. Implies "--today".
71
72       --day=<D> | -d <D>
73           When using "--today", overload day. Implies "--today".
74
75       --help | -h
76           Show this help.
77
78
79
80perl v5.28.1                      2017-09-25                       PFT-GRAB(1)
Impressum