Moin Command Line Interface

Moin2 has two command line interfaces. The newer interface, powered by quickinstall.py and started by the ./m command (m on windows), implements the most common functions used by desktop users and 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 older interface, moin, is implemented by several Python scripts located in the /scripts/ 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 newer interface are implemented by wrapping one or more of the older 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
sample          create wiki and load sample data
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 [-c CONFIG] [-i] [-s] [-?]
    {moin,index-create,index-build,index-update,index-destroy,index-move,index-optimize,
    index-dump,save,load,dump-html,account-create,account-disable,account-password,
    maint-reduce-revisions,maint-set-meta,item-get,item-put,import19,shell,runserver}
    ...

positional arguments:
  {moin,index-create,index-build,index-update,index-destroy,index-move,index-optimize,
  index-dump,save,load,dump-html,account-create,account-disable,account-password,
  maint-reduce-revisions,maint-set-meta,item-get,item-put,import19,shell,runserver}
    moin                Runs the Flask development server i.e. app.run()
    index-create
    index-build
    index-update
    index-destroy
    index-move
    index-optimize
    index-dump
    save
    load
    dump-html
    account-create
    account-disable
    account-password
    maint-reduce-revisions
    maint-set-meta
    item-get
    item-put
    import19
    shell               Runs a Python shell inside Flask application context.
                        :param banner: banner appearing at top of shell when
                        started :param make_context: a callable returning a
                        dict of variables used in the shell namespace. By
                        default returns a dict consisting of just the app.
                        :param use_ipython: use IPython shell if available,
                        ignore if not. The IPython shell can be turned off in
                        command line by passing the **--no-ipython** flag.
    runserver           Runs the Flask development server i.e. app.run()

optional arguments:
  -c CONFIG, --config CONFIG
  -i, --index-create
  -s, --storage-create
  -?, --help            show this help message and exit

See also

moinmoin(1)