Overview of Alexandria commands
Go to the directory that you unpacked the zip into. The zip contained three subdirectories: a bin, a lib, and an example directory.
-
cd example -
alexandria initThis will prepare the directory for alexandria usage.
It creates subdirectoriestagmlandviewsfor the tagml source files and the view definition files, respectively. -
alexandria add tagml/frost-quote.tagml views/l-markup.jsonThis will add
tagml/frost-quote.tagmlandviews/l-markup.jsonto the alexandria watchlist, so changes to theses file will be registered by alexandria. -
alexandria commit -a
or
alexandria commit tagml/frost-quote.tagml views/l-markup.json
or
alexandria commit tagml/*.tagml views/*.jsonThis will check the indicated or all (
-a) watched files for changes since the last commit.
For changed tagml files, it will set up or update a TAG document.
For changed view definition files, it will set up or update a view. -
alexandria checkout l-markupThis will activate view
l-markup, defined byviews/l-markup.json
All watched tagml files will be overwritten by a tagml serialization of the text and markup of the TAG defined by the view. -
alexandria checkout -This will deactivate the active view, the tagml files will be overwritten with the complete tagml serialization of the TAG.
-
alexandria diff tagml/frost-quote.tagmlThis will show the changes made to the tagml file
tagml/frost-quote.tagmlsince the last commit. -
alexandria revert tagml/frost-quote.tagmlThis will revert the changes made to the tagml file
tagml/frost-quote.tagml. -
alexandria aboutThis will show the version and build date of the app, and the names of the documents and views that are registered.
-
alexandria statusThis will show the active view, and the names of the files that have been changed since the last commit.
-
alexandria export-dot frost-quote
or
alexandria export-dot frost-qoute -o fq.dotThis will export the graph of document
frost-quote(defined bytagml/frost-quote.tagml) using the dot format, to either stdout or (using-o) to the indicated output file ). -
alexandria export-svg frost-quote
or
alexandria export-svg frost-quote -o fq.svgThis will export the graph of document
frost-quoteas svg to stdout or file fq.svg.
For this command, graphviz needs to be installed. -
alexandria export-png frost-quote
or
alexandria export-png frost-quote -o fq.pngThis will export the graph of document
frost-quoteas png to stdout or file fq.png.For this command, graphviz needs to be installed.
-
alexandria export-xml frost-quote
or
alexandria export-xml frost-quote -o fq.xmlThis will export document
frost-quoteas xml, to stdout or file fq.xml.
Trojan Horse markup is used to deal with overlapping hierarchies.
If a view is active, this view will be used for the export. When the (view of the) document has multiple overlapping layers, the default layer hierarchy will determine the xml hierarchy, the markup from the other layers will be exported as Trojan Horse milestones.
Use the-loption to indicate an alternative layer to use as the leading layer.:alexandria export-xml frost-quote -l A -
alexandria helpThis will show a list of the available commands and their short descriptions.
-
alexandria query frost-quote -q sparql/markup-count.sparqlThis will execute the
markup-countSPARQL query on the knowledge graph of documentfrost-quote
NOTE:
-
In all the previous commands with multiple parameters, those parameters are order independent, so
alexandria export-xml frost-quote -o fq.xml
will give the same result as
alexandria export-xml -o fq.xml frost-quote -
To show more information about an alexandria command, add
-hor--help