DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:jsongendoc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:jsongendoc [2023-10-27 00:27] 89.143.166.90plugin:jsongendoc [2023-10-31 20:53] (current) 89.143.166.90
Line 1: Line 1:
 ====== JSON Generate Document Plugin ====== ====== JSON Generate Document Plugin ======
- 
  
 ---- plugin ---- ---- plugin ----
Line 8: Line 7:
 type       : syntax, action type       : syntax, action
 lastupdate : 2023-10-26 lastupdate : 2023-10-26
-compatible : Hogfather,Igor,Jack Jackrum+compatible : Hogfather, Igor, Jack Jackrum
 depends    : json depends    : json
 conflicts  : conflicts  :
 similar    : json, jsoneditor, jsontable, struct, addnewpage, copypage similar    : json, jsoneditor, jsontable, struct, addnewpage, copypage
-tags       : data, json, database+tags       : data, json, database, button, create, form
  
 downloadurl: https://gitlab.com/dokuwiki-json/jsongendoc/-/archive/master/json-master.zip downloadurl: https://gitlab.com/dokuwiki-json/jsongendoc/-/archive/master/json-master.zip
Line 25: Line 24:
 Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
-Install also [[https://www.dokuwiki.org/plugin:json|JSON plugin]].+Install also [[plugin:json|JSON plugin]].
  
 ===== Description ===== ===== Description =====
-JSON Generate Document Plugin is based on [[https://www.dokuwiki.org/plugin:json|JSON plugin]]. It adds a form with a button to the page. User can select the JSON data and enter the name for the new document. When user presses the button, new text based document is generated, which is based on specified template. Patterns ''@ ... @'' inside template are replaced by corresponding JSON data. Also sections from template are hidden or displayed according to condition calculated from JSON data.+JSON Generate Document Plugin is based on [[plugin:json|JSON plugin]]. It adds a form with a button to the page. User can select the JSON data and enter the name for the new document. When user presses the button, new text based document is generated, which is based on specified template. Patterns ''@ ... @'' inside template are replaced by corresponding JSON data. Also sections from template are hidden or displayed according to condition calculated from JSON data.
  
 Newly created document can the be saved as a Dokuwiki page to the server, or it can be downloaded via browser to the client machine. It is possible to generate and download any text based document, for example txt, html, svg, cvs, ... Newly created document can the be saved as a Dokuwiki page to the server, or it can be downloaded via browser to the client machine. It is possible to generate and download any text based document, for example txt, html, svg, cvs, ...
  
 Here is a [[https://dokuwiki-json-demo.1001beauty.si/|Dokuwiki JSON Demo Server]] with JSON database integrated into DokuWiki. Also source code of this plugin contains demo. You can copy the contents of the demo files into your Dokuwiki and experiment with them. Here is a [[https://dokuwiki-json-demo.1001beauty.si/|Dokuwiki JSON Demo Server]] with JSON database integrated into DokuWiki. Also source code of this plugin contains demo. You can copy the contents of the demo files into your Dokuwiki and experiment with them.
 +
 +
 +===== Support =====
 +For issues or just questions use [[https://gitlab.com/dokuwiki-json/json/-/issues|Issues]] on Gitlab. Please don't email directly.
  
  
Line 38: Line 41:
 Template is basically a dokuwiki page, which may have some ''@ ... @'' patterns, which will be replaced by JSON data. There are three types of pattern: Template is basically a dokuwiki page, which may have some ''@ ... @'' patterns, which will be replaced by JSON data. There are three types of pattern:
 ^ Pattern     ^ Description ^ ^ Pattern     ^ Description ^
-| ''@ ... @'' | Standard patterns from [[https://www.dokuwiki.org/namespace_templates|Namespace Templates]]. | +| ''@ ... @'' | Standard patterns from [[:namespace_templates|Namespace Templates]]. | 
-| ''@%%%$%%-start(''// filter //'')%''// dokuwiki_section //''%%%$%%end%@'' | If //filter// (see [[https://www.dokuwiki.org/plugin:json|JSON Data Plugin]]) is evaluated to true, then //dokuwiki_section// will be added to the document, otherwise it will be removed. |+| ''@%%%$%%-start(''// filter //'')%''// dokuwiki_section //''%%%$%%end%@'' | If //filter// (see [[plugin:json|JSON Data Plugin]]) is evaluated to true, then //dokuwiki_section// will be added to the document, otherwise it will be removed. |
 | ''@%''''$''// path //''%@'' | Variable on path is type of string, number or boolean. Extract data. | | ''@%''''$''// path //''%@'' | Variable on path is type of string, number or boolean. Extract data. |
 | ::: | Variable on path is type of array. Extract json. | | ::: | Variable on path is type of array. Extract json. |
Line 46: Line 49:
  
 ===== Usage ===== ===== Usage =====
-Syntax is similar as in [[https://www.dokuwiki.org/plugin:json|JSON Data Plugin]]:\\+Syntax is similar as in [[plugin:json|JSON Data Plugin]]:\\
 ''<jsongendoc'' //attributes// ''>'' //inline_json// ''</jsongendoc>'' ''<jsongendoc'' //attributes// ''>'' //inline_json// ''</jsongendoc>''
  
Line 60: Line 63:
  
 ==== Attribute 'namespace' ==== ==== Attribute 'namespace' ====
-It specifies the [[https://www.dokuwiki.org/namespaces|namespace]] (location) for the template and for the new document(if //mime// is undefined). If it is not specified, then current location is used. If a //docname// or //template// attribute contains full file path, then namespace attribute is ignored.+It specifies the [[:namespaces|namespace]] (location) for the template and for the new document(if //mime// is undefined). If it is not specified, then current location is used. If a //docname// or //template// attribute contains full file path, then namespace attribute is ignored.
  
 ==== Attribute 'template' ==== ==== Attribute 'template' ====
-It specifies the template file. If template is not specified, then [[https://www.dokuwiki.org/namespace_templates|Namespace Template]] is used.+It specifies the template file. If template is not specified, then [[:namespace_templates|Namespace Template]] is used.
  
 ==== Attribute 'docname' ==== ==== Attribute 'docname' ====
plugin/jsongendoc.1698359272.txt.gz · Last modified: 2023-10-27 00:27 by 89.143.166.90

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki