MoinMoin Customizations

This site is built using MoinMoin wiki software, with a number of customizations and hacks.

MoinMoin

The core MoinMoin software provides the following useful features:

  • Multilingual interface, including Mongolian internationalization.
  • Open source and extensible.
  • Simple, plain-text editing syntax.
  • Ability to edit documents offline, and later synchronize these with a server. This works on low-cost netbook-type mobile internet devices running Windows CE, acquired in bulk from a Chinese manufacturer.

  • Multiple export formats. Multimedia documents can be viewed in wiki-text, HTML, OpenOffice (ODF), and PDF formats (using extensions), for online or offline distribution. It is also possible to access multimedia documents using a mobile phone.

  • Possibility of subscribing to and commenting on articles and documents by email.
  • Pages for commentary and discussion; users can submit a comment simply by pressing a button.
  • Simple security mechanism based on knowledge-related questions (CAPTCHAs).
  • Group-level access controls.

Highlights

This project website introduces the following extensions to the basic MoinMoin code:

  • A macro for embedding Theora videos, providing timed text subtitles from an accompanying SubRip file and dynamic links to help, download, and transcript pages, with English and Mongolian localization (see /Theora.py)

  • Revised and additional Mongolian translations of system messages
  • New design featuring user-friendly icons for links, a customizable quicklinks menu, and contextual help links
  • Linux and Unix-compatible offline editor, providing syntax highlighting, editing of multiple documents in tabs, search-and-replace, and other functions
  • Scripts for creating a gallery of images with embedded metadata and different sizes of thumbnails (/thumbs.sh), and html slideshow (/slideshow.sh). The scripts print embedded descriptions that can be prepared using gThumb or similar editor.

  • Scripts for converting and packaging videos and accompanying files (streamable Theora-encoded videos with embedded metadata, thumbnails, description pages, blank transcript files) (VideoCookbook/convertvideos.sh)

  • Updated theme for dumping static HTML files (MoinMoin/script/export/dump.py), to be used in distributing hypermedia on CD/DVD-ROM or flash disks (/dump.py, DumpConfiguration)

  • Created SRT -> HTML parser that creates hyperlinks to capitalized terms in the subtitles file (these are not automatically found by the "linkto:" search, but can be located using Xapian search)

See also HelpOnGreasemonkeyScripts.

Custom actions

localedit

Opens the page text for editing in a new tab in a local text editor. Unlike the web-based editor, this allows for syntax highlighting, automatic saving, and external tools to operate on the text (word count, autocompletion, find-and-replace, etc.). Only available in Desktop mode. (/localedit.py)

Bibliography

Creates a bibliography containing references cited on the given page, including the formatted and sorted contents of any pages corresponding to the AuthorDate citations. If called with the parameter &format=raw the bibliography will consist of unformatted text (BibTeX references). (/Bibliography.py)

CheckCitations

Gives a table listing all the citations from the page in alphabetical order. For missing references, links are given to create appropriate entries using available BibTeX templates. (/CheckCitations.py)

AttachFile

The built-in attachment action is rewritten to provide support for multi-directory ZIP files, which can be extracted to the static directory, and navigated using a hyperlinked index on the attachment "view" page. This functionality is intended for use with interlinked documents--such as a web page with embedded images--allowing these to be viewed online without having to be downloaded and extracted first. Playback of Ogg+Theora videos with subtitles on the "view" page is also enabled. Additionally, the ACL right "viewattachment" is checked before allowing a user to view or download an attachment; this way a description page can be publicly accessible whereas attached media require additional permissions (e.g., in the case of copyrighted documents that are stored for private use). The standard directive for a protected page will be #acl Default -All:viewattachment, where the "Default" permissions (defined in wikiconfig) are Known:read,write,viewattachment or Known:read,write TrustedGroup:viewattachment. (/AttachFile.py)

supplementation

Introduces a forum-type interface. Comments are stored in individual subpages labelled C{timestamp}UserName, which can be sorted by date and author. Comments are listed by default from oldest to newest, ten to a page, but the sorting and paging options can be modified through url parameters (see source code for details). A list view is also available. Each comment is accompanied by the poster's name and avatar, taken if available from Username/avatar.jpg. Since author names and post dates are encoded in the comment pagename, forum display survives synchronization between different MoinMoin wikis. (/supplementation.py)

Parsers

text_moin_wiki

Modified to provide extended, unbracketed link syntax for (1) upper-case words (used here for glossary terms), (2) usernames with @ symbols (used here to avoid collisions in interwiki synchronization), and (3) author-date citations. (/text_moin_wiki.py)

text_bibtex

This is an updated version of the "Simple BibTeX" parser, slightly modified to work with moin 1.9 and with support for @inbook and listing of editors. Formatting changes include removal of empty links to titles where no URL is given. (/text_bibtex.py)

text_srt

Wraps SubRip files in a preformatting element for display. (/text_srt.py)

Macros

IncludeComments

Used by the revised supplementation page action. This is a hacked version of the Include macro, providing forum-type display of included pages. (/IncludeComments.py)

Theora

Embeds a video player for Ogg Theora files, which will also play SRT subtitles in an area below the video player. This macro requires additional javascript to be installed to provide subtitle presentation. Ogg.js and Cortado.jar, if installed, will provide fallback for browsers that do not offer native Ogg Theora playback. (/Theora.py)

RecentVideos

Creates a list of OGV videos, using thumbnails from the attachment directories in which the videos are stored. (/RecentVideos.py)

RecentChanges

Provides a list of recent changes based on revision and description metadata embedded within the raw wiki text, in the format #pragma  revision [EditorName dd-mm-YYYY] Edit summary... and #pragma description Description text.... The localedit action includes code to add a revision metadata line with the author's name and date to the top of each new document revision, which can be completed manually on editing. Comments must be listed in reverse chronological order at the top of the document. By using embedded metadata we are able to retain revision histories (with author names) on synchronization and merging between different MoinMoin instances, without necessarily having access to every single revision in all branches. If necessary revision metadata can be pruned to the most recent 4-5 revisions.

PageIndex

Lists pages matching a given regex (e.g., prefix), along with their descriptions from the #pragma  description directive.

Core code

moin.xmlrpc

Added check for permission to view attachments. New functions for providing edit summaries and for getting digests (SHA1) of revisions for comparison with local revisions.

Theme

  • Javascript button to override the browser language preference for the current page (see /ContentNegotiation)

  • Page actions in the left sidebar
  • Universal navigation elements are dropped in favour of default "starred pages" (quicklinks), which are completely customizable
  • Navigation icons for page actions
  • localedit enabled if available in the left sidebar; otherwise links are to the regular web editor

  • Permissions icons in the top corner
  • New slideshow style
  • CSS for hiding/showing language-specific content on multilingual pages

  • Meta description at the top of the page
  • Google+ social bookmarking button
  • Attachments information at the bottom of the page

External scripts

MoinSync

Synchronization of pages and attachment files using XMLRPC. Since this utility operates directly on the filesystem of the "local" wiki, it is possible to synchronize a wiki directory located on removable media (thumb drive, external hard disk) with a server. See HelpOnDistributedAccess. (/MoinSync.py)

moinmoin.lang

Syntax highlighting for gtksourceview (used by gedit). (moinmoin.lang)

warc-utils

With some modifications to create an index and lynx-parsed text dump of archived web pages. (warc-tools-mandal-1.0.zip)

videos

Converts videos to Ogg Theora and packages them for upload to MoinMoin, along with thumbnails and a "RecentVideos" page. (VideoCookbook/convertvideos.sh)

slideshow+thumbs

Generates resized images and a slideshow out of pictures in a directory. (/slideshow.sh)

TODO (roadmap)

  • Create a distribution package containing Theora macro, documentation, css, and javascript
  • Addition to the wiki parser to allow for uppercase text to be recognized as definition links
  • Site-specific help pages: reading, editing, synchronization
  • Extend the Sync Pages action to synchronize attachments

There are 2 attachment(s) stored for this page.

MoinMoinCustomizations (last edited 2011-09-01 12:50:45 by EricThrift)