OpenWetWare:Software/Extensions/Dewikify

From OpenWetWare
Jump to navigationJump to search

Note: As of September 2017, de-wikified pages now redirect to their source pages

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 must be under one namespace. For the following, let's suppose you're using the Foo namespace. Then you can access the dewikified version of http://www.openwetware.org/wiki/Foo as http://foo.openwetware.org/. All links from this page to other pages that begin with Foo: (like http://www.openwetware.org/wiki/Foo:Bar) will be dewikified. Other pages will not be dewikified. Dewikifying happens automatically as long as the above namespace convention is met.

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 template page, insert !BODY! and it will be replaced by the page text. 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.

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.

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. You can use one of these great banners.

Examples

http://knight.openwetware.org/ is dewikified from Knight Lab.
http://syntheticbiology.org is dewikified from Synthetic Biology.


All features and bugs are due to Austin Che. See User:Austin/Extensions/Dewikify for details about this program. Feel free to send comments or improvements.