### Check Moin installation Source: https://github.com/moinwiki/moin/blob/master/docs/admin/install.md Verify that the 'moin' command is available after installation. ```bash moin --help ``` -------------------------------- ### Install Moin using a virtual environment Source: https://github.com/moinwiki/moin/blob/master/docs/admin/install.md Create a virtual environment and install Moin from PyPI. This method requires manual updates. ```bash -m venv cd source bin/activate # or "scripts\activate" on Windows pip install --pre moin ``` -------------------------------- ### Install Moin Extras Source: https://github.com/moinwiki/moin/blob/master/contrib/pythonanywhere/_README.txt Install additional components or dependencies for Moin. ```bash ./m extras ``` -------------------------------- ### Install Moin2 using quickinstall.py Source: https://github.com/moinwiki/moin/blob/master/contrib/pythonanywhere/_README.txt Run the quickinstall script to install Moin2. Ensure you use a compatible Python version (e.g., 3.7 or later). ```bash python3.7 quickinstall.py # or any later version ``` -------------------------------- ### Test Moin Installation and Basic Usage Source: https://github.com/moinwiki/moin/blob/master/docs/devel/development.md Set up a new virtual environment, install Moin from a pre-release, and perform basic instance creation and content loading to verify functionality. ```shell -m venv cd source bin/activate # or "scripts\activate" on windows pip install --pre moin moin --help # prove it works # update wikiconfig.py # default allows read-only, admins may load data moin create-instance --path # path optional, defaults to CWD cd # skip if using default CWD moin index-create moin welcome # load welcome page (e.g. Home) moin load-help -n help-en # load English help moin load-help -n help-common # load help images moin run # wiki with English help and welcome pages ``` -------------------------------- ### Install Dependencies and Build Theme CSS Source: https://github.com/moinwiki/moin/blob/master/contrib/css-build/README.md Installs project dependencies and compiles the theme's SCSS file into theme.css. Ensure Node.js and npm are installed. ```bash $ npm install && npm run build ``` -------------------------------- ### Install Selenium Source: https://github.com/moinwiki/moin/blob/master/_ui_tests/README.txt Install the Selenium library using pip. This is a prerequisite for running the functional tests. ```bash pip install selenium ``` -------------------------------- ### Install Moin into a virtual environment from PyPI Source: https://github.com/moinwiki/moin/blob/master/docs/admin/install.md Install Moin into a virtual environment from PyPI. Manual updates are required for this method. ```bash -m venv cd source bin/activate # or "scripts\activate" on Windows pip install moin ``` -------------------------------- ### Filesystem Store URI Example Source: https://github.com/moinwiki/moin/blob/master/docs/admin/configure.md Example URI format for specifying a filesystem store, including placeholders for backend and kind (meta/data). ```text stores:fs:/srv/mywiki/%(backend)s/%(kind)s ``` -------------------------------- ### MoinWiki Ordered List Starting Point Markup Source: https://github.com/moinwiki/moin/blob/master/docs/user/moinwiki.md Demonstrates how to specify a starting number or letter for MoinWiki ordered lists using the '#' symbol followed by the desired starting value. ```default 1.#11 eleven 1. twelve i.#11 roman numeral xi 1. thirteen A.#11 letter K A. letter J ``` -------------------------------- ### Install Release Tools Source: https://github.com/moinwiki/moin/blob/master/docs/devel/development.md Install or upgrade essential Python packaging and distribution tools required for building and uploading Moin releases. ```shell pip install --upgrade setuptools wheel pip install --upgrade twine pip install --upgrade build ``` -------------------------------- ### Install Moin using system package manager Source: https://github.com/moinwiki/moin/blob/master/docs/admin/install.md Install Moin using your distribution's package manager. This is the recommended method for automatic updates. ```bash apt install moin ``` -------------------------------- ### Install MoinWiki Dependencies Source: https://github.com/moinwiki/moin/blob/master/docs/devel/development.md Create a virtual environment and download necessary packages using the quickinstall script. This command should be run from the root of your cloned repository. ```bash python quickinstall.py ``` -------------------------------- ### MoinWiki Transclusion Syntax Example Source: https://github.com/moinwiki/moin/blob/master/docs/user/moinwiki.md Basic syntax for transcluding content, including an example with optional alternate text and parameters for styling. ```default {{||}} {{bird.jpg|rare yellow bird|class=center}} ``` -------------------------------- ### Install Additional Developer Tools Source: https://github.com/moinwiki/moin/blob/master/docs/devel/development.md Use this command to install extra software required for development. This is a general-purpose command for managing development dependencies. ```bash ./m extras # Windows: m extras ``` -------------------------------- ### Include Macro Examples Source: https://github.com/moinwiki/moin/blob/master/docs/user/moinwiki.md Demonstrates the Include macro for embedding content, supporting regex and specific headings. ```MoinWiki <> ``` ```MoinWiki <> ``` -------------------------------- ### Create MoinWiki Instance Source: https://github.com/moinwiki/moin/blob/master/docs/devel/development.md Create a new wiki instance and load essential help data and welcome pages. The '--full' flag ensures a comprehensive setup. ```bash moin create-instance --full ``` -------------------------------- ### FootNote Macro Examples Source: https://github.com/moinwiki/moin/blob/master/docs/user/moinwiki.md Shows how to create and explicitly place footnotes using the FootNote macro. ```MoinWiki <> ``` ```MoinWiki <> ``` -------------------------------- ### Run Moin wiki instance with built-in server Source: https://github.com/moinwiki/moin/blob/master/docs/admin/install.md Start your Moin wiki instance using the built-in Python web server. Visit the URL provided in the logs. ```bash moin run ``` -------------------------------- ### Clone Moin Repository Source: https://github.com/moinwiki/moin/blob/master/contrib/pythonanywhere/_README.txt Clone the Moin repository to your local machine. This is the first step in the installation process. ```bash git clone https://github.com/moinwiki/moin # or clone your own github repo ``` -------------------------------- ### SQLite Store URI Examples Source: https://github.com/moinwiki/moin/blob/master/docs/admin/configure.md Examples of URIs for configuring the direct SQLite store, which stores data in a single file. These URIs specify the database file path, optional table names, and compression settings. ```text stores:sqlite:/srv/mywiki/data/mywiki_%(nsname)s_%(kind)s.db stores:sqlite:/srv/mywiki/data/mywiki_%(nsname)s.db::%(kind)s stores:sqlite:/srv/mywiki/data/mywiki_%(nsname)s.db::%(kind)s::1 ``` -------------------------------- ### Internal Link Markup Examples Source: https://github.com/moinwiki/moin/blob/master/docs/user/rest.md Demonstrates different markup syntaxes for internal links in MoinWiki and their resulting output. These examples cover linking to items in the default, specified, and current namespaces, as well as linking to subitems and fragments. ```WikiMarkup Home_ ``` ```WikiMarkup `users/Home`_ ``` ```WikiMarkup `../moin`_ ``` ```WikiMarkup `../moin#Linking`_ ``` ```WikiMarkup `/Subitem Example`_ ``` -------------------------------- ### Run MoinMoin Built-in Server Source: https://github.com/moinwiki/moin/blob/master/docs/admin/serve.md Use this command to start the development server. It's suitable for debugging and personal wikis. For custom configurations, specify the configuration file, host, and port. ```bash moin run ``` ```bash MOINCFG='/path/to/wikiconfig.py' moin run --host 1.2.3.4 --port 7777 ``` -------------------------------- ### Ordered Lists in MoinMoin Markup Source: https://github.com/moinwiki/moin/blob/master/docs/user/markdown.md Shows how to create ordered lists using numbers. While any starting number is accepted, starting with 1 is best practice. Nested lists are also demonstrated. ```default 1. apples 1. oranges 7. pears 1. carrot 1. beet 1. man 1. woman 1. turnip 1. cherries ``` -------------------------------- ### SQLAlchemy Store URI Examples Source: https://github.com/moinwiki/moin/blob/master/docs/admin/configure.md Examples of URIs for configuring the SQLAlchemy store, which allows storing data in various SQL databases. Different formats support different database backends and table naming conventions. ```text stores:sqla:sqlite:////srv/mywiki/data/mywiki_%(nsname)s_%(kind)s.db stores:sqla:sqlite:////srv/mywiki/data/mywiki_%(nsname)s.db::%(kind)s stores:sqla:mysql://myuser:mypassword@localhost/mywiki_%(nsname)s::%(kind)s stores:sqla:postgres://myuser:mypassword@localhost/mywiki_%(nsname)s::%(kind)s ``` -------------------------------- ### MoinMoin PyPI Installation Structure Source: https://github.com/moinwiki/moin/blob/master/docs/admin/configure.md This structure is observed after installing MoinMoin from PyPI or unpacking it using a package manager. It shows the virtual environment layout. ```default myvenv/ # virtualenv root bin/ # Windows calls this directory Scripts include # Windows calls this directory Include lib/ # Windows calls this directory Lib, includes moin package ``` -------------------------------- ### Activate Virtual Environment Source: https://github.com/moinwiki/moin/blob/master/contrib/pythonanywhere/_README.txt Activate the Python virtual environment created during the installation. ```bash . activate ``` -------------------------------- ### FontAwesome Macro Examples Source: https://github.com/moinwiki/moin/blob/master/docs/user/moinwiki.md Illustrates using the FontAwesome macro with different parameters for icons, colors, and sizes. ```MoinWiki <> ``` ```MoinWiki <> ``` ```MoinWiki <> ``` ```MoinWiki <> ``` -------------------------------- ### Create Basic Tables in MediaWiki Source: https://github.com/moinwiki/moin/blob/master/docs/user/mediawiki.md Construct tables using `{|` to start, `|-` for new rows, and `|` for data cells. The table is closed with `|}`. ```default {| |row 1, column 1 |row 1, column 2 |- ``` ```default |row 2, column 1 |row 2, column 2 |} ``` -------------------------------- ### Sample logging.conf for Debug Logging Source: https://github.com/moinwiki/moin/blob/master/docs/admin/configure.md An example INI-formatted configuration file to enable debug-level logging for Moin. This file defines loggers, handlers, and formatters. ```ini [loggers] keys=root,cspreport [handlers] keys=console,cspreport [formatters] keys=default,simple [logger_root] level=DEBUG handlers=console,cspreport [logger_cspreport] level=INFO handlers=cspreport propagate=0 qualname=cspreport [handler_console] class=StreamHandler level=DEBUG formatter=default args=(sys.stderr,) [handler_cspreport] class=FileHandler level=NOTSET formatter=simple args=('cspreport.log', 'w') [formatter_default] format=%(asctime)s - %(levelname)s - %(name)s - %(message)s [formatter_simple] format=%(asctime)s %(message)s datefmt= ``` -------------------------------- ### Run Moin with Debugger Enabled Source: https://github.com/moinwiki/moin/blob/master/docs/devel/development.md Command to start the built-in Werkzeug debugger for Moin. Use only in secure environments. ```bash moin run --debug ``` -------------------------------- ### MoinWiki Link with Parameters Source: https://github.com/moinwiki/moin/blob/master/docs/user/moinwiki.md Example of a MoinWiki link with parameters to open in a new tab and display a title on hover. ```text * [[ItemName|my favorite item|target=_blank,title="Go There!"]] ``` -------------------------------- ### Activate Virtual Environment Source: https://github.com/moinwiki/moin/blob/master/docs/devel/development.md Activate the created virtual environment to use the installed MoinWiki packages. The command differs slightly between Windows and other operating systems. ```bash . activate # Windows: activate ``` -------------------------------- ### Interactive Mode Notice for Programs Source: https://github.com/moinwiki/moin/blob/master/docs/intro/license.md This is a sample notice to be displayed when a program starts in interactive mode. It informs users about the version, warranty, and redistribution conditions. ```text Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. ``` -------------------------------- ### Configure ConfigDicts Backend Source: https://github.com/moinwiki/moin/blob/master/docs/admin/configure.md Defines dictionaries directly in the configuration file, disabling WikiDicts. This example creates OneDict and NumbersDict. ```python def dicts(self): from moin.datastructures import ConfigDicts dicts = {'OneDict': {'first_key': 'first item', 'second_key': 'second item'}, 'NumbersDict': {'1': 'One', '2': 'Two'}} return ConfigDicts(dicts) ``` -------------------------------- ### MonthCalendar Macro Examples Source: https://github.com/moinwiki/moin/blob/master/docs/user/moinwiki.md Illustrates using the MonthCalendar macro to display calendars for the current or specified months and years. ```MoinWiki <> ``` ```MoinWiki <> ``` ```MoinWiki <> ``` ```MoinWiki <> ``` ```MoinWiki <> ``` ```MoinWiki <> ``` -------------------------------- ### Basic ACL Syntax Example Source: https://github.com/moinwiki/moin/blob/master/docs/admin/configure.md Demonstrates the basic syntax for an ACL string, showing space-separated entries where each entry is a colon-separated list of users/groups and their rights. The order of entries is important for processing. ```default "SuperMan,WonderWoman:read,write,create,destroy,admin All:read,write" ``` -------------------------------- ### Configure ConfigGroups Backend Source: https://github.com/moinwiki/moin/blob/master/docs/admin/configure.md Defines groups directly in the configuration file, disabling WikiGroups. This example creates an EditorGroup and an AdminGroup. ```python def groups(self): from moin.datastructures import ConfigGroups groups = {'EditorGroup': ['AdminGroup', 'John', 'JoeDoe', 'Editor1'], 'AdminGroup': ['Admin1', 'Admin2', 'John']} return ConfigGroups(groups) ``` -------------------------------- ### Install Pre-commit Hooks Source: https://github.com/moinwiki/moin/blob/master/docs/devel/development.md Set up Git pre-commit hooks to automatically format code and check for issues before committing. This ensures code consistency and quality. ```bash pre-commit install ``` -------------------------------- ### Create Sample Wiki Source: https://github.com/moinwiki/moin/blob/master/contrib/pythonanywhere/_README.txt Set up a sample wiki or a new empty wiki. ```bash ./m sample # or "./m new-wiki" for empty wiki ``` -------------------------------- ### Field List Markup Example Source: https://github.com/moinwiki/moin/blob/master/docs/user/rest.md Illustrates the syntax for field lists in RestructuredText, used for key-value mappings. Field bodies can start on the same or next line. ```rst :Version: 2.0b2 :Release Date: 2001-08-16 :Authors: - Joe Doe - Erika Mustermann - Jan Kowalski ``` -------------------------------- ### Add MathJax XStatic Package Source: https://github.com/moinwiki/moin/blob/master/docs/admin/configure.md Example of adding the XStatic-MathJax package for rendering math formulas. This involves installing the package, updating mod_names, and modifying snippets.html. ```html {% macro scripts() -%} {%- endmacro %} ``` -------------------------------- ### Include Macro Examples Source: https://github.com/moinwiki/moin/blob/master/docs/user/creolewiki.md The Include macro embeds content from other pages or files. It supports multiple parameters, regex for the first parameter, and optional heading/level parameters. ```wiki <> embeds all wiki items starting with zi. ``` ```wiki <> ``` -------------------------------- ### Definition List Markup Example Source: https://github.com/moinwiki/moin/blob/master/docs/user/rest.md Shows how to create definition lists by indenting a description below a term in RestructuredText. Classifiers can be appended to terms. ```rst term Description term 2 : classifier Optional *classifiers* may be appended to the term. ``` -------------------------------- ### MoinWiki Comment Markup Example Source: https://github.com/moinwiki/moin/blob/master/docs/user/moinwiki.md Demonstrates how to add comments to a MoinWiki page using different syntaxes. Lines starting with '##' are for editors, and '/* */' or '{{{#!wiki comment }}}' blocks can be toggled by users. ```default ## Lines starting with "##" may be used to give instructions ## to future page editors. Click on the "Comments" button within Item Views to toggle the /* comments */ visibility. {{{#!wiki comment/dashed This is a wiki parser section with class "comment dashed". Its visibility gets toggled by clicking on the comments button. }}} ``` -------------------------------- ### Configure Markdown Extensions in Python Source: https://github.com/moinwiki/moin/blob/master/docs/user/markdown.md Example of configuring Markdown extensions in a Python configuration class, specifically enabling URL auto-linking. ```python class Config(DefaultConfig): ... markdown_extensions = ['pymdownx.magiclink'] ``` -------------------------------- ### Create a new wiki instance Source: https://github.com/moinwiki/moin/blob/master/docs/admin/install.md Create a new instance directory to store wiki data, indexes, and configuration. ```bash moin create-instance --path INSTANCE-DIRECTORY ``` -------------------------------- ### Install Sass for CSS Updates Source: https://github.com/moinwiki/moin/blob/master/docs/devel/development.md Install the Sass preprocessor globally using npm. This is necessary for updating CSS files in the Basic theme. Ensure Node.js and npm are installed first. ```bash sudo npm install -g sass # Windows: npm install -g sass ``` ```bash sass --version # show version number to prove it works ``` -------------------------------- ### Create Moin Instance and Index Source: https://github.com/moinwiki/moin/blob/master/docs/admin/upgrade.md Before importing, ensure you have created a Moin 2 instance and index. These commands set up the basic structure for your new wiki. ```bash moin create-instance moin index-create ``` -------------------------------- ### Regular Expression Search for Start of Word Source: https://github.com/moinwiki/moin/blob/master/docs/user/search.md Use regular expressions to match words starting with a specific pattern. '^' anchors the match to the beginning of the string, and '\A' also anchors to the start. ```text r"^foo" r"\Afoo" ``` -------------------------------- ### Build Moin Documentation Source: https://github.com/moinwiki/moin/blob/master/contrib/pythonanywhere/_README.txt Generate the documentation for Moin. ```bash ./m docs ``` -------------------------------- ### Markdown Note Admonition Example Source: https://github.com/moinwiki/moin/blob/master/docs/user/markdown.md An example of a 'note' type admonition in Markdown. The title is automatically capitalized. ```default !!! note You should note that the title will be automatically capitalized. ``` -------------------------------- ### Navigate to instance directory Source: https://github.com/moinwiki/moin/blob/master/docs/admin/install.md Change the current directory to the newly created instance directory. ```bash cd INSTANCE-DIRECTORY ``` -------------------------------- ### Example reStructuredText Table Source: https://github.com/moinwiki/moin/blob/master/docs/user/rest.md This is a commented-out example of a reStructuredText table with specified width, column widths, and alignment. It demonstrates basic table structure. ```rst .. table:: :width: 7em :widths: 1 4 :align: right ==== === A B ==== === 11 c 21 b 31 a ==== === ``` -------------------------------- ### Load welcome page and help content Source: https://github.com/moinwiki/moin/blob/master/docs/admin/install.md Load the default welcome page and English help content for editors. ```bash moin welcome moin load-help -n help-en moin load-help -n help-common ``` -------------------------------- ### Create Empty Wiki for Restore Source: https://github.com/moinwiki/moin/blob/master/docs/admin/backup.md Before loading a backup, create an empty wiki structure. This command initializes the necessary index for the restore process. ```bash moin index-create ``` -------------------------------- ### Basic Image Syntax Source: https://github.com/moinwiki/moin/blob/master/docs/user/mediawiki.md Use this syntax to display an image with default settings. No special options are required. ```wiki [[File:||]] ``` -------------------------------- ### Level 2 Heading Example Source: https://github.com/moinwiki/moin/blob/master/docs/user/rest.md The second unique heading style encountered is assigned to level 2. This example shows the markup for a level 2 heading. ```rst Level 2 ======= ``` -------------------------------- ### Load Help Docs for Moin Wiki Source: https://github.com/moinwiki/moin/blob/master/docs/devel/development.md Wiki administrators use these commands to load help documentation into the wiki. The `--namespace` argument specifies the set of help files to load. ```bash moin load-help --namespace help-common # images common to all languages ``` ```bash moin load-help --namespace help-en # English text ``` -------------------------------- ### Moin CLI Help Overview Source: https://github.com/moinwiki/moin/blob/master/docs/man/moin.md Displays a detailed overview of Moin CLI commands and options. Use this to understand the full range of available functionalities. ```default 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 ``` -------------------------------- ### Generate Local Documentation Source: https://github.com/moinwiki/moin/blob/master/docs/devel/development.md Build the project's documentation locally. This command is useful for previewing documentation changes. ```bash ./m docs # Windows: m docs ``` -------------------------------- ### Tip Admonition Source: https://github.com/moinwiki/moin/blob/master/docs/user/rest.md Use the 'tip' directive for useful advice. Requires no special setup. ```text .. tip:: Be consistent. ``` -------------------------------- ### Navigate to Moin Directory Source: https://github.com/moinwiki/moin/blob/master/contrib/pythonanywhere/_README.txt Change the current directory to the cloned moin repository. ```bash cd moin ``` -------------------------------- ### Attention Admonition Source: https://github.com/moinwiki/moin/blob/master/docs/user/rest.md Use the 'attention' directive to highlight important information. Requires no special setup. ```text .. attention:: Mind the gap! ``` -------------------------------- ### MoinWiki Horizontal Rule Markup Source: https://github.com/moinwiki/moin/blob/master/docs/user/moinwiki.md Create a horizontal rule by starting a line with four or more hyphen characters. ```default Text ---- Text ``` -------------------------------- ### MoinMoin Cloned Repository Structure Source: https://github.com/moinwiki/moin/blob/master/docs/admin/configure.md This structure is observed after cloning the MoinMoin repository and running the quickinstall.py script. It includes directories for documentation, source code, and the default wiki instance. ```default moin/ # clone root, default name contrib/ # scripts and docs of interest to developers docs/ # moin documentation in restructured text (.rst) format _build/ html/ # local copy of moin documentation, created by running "./m docs" command requirements.d/ # package requirements used by quickinstall.py scripts/ # misc. scripts of interest to developers src/ moin/ # large directory containing moin application code wiki/ # the wiki instance; created by running "./m new-wiki" or "moin create-instance" commands data/ # wiki data and metadata index/ # wiki indexes wiki_local/ # a convenient location to store custom CSS, JavaScript, templates, logos, etc. wikiconfig.py # main configuration file, modify this to add or change features intermap.txt # interwiki map: copied by quickinstall.py, updated by "./m interwiki" ``` -------------------------------- ### View All Import Options Source: https://github.com/moinwiki/moin/blob/master/docs/admin/upgrade.md To see a comprehensive list of all available options for the import19 command, use the --help flag. ```bash moin import19 --help ``` -------------------------------- ### Fenced Code Block Markup Source: https://github.com/moinwiki/moin/blob/master/docs/user/markdown.md Use lines starting with three tildes (~) to fence a block of preformatted code. ```default ~~~ ddd eee fff ~~~ ``` -------------------------------- ### Create Nested Blockquotes in Markdown Source: https://github.com/moinwiki/moin/blob/master/docs/user/markdown.md Nest blockquotes by starting subsequent lines with additional '>' characters. Each '>' indents the text further. ```default > A standard blockquote is indented > > A nested blockquote is indented more > > > You can nest to any depth. ``` -------------------------------- ### Import Moin 1.9 Data Source: https://github.com/moinwiki/moin/blob/master/docs/admin/upgrade.md Use this command to import your existing Moin 1.9 data. Replace '//wiki/data' with the actual path to your Moin 1.9 data directory. This utility converts and writes data to your Moin 2 storage and builds the index. ```bash moin import19 --data_dir //wiki/data ``` -------------------------------- ### Ordered List Markup Source: https://github.com/moinwiki/moin/blob/master/docs/user/creolewiki.md Use '#' at the start of lines to create ordered lists. The number of '#' determines the nesting level. ```default # First item # Second item ## First item (second level) ## Second item (second level) ### First item (third level) # Third item ``` -------------------------------- ### Access Translated Strings in JavaScript Source: https://github.com/moinwiki/moin/blob/master/docs/devel/development.md Example of accessing a translated string within JavaScript code using the '_' function. ```javascript var a = _("Delete this"); ``` -------------------------------- ### Initial Shared Index Building for Wiki Farm Source: https://github.com/moinwiki/moin/blob/master/docs/admin/index.md Commands to perform the initial build of a shared index for a wiki farm. First, create an empty shared index, then build the index using the configuration of each individual wiki. ```bash moin index-create # create an empty index # now add the indexes from both other wikis: moin index-build # with Sales wiki configuration moin index-build # with Engineering wiki configuration ``` -------------------------------- ### Import Moin 1.9 wiki data Source: https://github.com/moinwiki/moin/blob/master/docs/admin/install.md Convert a Moin 1.9 wiki to Moin 2 format by specifying the path to the 1.9 data directory. ```bash moin import19 -d ``` -------------------------------- ### Unordered List Markup Source: https://github.com/moinwiki/moin/blob/master/docs/user/creolewiki.md Use '*' at the start of lines for unordered lists. Nested lists can be created using additional '*' characters. ```default * List item * List item ** List item (second level) *** List item (third level) * List item ``` -------------------------------- ### Run Scrapy Crawler (Custom URL) Source: https://github.com/moinwiki/moin/blob/master/src/moin/cli/_tests/scrapy/README.rst Execute the Scrapy crawler with a specified starting URL and log the output to crawl.log. ```bash # to specify another url starting point scrapy crawl -a url='https://my.wikihost.com/wiki_root/' ref_checker 2>&1 | tee crawl.log ``` -------------------------------- ### Configure Wiki for Shared Index Storage Source: https://github.com/moinwiki/moin/blob/master/docs/admin/index.md Example configuration for two farm wikis, 'Sales' and 'Engineering', to use a shared index. Both wikis are configured to use the same 'FileStorage' path for their index. ```ini interwikiname = "Sales" index_storage = 'FileStorage', ("/path/to/moin-2.0/wiki/index", ), {} ``` ```ini interwikiname = "Engineering" index_storage = 'FileStorage', ("/path/to/moin-2.0/wiki/index", ), {} ``` -------------------------------- ### Transclude External Image Source: https://github.com/moinwiki/moin/blob/master/docs/user/moinwiki.md Embed an image from an external URL. The example shows an image aligned left without floating. ```default {{https://static.moinmo.in/logos/moinmoin.png}} ``` -------------------------------- ### MoinMoin Instance Structure after create-instance Source: https://github.com/moinwiki/moin/blob/master/docs/admin/configure.md This structure is created by the 'moin create-instance' command. It represents a single wiki instance, which can be run using the built-in server by navigating to this directory and executing 'moin run'. ```default mywiki/ # wikiconfig dir, use this as CWD for moin commands wiki/ # the wiki instance; created by `moin create-instance` data/ # wiki data and metadata index/ # wiki indexes preview/ # text item backups are created when user clicks edit Preview button sql/ # SQLite database used for edit locking wiki_local/ # store custom CSS, JavaScript, templates, logos, etc. here wikiconfig.py # main configuration file, modify this to add or change features intermap.txt # list of external wikis used in wikilinks: [[MeatBall:InterWiki]] ``` -------------------------------- ### Update Translation Files Source: https://github.com/moinwiki/moin/blob/master/docs/devel/translate.md Use this command to update translation files for a specific locale. Ensure you have Python, setuptools, and babel installed. ```bash pybabel update -l -i src/moin/translations/MoinMoin.pot \ -d src/moin/translations/ -w 116 ``` -------------------------------- ### Test GitHub Package Release via Git Clone Source: https://github.com/moinwiki/moin/blob/master/docs/devel/development.md Install Moin directly from a Git repository tag into a new virtual environment to test the GitHub release. This includes instance creation and content loading. ```shell -m venv cd source bin/activate # or "scripts\activate" on windows pip install git+https://github.com/moinwiki/moin@2.0.0a1 moin --help # prove it works # update wikiconfig.py # default allows read-only, admins may load data moin create-instance --path # path optional, defaults to CWD cd # skip if using default CWD moin index-create moin welcome # load welcome page (e.g. Home) moin load-help -n help-en # load English help moin load-help -n help-common # load help images moin run # wiki with English help and welcome pages ``` -------------------------------- ### Create Tables with Headers in MediaWiki Source: https://github.com/moinwiki/moin/blob/master/docs/user/mediawiki.md Define table headers using `!` at the start of a row or cell. Data cells are defined using `|`. ```default {| !header 1 !header 2 |- ``` ```default |A |B |- ``` ```default |C |D |} ``` -------------------------------- ### Markdown with Inline HTML Examples Source: https://github.com/moinwiki/moin/blob/master/docs/user/markdown.md Demonstrates how to use various inline HTML tags for formatting text, including superscripts and styled elements. The rendering of 'style' attributes depends on server configuration. ```default E = MC2 This word is bold. This word is italic. This word is bold. This word is bold; colors depend upon configuration settings. ```