Moin Command Line Interface

Moin2 has two command line interfaces. The newer interface, powered by and started by the ./m command (m on windows), implements the most common functions used by desktop users and developers.

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

It is not necessary to activate the virtual environment before using the ./m interface. Executing ./m (m on windows) without any options produces the menu:

usage: "./m <target>" where <target> is:

quickinstall    update virtual environment with required packages
docs            create moin html documentation
extras          install OpenID, Pillow, pymongo, sqlalchemy, ldap,
interwiki       refresh contrib/interwiki/intermap.txt (hg version control)
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>  import a moin 1.9 wiki/data instance from <dir>

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 Stylus and lessc to update theme CSS files
tests *         run tests, output to pytest.txt *options (-v -k my_test)
coding-std      correct scripts that taint the repository with trailing spaces..
api             update moin api docs (files are under hg version control)

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. The virtual environment must be activated before running these commands:

. activate    # Unix
activate      # Windows

If you invoke moin without any arguments, it will start the builtin server and you’ll have moin running! This is a shortcut for invoking moin moin.

moin --help will give a list of available subcommands.

moin <subcommand> --help will give help for some subcommand.

Example output of the moin –help command follows:

usage: moin [-c CONFIG] [-i] [-s] [-?]

positional arguments:
    moin                Runs the Flask development server i.e.
    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.

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

See also