<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>HelpOnMoinCommand</title></articleinfo><section><title>moin</title><para>The <code>moin</code> command is installed when you used <code>setup.py</code>. If invoking from the shell prompt does not find the <code>moin</code> command, you can also customize and use <code>wiki/server/moin</code>. Look into that script, there are some pathes to configure. </para><para>E.g. if you only have one wiki or one wiki farm on your machine and you configure <code>sys.path</code> in the <code>moin</code> command script, you do not need to give <code>--config-dir=...</code> option with every invocation. </para><para>You can also setup logging there if you don't like the builtin logging configuration. </para><screen><![CDATA[Usage: moin [command] [general options] command subcommand [specific options]
]]><![CDATA[
Options:
  --version           show program's version number and exit
  -q, --quiet         Be quiet (no informational messages)
  --show-timing       Show timing values [default: False]
  --config-dir=DIR    Path to the directory containing the wiki configuration
                      files. [default: current directory]
  --wiki-url=WIKIURL  URL of a single wiki to migrate e.g.
                      http://localhost/mywiki/ [default: CLI]
  --page=PAGE         wiki page name [default: all pages]
]]><![CDATA[
]]><![CDATA[
FATAL ERROR: You must specify a command module and name:
]]><![CDATA[
moin ... account check ...
moin ... account create ...
moin ... account disable ...
moin ... account resetpw ...
]]><![CDATA[
moin ... cli show ...
]]><![CDATA[
moin ... export dump ...
]]><![CDATA[
moin ... import irclog ...
moin ... import wikipage ...
]]><![CDATA[
moin ... index build ...
]]><![CDATA[
moin ... maint cleancache ...
moin ... maint cleanpage ...
moin ... maint globaledit ...
moin ... maint makecache ...
moin ... maint mkpagepacks ...
moin ... maint reducewiki ...
]]><![CDATA[
moin ... migration data ...
]]><![CDATA[
moin ... server standalone ...
]]><![CDATA[
moin ... xmlrpc mailimport ...
moin ... xmlrpc remote ...
]]><![CDATA[
General options:
    Most commands need some general parameters before command subcommand:
    --config-dir=/config/directory
        Mandatory for most commands and specifies the directory that contains
        your wikiconfig.py (or farmconfig.py).
]]><![CDATA[
    --wiki-url=http://wiki.example.org/
        Mandatory for most commands and specifies the url of the wiki you like
        to operate on.
]]><![CDATA[
Specific options:
    Most commands need additional parameters after command subcommand.
]]><![CDATA[
    To obtain additonal help on a command use 'moin module subcommand --help']]></screen><para>example for a default instance </para><screen><![CDATA[moin --config-dir=/usr/share/moin/mywiki  --wiki-url=http://webserver/mywiki migration data ]]></screen><section><title>moin ... account check ...</title><screen><![CDATA[  --usersunique       Makes user names unique (by appending the ID to name and
                      email, disabling subscribed pages and disabling all, but
                      the latest saved user account); default is to SHOW what
                      will be happening, you need to give the --save option to
                      really do it.
  --emailsunique      Makes user emails unique; default is to show, use --save
                      to save it.
  --wikinames         Convert user account names to wikinames (camel-case).
  --lastsaved         Normally the account most recently USED will survive and
                      the others will be disabled. Using --lastsaved, the
                      account most recently SAVED will survive.
  --save              If specified as LAST option, will allow the other
                      options to save user accounts back to disk. If not
                      specified, no settings will be changed permanently.
  --removepasswords   Remove pre-1.1 cleartext passwords from accounts.]]></screen></section><section><title>moin ... account create ...</title><screen><![CDATA[  --name=NAME          Set the wiki user name to NAME.
  --alias=ALIAS        Set the wiki user alias name to ALIAS (e.g. the real
                       name if NAME is cryptic).
  --email=EMAIL        Set the user's email address to EMAIL.
  --password=PASSWORD  Set the user's password to PASSWORD.]]></screen></section><section><title>moin ... account disable ...</title><screen><![CDATA[  --uid=UID           Disable the user with user id UID.
  --name=NAME         Disable the user with user name NAME.]]></screen></section><section><title>moin ... account homepage ...</title><para>This tool allows you to create user homepages via a command line interface. </para><screen><![CDATA[  --name=username                selects the user for a homepage          
  --group=PageGroup              selects users for homepages by a group page
  --all-users                    selects all users
  --user=name                    name of the user to perform the homepage creation
  --template_page=PageTemplate   template page for the users homepage.]]></screen></section><section><title>moin ... account resetpw ...</title><screen><![CDATA[  --uid=UID           Reset the password of the user with user id UID to the given password
  --name=NAME         Reset the password of the user with user name to the given password]]></screen></section><section><title>moin ... cli show ...</title></section><section><title>moin ... export dump ...</title><screen><![CDATA[  --target-dir=/your/output/path Sspecify the directory we write the html files to.
  --username=JohnDoe             Name of the user to perform the dump with]]></screen><para>More information about dumping the wiki in <ulink url="https://wiki2.fysik.dtu.dk/nanotekar/HelpOnMoinCommand/nanotekar/HelpOnMoinCommand/ExportDump#">HelpOnMoinCommand/ExportDump</ulink>. </para></section><section><title>moin ... export package ...</title><screen><![CDATA[  -p PAGES, --pages=PAGES
                        Comma seperated list of pages to package.
  -o OUTPUT, --output=OUTPUT
                        Output file for the package.
  -s SEARCH, --search=SEARCH
                        Search string to match.
  -u PACKAGE_USER, --user=PACKAGE_USER
                        User as whom the package operation will be performed
                        as.]]></screen><para>To package all user created pages, do not specify --pages or --search. </para></section><section><title>moin ... import irclog ...</title><para>may be you need a dir with ircfiles </para></section><section><title>moin ... import wikipage ...</title><para>Imports the wiki page from given file into the wiki. </para><para><anchor id="index-build"/> </para></section><section><title>moin ... index build ...</title><para>Build the <ulink url="https://wiki2.fysik.dtu.dk/nanotekar/HelpOnMoinCommand/nanotekar/HelpOnXapian#">Xapian</ulink> search index. </para><para>To build your index the first time, execute: </para><screen><![CDATA[moin --config-dir=/where/your/configdir/is --wiki-url=wiki-url/ index build --mode=rebuild]]></screen><para>You can check the status of Xapian and its index on <ulink url="https://wiki2.fysik.dtu.dk/nanotekar/HelpOnMoinCommand/nanotekar/SystemInfo#">SystemInfo</ulink>. </para><para>Moreover, the following modes can be passed to the command above to control the building of the index: </para><screen><![CDATA[ --mode=buildnewindex build a separate, new index (but do not use it!)
 --mode=usenewindex   switch to the new index built by buildnewindex 
 --mode=rebuild       same as buildnewindex + usenewindex
 --mode=update        Updates every item in the index based on its last modification timestamp.]]></screen><para>Please note that moin updates the index if you add / modify / delete items using the wiki. Thus, it shouldn't be necessary to invoke &quot;rebuild&quot; except after changing xapian related configuration options. On the other hand, it is maybe not a bad idea either to use some wiki idle time (at late night, at sunday?) to do a periodic index rebuild, just for the case some index update didn't work, for whatever reason. </para></section><section><title>moin ... maint cleancache ...</title><para>removes cache files </para></section><section><title>moin ... maint cleanpage ...</title><para>create a Linux shell script that can be used (after reviewing it) to clean up in the data_dir. </para><para>It tries to classify the page directories into classes like trash and deleted and it will move those page dirs from their usual place to 2 directories (you have to create them!) trash and deleted. </para></section><section><title>moin ... maint cleansessions ...</title><para>This script allows you to clean up session files (usually used to maintain a &quot;logged-in session&quot; for http(s) or xmlrpc). </para><screen><![CDATA[ --name     remove sessions only for user NAME (default: all users)
 --all      remove all sessions (default: remove outdated sessions)]]></screen></section><section><title>moin ... maint globaledit ...</title><para>This is primarily for moin development use for globally editing pages in a wiki (we use it for streamlining ACLs and metadata on the master wiki). If you like to use it, please read the sourcecode first. </para></section><section><title>moin ... maint mailtranslators ...</title><para>For moin development use only (mails the translators to notify them e.g. about a new release). </para></section><section><title>moin ... maint makecache ...</title><para>creates cache files based on event-log and pagelinks </para></section><section><title>moin ... maint mkpagepacks ...</title><para>NEVER EVER RUN THIS ON A REAL WIKI!!! This must be run on a local testwiki </para></section><section><title>moin ... maint reducewiki ...</title><screen><![CDATA[moin --config-dir=/usr/share/moin/mywiki  --wiki-url=localhost/mywiki  maint reducewiki --target-dir=/tmp/target]]></screen></section><section><title>moin ... migration data ...</title><para>migrates data of pages to a newer version </para><screen><![CDATA[moin --config-dir=/usr/share/moin/mywiki  --wiki-url=http://wikiserver/mywiki migration data ]]></screen></section><section><title>moin ... server standalone ...</title><para>Starts the standalone server (and offers more options that just using ./wikiserver.py). </para><screen><![CDATA[# See there for more infos:
moin server standalone --help]]></screen></section><section><title>moin ... xmlrpc mailimport ...</title><para>e.g. </para><screen><![CDATA[# This is the configuration file for the mail import client
]]><![CDATA[
# This secret has to be known by the wiki server
mail_import_secret = u"foo"
]]><![CDATA[
# The target wiki URL
mail_import_url = u"http://localhost/?action=xmlrpc2"]]></screen></section><section><title>moin ... xmlrpc remote ...</title><para>needs a remotescriptconf.py </para></section></section></article>