Moin Command Line Interface
Moin2 has two command line interfaces. The first interface, powered by quickinstall.py and started by the ./m command (m on windows), implements the most common functions used by developers. This CLI is only available when moin is installed using git to clone a repository from https://github.com/moinwiki/moin or alternative.
The second interface, moin, is implemented by several Python scripts located in the /cli/ directory. This interface targets wiki migration, account creation and maintenance, and wiki maintenance.
There is some overlap between the two interfaces. Several of the commands within the first interface are implemented by wrapping one or more of the cli interface commands to accomplish a task.
./m Interface
The virtual environment must be activated before using the ./m interface. Executing ./m (m on windows) without any options produces the menu:
usage: "{0} <target>" where <target> is:
quickinstall update virtual environment with required packages
extras install packages required for docs and moin development
docs create moin html documentation (requires extras)
interwiki refresh intermap.txt
log <target> view detailed log generated by <target>, omit to see list
new-wiki create empty wiki
restore * create wiki and restore wiki/backup.moin *option, specify file
import19 <dir> <args> import a moin1.9 wiki/data instance from <dir> with <args>
where <args> = "--markup_out moinwiki" or markdown,rst,html,...
run * run built-in wiki server *options (--port 8081)
backup * roll 3 prior backups and create new backup *option, specify file
dump-html * create a static HTML image of wiki *options, see docs
index delete and rebuild indexes
css run lessc to update basic theme CSS files
tests * run tests, log output (-v -k my_test)
coding-std correct scripts that taint the repository with trailing spaces..
del-all same as running the 4 del-* commands below
del-orig delete all files matching *.orig
del-pyc delete all files matching *.pyc
del-rej delete all files matching *.rej
del-wiki create a backup, then delete all wiki data
moin Interface
moin is the command line interface to miscellaneous MoinMoin Wiki related tools.
If you invoke moin without any arguments, it will show a short quick help,
moin –help will show a more complete overview:
Usage: moin [OPTIONS] COMMAND [ARGS]...
Moin extensions to the Flask CLI
Options:
-e, --env-file FILE Load environment variables from this file. python-
dotenv must be installed.
-A, --app IMPORT The Flask application or factory function to load, in
the form 'module:name'. Module can be a dotted import
or file path. Name is not required if it is 'app',
'application', 'create_app', or 'make_app', and can be
'name(args)' to pass arguments.
--debug / --no-debug Set debug mode.
--version Show the Flask version.
--help Show this message and exit.
Commands:
account-create Create a user account
account-disable Disable user accounts
account-password Set user passwords
create-instance Create wikiconfig and wiki instance...
dump-help Dump a namespace of user help items to .data...
dump-html Create a static HTML image of this wiki
help Quick help
import19 Import content and user data from a moin 1.9 wiki
index-build Build the indexes
index-create Create empty indexes
index-destroy Destroy the indexes
index-dump Dump the indexes in readable form to stdout
index-move Move the indexes from the temporary to the...
index-optimize Optimize the indexes
index-update Update the indexes
item-get Get an item revision from the wiki
item-put Put an item revision into the wiki
load Deserialize a file into the backend; with...
load-help Load a directory of help .data and .meta file...
maint-reduce-revisions Remove all revisions but the last one from all...
maint-set-meta Set meta data of a new revision
maint-validate-metadata Find and optionally fix issues with item metadata
routes Show the routes for the app.
run Run a development server.
save Serialize the backend into a file
shell Run a shell in the app context.
welcome Load initial welcome page into an empty wiki
See also
moinmoin(1)