1PFT-GRAB(1) User Contributed Perl Documentation PFT-GRAB(1)
2
3
4
6 pft grab - Grab a file as attachment or picture
7
9 pft grab [options] file [file ...]
10
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 means of the --picture option: as result
18 the "ROOT/content/pics" directory will be used instead as destination.
19
20 This command outputs the Markdown code for linking the grabbed content
21 item in a PFT page. The output can be inserted in the PFT entry. The
22 output will be consistent with the attachment/picture choice: if
23 --picture is specified, the Markdown notation for including a picture
24 will be used, otherwise the syntax for links will be used. See
25 EXAMPLE.
26
27 Users of the ViM editor may find useful to invoke this command from
28 within the editor as follows:
29
30 :read ! pft grab [options] file [file...]
31
33 --today | -t
34 Store the file inside a content directory named after the current
35 day. This is meant to avoid name conflict with previously stored
36 attachments or pictures having the same name (see EXAMPLE).
37
38 --picture | -p
39 Store the files into the "ROOT/content/pics" directory and output
40 the Markdown code required to show it as a picture.
41
42 Note that no check is performed on the file format to verify it is
43 actually a picture.
44
45 --rename=name | -r name
46 Rename the file. The alternate file name supplied with this option
47 must explicitly set the extension, if an extension is desired.
48 Supplying the wrong extension will not imply a format change.
49
50 This option is not allowed if multiple files are grabbed with the
51 same command.
52
53 --year=Y | -y Y
54 When using --today, overload year with Y. Implies --today.
55
56 --month=M | -m M
57 When using --today, overload month with M. Implies --today.
58
59 --day=D | -d <D>
60 When using --today, overload day with D. Implies --today.
61
62 --help | -h
63 Show this help.
64
66 $ pft grab /tmp/tux.png
67 [tux.png]: :attach:tux.png
68
69 $ pft grab /tmp/tux.png --picture
70 ![tux.png](:pic:tux.png)
71
72 $ pft grab /tmp/tux.png --picture --today
73 ![tux.png](:pic:2016-04-20/tux.png)
74
75 $ pft grab --picture http://example.com/picture.png
76 ![picture.png](:pic:picture.png)
77
79 pft-make(1)
80
81
82
83perl v5.38.0 2023-07-20 PFT-GRAB(1)