DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:strata

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:strata [2016-02-17 09:59] Aleksandrplugin:strata [2023-10-31 01:03] (current) Klap-in
Line 3: Line 3:
 ---- plugin ---- ---- plugin ----
 description: Add and query semi-structured data in your wiki description: Add and query semi-structured data in your wiki
-author     : Brend Wanders  +author     : François Kaag  
-email      : b.wanders@utwente.nl +email      : francois.kaag@cardynal.fr
 type       : syntax, action, helper type       : syntax, action, helper
-lastupdate : 2016-02-03 +lastupdate : 2023-10-10 
-compatible : Ponder Stibbons, Binky, Weatherwax, Hrun, Detritus+compatible : Jack Jackrum
 depends    :  depends    : 
-conflicts  :  +conflicts caption 
-similar    : fields, data+similar    : data, fields, struct
 tags       : database, sqlite, data, tables, listing, mysql, postgresql tags       : database, sqlite, data, tables, listing, mysql, postgresql
  
-downloadurl: https://github.com/bwanders/dokuwiki-strata/zipball/master +downloadurl: https://github.com/fkaag71/dokuwiki-strata/zipball/master 
-bugtracker : https://github.com/bwanders/dokuwiki-strata/issues +bugtracker : https://github.com/fkaag71/dokuwiki-strata/issues 
-sourcerepo : https://github.com/bwanders/dokuwiki-strata/+sourcerepo : https://github.com/fkaag71/dokuwiki-strata/
 donationurl:  donationurl: 
  
Line 21: Line 21:
 ---- ----
  
-The Strata plugin allows you to add data to your pages, just like the [[plugin:data]] pluginYou can think of this data either as named values attached to the page, or as describing things on the page in a more structured way.+This plugin was originally created by [[brend+strata@13w.nl|Brend Wanders]]. Although he could not maintain it any longer after 2021, it is still useful, since no other data plugin seems to propose graph based queries that fit extremely well with the Wiki structure.
  
-Though a little more complex than the [[plugin:data]] plugin, Strata allows you to create tables that combine data from different pages. Strata also supports previewing your edits showing you the correctly changed data, and has a flexible and user-controlled data type display. Finally, you can put multiple data entries on a single page, and have them combined or remain separate depending on how you want to model your data.+The Strata plugin allows you to add data to your pages, just like the [[data]] plugin. You can think of this data either as named values attached to the page, or as describing things on the page in a more structured way. 
 + 
 +Though a little more complex than the [[data]] plugin, Strata allows you to create tables that combine data from different pages. Strata also supports previewing your edits showing you the correctly changed data, and has a flexible and user-controlled data type display. Finally, you can put multiple data entries on a single page, and have them combined or remain separate depending on how you want to model your data.
  
 **Requirements:** **Requirements:**
-  * Strata requires PHP 5.3.x+  * Strata requires PHP 5.6.x
   * [[http://www.php.net/manual/en/ref.pdo-sqlite.php|pdo-sqlite]] extension for accessing and creating the default data storage   * [[http://www.php.net/manual/en/ref.pdo-sqlite.php|pdo-sqlite]] extension for accessing and creating the default data storage
  
Line 32: Line 34:
 ===== Installation ===== ===== Installation =====
  
-Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually.+Search and install the plugin using the [[extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
-After installation, it might be useful to copy the contents [[https://github.com/bwanders/dokuwiki-strata/blob/master/manual.txt|manual.txt]] on Github to a wiki page on your installation. This will put the [[.strata:reference guide]] on your own wiki installation, complete with listing of available types and aggregates.+After installation, it might be useful to copy the contents [[https://github.com/fkaag71/dokuwiki-strata/blob/main/manual.txt|manual.txt]] on Github to a wiki page on your installation. This will put the [[~:reference guide]] on your own wiki installation, complete with listing of available types and aggregates
 + 
 +Strata followes DokuWiki's [[config:useheading]] configuration when displaying links. Changing that setting will also adjust how Strata displays links, which might help with making a lot of the automatically generated listings and links look better.
  
  
 ===== Examples/Usage ===== ===== Examples/Usage =====
 +
 +//For a separate page focusing only on examples and troubleshooting, see [[~:examples|Strata Plugin Examples]].//
  
 Below is a very simple example of how to use Strata. Below is a very simple example of how to use Strata.
Line 54: Line 60:
 ^ Page Title //(person)//                           || ^ Page Title //(person)//                           ||
 ^ Full Name                | John Doe                | ^ Full Name                | John Doe                |
-^ Age                      | 20                      |+^ Age                      | 24                      |
 ^ Contact                  | <john.doe@example.org>  | ^ Contact                  | <john.doe@example.org>  |
 ^ Friends                  | [[Alice]], [[Bob]]      | ^ Friends                  | [[Alice]], [[Bob]]      |
Line 77: Line 83:
  
 The next section will go over the syntax in more detail. The next section will go over the syntax in more detail.
 +
  
 ===== Syntax ===== ===== Syntax =====
  
-The strata plugin allows you to add data to your pages and to query that data from your pages. The quick guide will get you up and running with some examples of how to enter and query. More advanced uses are discussed in the [[.strata:reference guide]].+The strata plugin allows you to add data to your pages and to query that data from your pages. The quick guide will get you up and running with some examples of how to enter and query. More advanced uses are discussed in the [[~:reference guide]].
  
 A good way to get more experienced is to add some simple data to your wiki, and start querying it. Most error messages are descriptive enough to get some idea of what went wrong. A good way to get more experienced is to add some simple data to your wiki, and start querying it. Most error messages are descriptive enough to get some idea of what went wrong.
 +
  
 ==== Data Block ==== ==== Data Block ====
Line 102: Line 110:
  
 The same example, but extended with more features: The same example, but extended with more features:
 +
 <code> <code>
 <data person> <data person>
Line 210: Line 219:
   * **image** (type hint: size to scale the image to)\\ Displays an image. The optional hint is treated as the size to scale the image to. Give the hint in WIDTHxHEIGHT format.   * **image** (type hint: size to scale the image to)\\ Displays an image. The optional hint is treated as the size to scale the image to. Give the hint in WIDTHxHEIGHT format.
   * **link** (type hint: The link title)\\ Creates a link. This type is multi-purpose: it handles external links, interwiki links, email addresses, windows shares and normal wiki links (basically any link DokuWiki knows of). The optional hint will be used as link title.   * **link** (type hint: The link title)\\ Creates a link. This type is multi-purpose: it handles external links, interwiki links, email addresses, windows shares and normal wiki links (basically any link DokuWiki knows of). The optional hint will be used as link title.
-  * **ref** (type hint: namespace)\\ References another piece of data or wiki page, and creates a link. The optional hint is used as namespace for the link. If the hint ends with a #, all values will be treated as fragments.+  * **ref** (type hint: namespace)\\ References another piece of data or wiki page, and creates a link. An optional hint can be given to change how links are interepreted when saving them: if present, the hint is used as namespace for the link. If the hint ends with a #, all values will be treated as fragments.
   * **wiki**\\ Allows the use of dokuwiki syntax; only non-block syntax is allowed (only links, formatting, etc.; no tables, headers, and other large stuff). The hint is ignored.   * **wiki**\\ Allows the use of dokuwiki syntax; only non-block syntax is allowed (only links, formatting, etc.; no tables, headers, and other large stuff). The hint is ignored.
 +  * ** enum** (type hint: value set name)\\ Searches the entry in the value set, a ''<data>'' block where rows are in the form ''label: entry'', and displays the label corresponding to the entry, or #NA if no correspondence was found.
  
  
 ==== Aggregates ==== ==== Aggregates ====
  
-Aggregates are used on displays of variables. They are attached to the variable with ''@'', for example: ''?x@unique'' applies the unique aggregate to the values of variables ''?x''. Aggregates can be passed a hint by adding the hint between parenthesis: ''?variable@aggregate(hint)''.+Aggregates are used on displays of variables. They are attached to the variable with ''@'', for example: ''%%?x@unique%%'' applies the unique aggregate to the values of variables ''?x''. Aggregates can be passed a hint by adding the hint between parenthesis: ''%%?variable@aggregate(hint)%%''.
  
 On your own wiki, you can get a list of all available aggregates with ''%%~~INFO:strataaggregates~~%%''. Below are some commonly used aggregates: On your own wiki, you can get a list of all available aggregates with ''%%~~INFO:strataaggregates~~%%''. Below are some commonly used aggregates:
Line 234: Line 244:
   * **Default database source name** (//Default:// ''sqlite:@METADIR@/strata.sqlite''): The [[phpfn>PDO]] data source name used to connect to the database. The ''@METADIR@'' token will be replaced with the path of DokuWiki's meta data directory.   * **Default database source name** (//Default:// ''sqlite:@METADIR@/strata.sqlite''): The [[phpfn>PDO]] data source name used to connect to the database. The ''@METADIR@'' token will be replaced with the path of DokuWiki's meta data directory.
   * **The name of the 'is a' relation** (//Default:// ''is a''): The predicate that should be used to indicate the 'is a' relation. This is used when you enter a data block with one or more classes.   * **The name of the 'is a' relation** (//Default:// ''is a''): The predicate that should be used to indicate the 'is a' relation. This is used when you enter a data block with one or more classes.
 +  * ** Data scope reduced to the current namespace ** (//Default:// ''inactive''): When set, only the triples within the current namespace are considered in expressions.
   * **The name of the 'entry title' relation** (//Default:// ''entry title''): The predicate that should be used to indicate the 'entry title' relation. The 'entry title' relation links a human readable label to the data entry. Normally, this is done automatically by the data block syntax, this setting only changes the relation used to attach the title to the data.   * **The name of the 'entry title' relation** (//Default:// ''entry title''): The predicate that should be used to indicate the 'entry title' relation. The 'entry title' relation links a human readable label to the data entry. Normally, this is done automatically by the data block syntax, this setting only changes the relation used to attach the title to the data.
   * **Enable debug information?** (//Default:// no): Tick this box if you want to have more extensive information on what's going wrong. For example, use it when the connection to the database fails.   * **Enable debug information?** (//Default:// no): Tick this box if you want to have more extensive information on what's going wrong. For example, use it when the connection to the database fails.
   * **Is the data entry syntax enabled?** (//Default:// yes): Uncheck this box if you want to disable the data blocks for entry.   * **Is the data entry syntax enabled?** (//Default:// yes): Uncheck this box if you want to disable the data blocks for entry.
 +
 +Furthermore, the following DokuWiki settings are relevant:
 +
 +  * **[[config:useheading]]**: adjusts how links are displayed
  
  
Line 296: Line 311:
  
 The credentials file should have the following content The credentials file should have the following content
 +
 <file php credentials.local.php> <file php credentials.local.php>
 <?php <?php
Line 310: Line 326:
  
 === Change Log === === Change Log ===
 +After adoption: 
 +{{rss>https://github.com/fkaag71/dokuwiki-strata/commits.atom date}} 
 +Before adoption:
 {{rss>https://github.com/bwanders/dokuwiki-strata/commits/master.atom date}} {{rss>https://github.com/bwanders/dokuwiki-strata/commits/master.atom date}}
  
Line 320: Line 338:
 ===== Bugs, Feature Requests and Patches ===== ===== Bugs, Feature Requests and Patches =====
  
-Please submit bugs and feature requests in the [[https://github.com/bwanders/dokuwiki-strata/issues|issue tracker on github]]. The easiest way to submit patches is through forking on github and opening a pull request. Alternatively, patches can be sent in unified diff format or as git patches against the master branch.+Please submit bugs and feature requests in the [[https://github.com/fkaag71/dokuwiki-strata/issues|issue tracker on github]]. The easiest way to submit patches is through forking on github and opening a pull request. Alternatively, patches can be sent in unified diff format or as git patches against the master branch.
  
plugin/strata.1455699542.txt.gz · Last modified: 2016-02-17 09:59 by Aleksandr

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