Hello everyone,
Would it be possible to create a cli contrib repository?
XWiki-cli is / would be a (set of) tool(s) written in Java to manipulate XWiki from the command line. The current prototype allows editing content and properties on a XWiki instance as well as in a maven repository of XML documents (XAR), at the same time or not, through various ways (command lines, call to a code editor or an IDE…)
Here an output of its --help command for a preview of the things it would do:
xwiki-cli JAVA
Actions:
--help Show the help
--edit-page Edit a complete XWiki document
--get-content Get the content of a XWiki document
--set-content CONTENT Set the content of a XWiki document
--edit-content Edit the content of a XWiki document with a text editor
--get-title Get the title of a XWiki document
--set-title TITLE Set the title of a XWiki document
--list-properties List the document's properties,
optionally from the given object
--list-objects List the document's objects,
optionally from the given class
--edit-content PROPERTY Edit the content of a given property with a text editor
--get-property PROPERTY Get the value of the given property,
optionally from the given object
--set-property PROPERTY Set the value of the given property,
optionally from the given object (see -v to give a value)
--mount PATH Mount a FUSE filesystem with the wiki contents at PATH
Parameters:
--debug Enable debug mode (for now, more verbose logs)
--print-xml Print received XML code (for debugging)
-b HOST[:PORT][/CONTEXT] Use this host and port (and this context) to connect to XWiki. See also -u.
--editor EDITOR Use this editor (necessary if environnement variable EDITOR is not set)
-p PAGE Specify the page (dotted notation). See also -u.
-u, --url URL Specify the page's URL
-w WIKI Specify the wiki
--wiki-readonly Don't write on the wiki
--wiki-writeonly Don't read from the wiki.
Note that in this case you need to use an other source,
generally the XML dir.
-o CLASS[/NUMBER] Specify the class and optionally the number of the object to consider
-v VALUE The value to use
--read-from-xml FILE Read the document from the given file
--write-to-xml FILE Write the document to the given file
--xml-file FILE Same as --write-to-xml FILE --read-from-xml FILE
--read-from-xml-dir DIR Same as --read-from-xml but for a full wiki directory
--write-to-xml-dir DIR Same as --write-to-xml but for a full wiki directory
--xml-dir DIR Same as --read-from-xml-dir DIR --write-to-xml-dir DIR
-H 'Header-Name: Val' Add a custom HTTP header (repeat to have several ones)
Authentication:
--user USENAME
The XWiki username to use.
--pass PASS
The XWiki user’s password.