HowTo: Use MediaWiki for Managing Apollo Transcripts
By Eric Hartwell - last updated
March 29, 2006
As part of the research for my Apollo 17 project, I
decided to prepare a definitive timeline/transcript of the mission:
For my first
pass, I built a simple HTML table with time, speaker, and text from a single
transcript. Then, as I started combining multiple sources, I switched to HTML
defined term / definition syntax, with inline comments and later separate
footnotes. As I added more and more sources, the HTML got larger, more complex,
and harder to manage.
Data and Formatting
Eventually I decided to use a generic
and extensible XML format. Any formatting desired can
easily be applied using an XSLT style sheet:
Editing, Revising, Annotating
A proper reference needs sources identified, interpretations explained, and a
revision history with audit trail. I stated to write a .NET web application with
its own database, when I realized I already have a web application that does all
that - MediaWiki.
MediaWiki stores its content as plain text, though MediaWiki and HTML markup
is supported. The extension mechanism lets you add custom code to process custom
markup. For this project, I built an extension to let me store the transcript
text as XML but display it as formatted HTML/CSS using the XSLT transform:
Future project: Editing raw XML is problematic. MediaWiki also
supports special page extensions, which means I can build a generic editing
plug-in that uses the XML schema to control what can be input. It can even use
XSL to provide WYSIWYG editing.
Chapters
The
entire transcript is way too big to handle as a single unit. At the other
extreme, there are way too many events to use a separate wiki page for each one.
Actually, what the transcript really needs is the
Book_Title /
Chapter_Name / Page_Name naming convention used in
WikiBooks.
By default, MediaWiki disables subpages in the main namespace. For example, "Foo/Bar" is a page entitled "Foo/Bar"
instead of "Bar" being a sub-page of "Foo". Subpages are useful as a means of
expressing hierarchies in information. To enable subpages, add the following to
LocalSettings.php:
# Enable
subpages in main namespace
$wgNamespacesWithSubpages[0]
= 1;
The Apollo Flight
Journal divides the mission into chapters, sections, and sub-sections, such
as "Day 1 - Launch - First Stage"; the transcript wiki can follow the same
format, with one wiki page per sub-section. If the combined XML source is organized with the corresponding <chapter>,
<section>, and <subsection> tags, then splitting out the individual wiki "pages"
and reassembling them into a single document can be automated.
After some experimenting, I
decided to use MediaWiki headers for each section, so I could leverage the wiki's indexing and linking features.
The source for a typical wiki page looks like this:
<noinclude>{{:A17FJ Page Header}}</noinclude>
==Launch: Countdown==
<XmlTransform xslname="AS17FlightTranscript.xsl">
<section title="Countdown">
<event met="-000:01:00">
<quote who="LCC">Mark T minus 1 minute and counting.</quote>
</event>
... more XML ...
</section>
</XmlTransform>
<noinclude>{{:A17FJ Disclaimer}}</noinclude>
-
{{:A17FJ Page Header}} tells MediaWiki to insert
the contents of the wiki page A17FJ Page Header at the start of each
page.
-
==Launch: Countdown== tells MediaWiki to use "Launch: Countdown"
as the display title for this page/section.
-
<XmlTransform ></XmlTransform> tells
MediaWiki to use the XmlTransform extension to format the contents using the
AS17FlightTranscript.xsl "image" XSL transformation.
-
{{:A17FJ Disclaimer}} tells MediaWiki to insert
the contents of the wiki page A17FJ Disclaimer as a common page
footer.
-
The <noinclude></noinclude> tags tell MediaWiki
not to display the header and footer for each section when the sections are
inserted into other pages.
Using subpages, the wikitext source for the Apollo 17 Flight Journal's
Launch page looks like this:
<noinclude>{{:A17FJ Page Header}}</noinclude>
==Launch==
*[[/Countdown/]]
*[[/First Stage S-IC/]]
*[[/Second Stage S-II/]]
*[[/Third Stage S-IVB/]]
([[../Launch (all)/|Click here to view all sections on a single page]])
<noinclude>{{:A17FJ Disclaimer}}</noinclude>
[[Category:Apollo 17]]
MediaWiki supports
Composite
pages. The wikitext of a page may contain tags for the inclusion of
component pages, which gives the user a choice between
viewing the component pages separately or
all together. To include a page you use the syntax for a template by adding {{
and preceed the name of the page for inclusion with a colon ":" to show that it is
not the name of a template. The wikitext source for the Apollo 17 Flight Journal's
Launch (all) page, which is about 65KB, looks like this:
<noinclude>{{:A17FJ Page Header}}</noinclude>
{{:Apollo 17 Flight Journal/Launch/Countdown}}
{{:Apollo 17 Flight Journal/Launch/First Stage S-IC}}
{{:Apollo 17 Flight Journal/Launch/Second Stage S-II}}
{{:Apollo 17 Flight Journal/Launch/Third Stage S-IVB}}
<noinclude>{{:A17FJ Disclaimer}}</noinclude>
The composite page has an integrated TOC
and section numbering; the numbering is not
reset for each component page. Edit history, recent changes, watching
pages, and "what links here" work separately
for the component pages and the composition page, not for the
composite page.
In-Line Reference Information
The
Apollo Flight Journal
series includes in-line reference information to better explain what's happening
in the timeline. This can be as simple as a diagram of the spacecraft cabin, or
a much more detailed description of how the onboard computer works. Much of this
information applies to all the Apollo missions, so using a single copy
simplifies maintenance.
This is easily handled in MediaWiki by using pages with a
common section. These can be considered as the text equivalent of a
programming subroutine; a subtopic equally
relevant for A as for B, can be put both in page A and in page B, by making it a
separate page C, called as a template from A and B.
- For readers reading both A and B, it is useful that the
duplication is indicated by a message or a special lay-out;
otherwise it is confusing and inconvenient. One can for
example use
Template:cs (talk,
backlinks,
edit):
- After saving one ends up viewing the template page. For
easy access to the calling pages it is convenient to link
the called page to them (on a calling page one becomes a
self-link). This may well be integrated in the message about
the duplication. It is even more convenient than the
two-step link as shown above.
Getting Fancy
As you might expect with such a widely used open source project, there are a
number of user-developed extensions already available, some of which could be
useful for this project:
- Biblio: Citation manager
- EasyTimeline: Graphical timelines
- ScreenPlay
Extension: Text-formatting add-on which allows screenwriters and hobbyists the
ability to use MediaWiki as a screen writing tool.
- Interwiki linking: By adding a prefix to another project, internal link style ("prefixed
internal link style") can be used to link to a page of another project. For
example, [[wikipedia:interWiki]] links to the wikipedia:interWiki article on
the English Wikipedia.
References
Revision History
- March 29, 2006 - initial version