MoinCMS is an Akara meta-service that allows you to use the MoinMoin wiki as a system for managing collections of semi-structured information. It makes it easy to express and extract metadata from wiki pages while still using the power of wikis to express regular prose and discussion.

In MoinCMS each wiki page is a resource, and usually represents collected information about some entity, person, place or thing. For example, in a system of biographies of people each page could provide information on one person, using shared formatting conventions into which you could encode metadata. If the person's name and birth date is always represented in a similar structural component, you can make it easy to extract this metadata across pages by expressing those structural components. This is similar to the idea of microformats in HTML, but using wiki makes it a little bit easier for people to write and edit such pages. The structural conventions for each resource type comprise a page template. The idea is to be as flexible as possible with page templates, to reduce the load of format conventions authors have to learn and remember.

MoinCMS is a framework to help set up such systems on Moin wikis. It is flexible in terms of what you do with the content and metadata. You could leave the content on the wiki and use the metadata to drive widgets to help navigation of the wiki. Or you could extract both content and metadata into formatted eternal documents or reports. You could use MoinCMS as a hub for annotations to enhance data pulled in and then pushed back out in the process of an extract-transform-load operation in Database management. The possibilities are pretty much endless.

MoinCMS comes with a simple example allowing you to author and publish Web sites, bundling a few useful resource templates for managing simple site folders and pages. See below for more information on this.

Basic conventions

At least one bit of metadata is required for every resource in order for it to be handled by MoinCMS. This is the resource type. The usual convention for providing the resource type is to have a top-level section somewhere in the document with the name "akara:metadata", and have within this a definition list with a key of akara:type. The following is a complete page example

One of my favorite poets is Ezra Pound

= akara:metadata =

 akara:type:: http://example.org/poetpaedia/poet

You can see the metadata section and the declared resource type. A resource type is always a URI, although you can satisfy this requirement by using a local wiki link (e.g. akara:type:: [[poet]]).

The resource type is used by MoinCMS to determine how to process the page. In setting up the CMS you connect resource types to transforms. In the above case there would be a transform module for "poetpaedia".

Clearly there's not much for a transform to do in the above case. The following is a more interesting example:

One of my favorite poets is Ezra Pound

= About Pound =

He was an American expatriate poet, critic and intellectual who was a major figure of the Modernist movement in the first half of the 20th century. He is generally considered the poet most responsible for defining and promoting a modernist aesthetic in poetry. The critic Hugh Kenner said of Pound upon meeting him: "I suddenly knew that I was in the presence of the center of modernism."

= poet:bio =

 poet:name:: Ezra Weston Loomis Pound
 poet:born:: 1885-10-30
 poet:died:: 1972-11-01
 poet:birthplace:: Hailey, ID
 poet:wikipedia:: http://en.wikipedia.org/wiki/Ezra_pound

= akara:metadata =

 akara:type:: http://example.org/poetpaedia/poet

Presumably there would be "poetpaedia" transforms to extract metadata from the poet:bio section. Note: there is a lot of flexibility. You could have the metadata definition list in a section named to your choosing. You could use a construct other than a definition list. It's all up to the template designer. One useful convention is to have all the more structured stuff in the akara:metadata section:

One of my favorite poets is Ezra Pound

= About Pound =

He was an American expatriate poet, critic and intellectual who was a major figure of the Modernist movement in the first half of the 20th century. He is generally considered the poet most responsible for defining and promoting a modernist aesthetic in poetry. The critic Hugh Kenner said of Pound upon meeting him: "I suddenly knew that I was in the presence of the center of modernism."

= akara:metadata =

 akara:type:: http://example.org/poetpaedia/poet
 poet:name:: Ezra Weston Loomis Pound
 poet:born:: 1885-10-30
 poet:died:: 1972-11-01
 poet:birthplace:: Hailey, ID
 poet:wikipedia:: http://en.wikipedia.org/wiki/Ezra_pound

The colon name approach is taken from XML namespaces as a simple way to reduce likely clashes. Please note that these are not at all the same thing as XML namespaces.

MoinCMS built-in example (web site templates)

The following types of resources are supported:

Folder

Page

A page is a resource that gets translated to a Web page. It includes header information and multiple chunks of HTML content which get optionally fed into an existing template.

The following is an example page resource:

##No akara:metadata section because the template implicitly understands this first section as such

 akara:type:: [[http://purl.org/dc/org/xml3k/akara/cms/folder|folder]]
 template:: http://wiki.example.com/Site;attachment=foo.xslt ##Just XSLT for now.  Plan to support other templating systems soon
 title:: A page
 link:: [[http://example.org|]] rel=...
 meta:: dc:Creator value=Uche Ogbuji
 script:: `...` ##preferably they'd only use linked scripts: [[myscript...]]

= chunk1 =

 Just some wiki text that by default gets translated to a div with id="chunk1"

 can use lower level headers here, too

== This becomes an H1 ==

= chunk2 =

 Ditto ... div with id="chunk2"














Dev notes

Converting Moin links to Docbook:

Internal Links

 * FrontPage
 * [[FrontPage]]
 * HelpOnEditing/SubPages
 * /SubPage
 * ../SiblingPage
 * [[FrontPage|named link]]
 * [[#anchorname]]
 * [[#anchorname|description]]
 * [[PageName#anchorname]]
 * [[PageName#anchorname|description]]
 * [[attachment:filename.txt]]

External Links

 * http://moinmo.in/
 * [[http://moinmo.in/]]
 * [[http://moinmo.in/|MoinMoin Wiki]]
 * [[http://static.moinmo.in/logos/moinmoin.png]]
 * {{http://static.moinmo.in/logos/moinmoin.png}}
 * [[http://static.moinmo.in/logos/moinmoin.png|moinmoin.png]]
 * MeatBall:InterWiki
 * [[MeatBall:InterWiki|InterWiki page on MeatBall]]
 * [[file://///servername/share/full/path/to/file/filename%20with%20spaces.txt|link to file filename with spaces.txt]]
 * user@example.com

becomes:

  <para>Internal Links </para>
  <itemizedlist>
    <listitem>
      <para>
        <ulink url="http://localhost:8080/FrontPage#">FrontPage</ulink> </para>
    </listitem>
    <listitem>
      <para>
        <ulink url="http://localhost:8080/FrontPage#">FrontPage</ulink> </para>
    </listitem>
    <listitem>
      <para>
        <ulink url="http://localhost:8080/HelpOnEditing/SubPages#">HelpOnEditing/SubPages</ulink> </para>
    </listitem>
    <listitem>
      <para>
        <ulink url="http://localhost:8080/Site/SubPage#">/SubPage</ulink> </para>
    </listitem>
    <listitem>
      <para>
        <ulink url="http://localhost:8080/SiblingPage#">../SiblingPage</ulink> </para>
    </listitem>
    <listitem>
      <para>
        <ulink url="http://localhost:8080/FrontPage#">named link</ulink> </para>
    </listitem>
    <listitem>
      <para>
        <link linkend="anchorname">#anchorname</link> </para>
    </listitem>
    <listitem>
      <para>
        <link linkend="anchorname">description</link> </para>
    </listitem>
    <listitem>
      <para>
        <ulink url="http://localhost:8080/PageName#anchorname">PageName#anchorname</ulink> </para>
    </listitem>
    <listitem>
      <para>
        <ulink url="http://localhost:8080/PageName#anchorname">description</ulink> </para>
    </listitem>
    <listitem>
      <para>
        <ulink url="http://localhost:8080/Site?action=AttachFile&amp;do=get&amp;target=filename.txt">filename.txt</ulink> </para>
    </listitem>
  </itemizedlist>
  <para>External Links </para>
  <itemizedlist>
    <listitem>
      <para>
        <ulink url="http://moinmo.in/"/> </para>
    </listitem>
    <listitem>
      <para>
        <ulink url="http://moinmo.in/"/> </para>
    </listitem>
    <listitem>
      <para>
        <ulink url="http://moinmo.in/">MoinMoin Wiki</ulink> </para>
    </listitem>
    <listitem>
      <para>
        <ulink url="http://static.moinmo.in/logos/moinmoin.png"/> </para>
    </listitem>
    <listitem>
      <para>
        <inlinemediaobject>
          <imageobject>
            <imagedata fileref="http://static.moinmo.in/logos/moinmoin.png"/>
          </imageobject>
          <textobject>
            <phrase>http://static.moinmo.in/logos/moinmoin.png</phrase>
          </textobject>
        </inlinemediaobject> </para>
    </listitem>
    <listitem>
      <para>
        <ulink url="http://static.moinmo.in/logos/moinmoin.png">moinmoin.png</ulink> </para>
    </listitem>
    <listitem>
      <para>
        <ulink url="http://www.usemod.com/cgi-bin/mb.pl?InterWiki#">InterWiki</ulink> </para>
    </listitem>
    <listitem>
      <para>
        <ulink url="http://www.usemod.com/cgi-bin/mb.pl?InterWiki#">InterWiki page on MeatBall</ulink> </para>
    </listitem>
    <listitem>
      <para>
        <ulink url="file://///servername/share/full/path/to/file/filename%20with%20spaces.txt">link to file filename with spaces.txt</ulink> </para>
    </listitem>
    <listitem>
      <para>
        <ulink url="mailto:user@example.com">user@example.com</ulink> </para>
    </listitem>
  </itemizedlist>

Akara/Services/MoinCMS (last edited 2009-09-15 15:32:17 by UcheOgbuji)