1 = MoinLight = 2 3 MoinLight is a distribution of programs and libraries for working with content 4 encoded in the [[https://moinmo.in/|MoinMoin]] wiki markup format. This markup 5 format is generally concise and supports many kinds of HTML document features 6 using intelligible plain text representations. 7 8 ########## The graph below shows the architecture of the system... 9 10 {{{#!graphviz 11 #format svg 12 #transform notugly 13 digraph architecture { 14 node [shape=box,fontsize="13.0",fontname="Helvetica"]; 15 rankdir=LR; 16 17 subgraph { 18 rank=same; 19 input [label="Input context",URL="Input"]; 20 markup [label="Moin content",shape=folder,style=filled,fillcolor=cyan]; 21 } 22 23 parser [label="Parser",URL="Parsers"]; 24 25 subgraph { 26 rank=same; 27 tree [label="Document tree",shape=folder,style=filled,fillcolor=cyan]; 28 evaluation [label="Macro evaluation",shape=ellipse]; 29 } 30 31 serialiser [label="Serialiser",URL="Serialisers"]; 32 33 theme [label="Theme",URL="Themes"]; 34 35 subgraph { 36 rank=same; 37 output [label="Output context",URL="Output"]; 38 pages [label="Web content",shape=folder,style=filled,fillcolor=cyan]; 39 } 40 41 markup -> input -> parser -> tree -> evaluation -> tree -> serialiser -> 42 theme -> output -> pages; 43 } 44 }}} 45 46 ########## 47 48 Although it is obviously possible to use the MoinMoin software (hereafter 49 referred to as Moin) to work such such content, there are a few advantages in 50 developing independent tools instead: 51 52 * To eliminate any dependency on the Moin code, its bundled libraries, or on 53 its external dependencies (of which there are many for Moin 2.0) 54 55 * To focus on areas of functionality that are considered priorities, such as 56 the publishing of content as static Web sites, which may not be adequately 57 or optimally supported by Moin 58 59 * To provide other implementations of parsers and serialisers for the markup 60 format, thus establishing it as more genuinely interoperable markup 61 standard 62 63 * To be able to work with the content more easily and to develop tools for 64 doing so 65 66 == Getting Started == 67 68 To convert a collection of wiki pages in a directory (with `pages` containing 69 the original pages and `htdocs` being the desired output directory), run the 70 `moinconvert` program as follows: 71 72 {{{ 73 moinconvert --input-dir pages --output-dir htdocs --all 74 }}} 75 76 To convert a single file from such a collection (such as `FrontPage`), run the 77 program as follows: 78 79 {{{ 80 moinconvert --input-dir pages FrontPage 81 }}} 82 83 This will produce the serialised page on standard output rather than writing 84 it to a file. 85 86 Other options are typically useful when running the program, such as `--theme` 87 for styling and wrapping the output, `--macros` for expanding macros in 88 documents, and `--format` for choosing alternative output formats. 89 90 == Abstractions and Architecture == 91 92 MoinLight provides a number of abstractions for working with Moin wiki content: 93 94 * [[/Parsers]] interpret various forms of markup-related content, producing a 95 document tree representation that can be inspected and processed 96 97 * [[/Serialisers]] convert the document tree representation into other 98 content formats such as HTML or even back into Moin format 99 100 * [[/Themes]] augment serialised content with additional details and 101 resources 102 103 * [[/Macros]] define locations in documents where content is to be inserted 104 or expanded 105 106 * [[/Input]] contexts permit the interpretation of existing content in 107 certain ways so that a collection of text files can be treated like a wiki 108 109 * [[/Output]] contexts permit the publishing of content in certain 110 ways so that wiki content can be shared on the Web 111 112 A major objective with MoinLight is to be able to produce static files that 113 can be served using a typical Web server without any need for scripts, 114 applications or other kinds of dynamic content. Other objectives are described 115 in the [[/Roadmap]] document.