OpenWetWare:Dewikify

From OpenWetWare
Revision as of 13:16, 26 February 2006 by Jason R. Kelly (talk | contribs)
Jump to navigationJump to search

See the OpenWetWare:Dewikify/Demo page for the dewikify process in action

OWW dewikifying

To take advantage of the dewikify script on OpenWetWare, all your pages should be under one namespace. For the following, let's suppose you're using the Foo namespace. Then you can access the dewikified version at http://foo.openwetware.org/. The top page will be the page just named Foo on this wiki. All links from this page to other pages that begin with Foo: will automatically be dewikified. Other pages will not be dewikified.

The conversion is done simply by capitalizing the first letter, e.g. foo to Foo on the wiki. However, if your namespace has a different capitalization, spaces, punctuation, or you just wish to have an alias, then you will need to contact us to do a mapping for you, e.g. syntheticbiology is mapped to Synthetic_Biology.

Page Template

The pages are dewikified by grabbing the page content and inserting it inside a template. The default template is Dewikify:Default. If you want your pages to have another format, for example, if you want to center your pages, create a page Dewikify:Foo. In the page, insert !BODY! and it will be replaced by the page. For example, look at Dewikify:Synthetic Biology (try to edit the page to see the content).

Cache

The pages are cached. Currently, it is cached for 1 day before automatically grabbing a new version from the wiki. This delay before changes on the wiki shows up on the static page perhaps can be considered a feature so that random visitors don't see your page while it has been half-updated. Otherwise, there's not much speed to be gained from this caching so if people would rather that changes instantly show up (or if you prefer it the way it is), let me know.

You can force a cache flush at any time and also quickly edit any page. Just add the letter 'x' to the end of any dewikified url. For example, suppose you have the page http://foo.openwetware.org/Bar.html. If you go to the URL bar and add an x to get http://foo.openwetware.org/Bar.htmlx and hit enter, then you will be automatically redirected to the OWW page to edit the page Foo:Bar. This will also clear the cache of all pages under the Foo namespace.

Virtual Host

You can also use another virtual host to hide the openwetware connection, for example http://syntheticbiology.org/ is the equivalent of http://syntheticbiology.openwetware.org. You will need to update your DNS to point the server name to the OWW server and let us know so we can setup a virtual host for you on the machine.

Hiding Info on Dewikified Version

It is possible to have stuff only show up on the wiki and not on the dewikified version or vice versa. For example, you can give the dewikified version out to the general public and you may rather not have lots of links about lab chores. To do this, you can put text that only shows up on the wiki and is completely removed during the dewikify process.

Two new tags are defined to allow this.

 <wikionly>This text will only appear on the wiki, and not when being dewikified</wikionly>
 <nonwikionly>This text will only appear on the dewikified version and not on the wiki</nonwikionly>

These tags are handled similar to a pre-processor. What this means is that you can conditionally include wiki markup. For example, lists work correctly (see the OpenWetWare:Dewikify/Demo page). If a wikionly/nonwikionly brackets an entire line, the entire line (i.e. the newline also) is removed.

Installation

This server is running the dewikify perl script written by Austin Che. To adapt the script to your own wiki or server, download the script and follow the instructions in the comments at the top. Optionally, you should also if you have access to the wiki server itself, install the dewikify.php MediaWiki extension. This extension is required for the wikionly and nonwikionly tags.

Promote OWW

Once your page has been dewikified it won't be clear to outside visitors that it is a wiki (good!), but it also may not be clear that your lab is part of the larger OpenWetWare community (bad!) -- so if you feel so inclined, include a link back to the OpenWetWare main page from your lab home page.


All features and bugs are due to Austin Che. Feel free to send comments or improvements.