1snippeter
2=========
3snippeter Plugin for DokuWiki
4
5Add document snippets into a page.
6
7All documentation for this plugin can be found at
8https://github.com/geco2/snippeter
9
10If you install this plugin manually, make sure it is installed in
11lib/plugins/snippeter/ - if the folder is called different it
12will not work!
13
14Please refer to http://www.dokuwiki.org/plugins for additional info
15on how to install plugins in DokuWiki.
16
17----
18Copyright (C) Andreas Eisenreich <andi@nanuc.de>
19
20This program is free software; you can redistribute it and/or modify
21it under the terms of the GNU General Public License as published by
22the Free Software Foundation; version 2 of the License
23
24This program is distributed in the hope that it will be useful,
25but WITHOUT ANY WARRANTY; without even the implied warranty of
26MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27GNU General Public License for more details.
28
29See the COPYING file in your DokuWiki folder for details
30
31----
32
33HOWTO
34=========
35
36Configuration
37After successful installation you will find an additional chapter in the
38wiki configuration wizard called "sippeter". Withing that section you can
39configure the namespace you want to use for your snippets.
40
41The plugin provide a shortcut for each page created in that namespace.
42
43Create snippets
44========
45In general you can use any wikipage placed in the namespace you configured
46for snippeter. To add an icon to identify the snipped within the editor toolbar,
47you have to add the picture you plan to use using the dokuwiki media manager
48right within the snippet page.
49
50NOTE: Snippeter only support PNG (.png) files in the current version. This might
51be changed in the future. Please refresh dokuwikis caches to see your new icon!
52(touch the file local.php)
53
54Valid Example:
55
56	{{ :snippets:phone16.png |}}
57
58	==== Call: <project> - <description> ====
59	{{tag>}}
60	* **Person:**
61	* **Time:**
62
63	**Notes**\\
64	*
65
66	----
67
68Usage
69========
70Snippeter create a shortcut within the default editor toolbar (the "+" icon). That
71icon open up an overview of you snippets. While choose one of them with a klick on
72the related icon will insert your snippet without the media manager information for
73the icon on the current curser position within your open wiki page.
74
75Templating
76========
77Some part of the snippet can be dynamically replaced by an automatic content. In the snippet text, you need to use the variable name in between `< >`.
78
79The possible variables names are:
80
81| Variable name | Description |
82| ------------- | ----------- |
83| `PAGE_TITLE` | the id of the currently edited page, underscores replaced by spaces |
84| `CURRENT_DATE` | the current date in iso format, e.g.: 2024-02-10 for the 10th February, 2024 |
85| `CURRENTDATE` | the current date in format YYYYMMDD, e.g.: 20240210 for the 10th February, 2024 |
86| `CURRENT_DATE_UNDERSCORE` | the current date in format YYYY_MM_DD, e.g.: 2024_02_10 for the 10th February, 2024 |
87| `CURRENT_DATE_DASH` | the current date in format YYYY/MM/DD, e.g.: 2024/02/10 for the 10th February, 2024 |
88| `CURRENT_DATE_LOCALE` | the current date in Locale format, format will depend on your server setup |
89
90FAQ
91========
92Q: I added a customized icon for my snipped, but snippeter still provide the default one
93in the toolbar.
94A: Please reset DokuWikis cache while touch the file conf/local.php or press the save
95button within the configuration wizzard page.
96
97