Team:Freiburg/Wikimigration

""

How to Migrate to the iGEM-Wiki: The Freiburg Way

At the end of an iGEM summer writing the final wiki in time for wiki freeze is a challenge every iGEM team experiences. But apart from designing the wiki itself, using CSS and Javascript, a main problem is the content. A final iGEM wiki should on the one hand be good to read and inspire people for science, on the other hand all the information needed to repeat the experiments has to be provided for good scientific practice. And especially for this last aspect we would like to show how we worked on our wiki and what may be adaptable for future teams.

The Internal Wiki

To start early and to document every step we did, we worked with a so called internal wiki that was based on dokuwiki and hosted on the university's web server. A special advantage of this wiki-system was an introductory course provided by the university and the relatively simple formatting syntax that allowed direct work without long learning periods. Additionally the wiki is used to organize our team, to protocol meetings and to provide information such as scientific papers and protocols as well as cooking recipes that we tested during these meetings. But a major drawback from using dokuwiki was that the syntax is not at all compatible with the mediawiki syntax that is used on the external official iGEM wiki. To not rewrite all articels we thought for a solution to convert content between these wikis in a fast and simple way.

Migration

Form providing input for the wikitranslate script

Even though the dokuwiki provides a feature to export the page's body content (by appending &do=export_xhtmlbody to the URL and getting the source code of this via STRG+U in Firefox) all the image links refer to the internal server and are, therefore, broken. The first step in migrating our content, thus was a script to download all the images of a specified internal wiki page and prefix the file names with Freiburg_ to avoid name conflicts with other teams. The program also outputs a file with all the file names separated by commas that is later used to upload the files. To transfer the downloaded and renamed files onto the iGEM server the selenium browser automation tool (http://www.seleniumhq.org/) in combination with the sideflow-plugin (https://github.com/73rhodes/sideflow) was used. This plugin allows for the creation of loops in selenium routines as needed to upload a list of files. The steps in the selenium routine are basically the coded equivalent to clicking on the upload-button, selecting a file, clicking the ignore any warnings button and submit the form. Once the files are on the server, it is necessary to get their location on this server to use it as image source in the html-text on the sites. As the iGEM Server assigns a variable path to every file (as /e/e4/filename.png) this path has to be probed for every single image to be used on the site. This routine is implemented in the wikitranslate script together with a routine for replacing the linked headers by unlinked ones and one for adding preceding and following text, such that, for example custom styling for a specific page can be done directly in the protocol. The script is used on a web server basis (as cgi - script) and thus can be used by every team member with no needs for programming skills. It then returns an html-file that contains the source code to paste in the manually created new external wiki page.

Refining the External Wiki

Despite lowering a lot the workload needed for transferring our content to the external wiki, there still is need to adapt the design by hand. A major aspect here is a consistent design of the uploaded pages with the ones created especially for the external wiki, as the landing page or the project overview pages. All in all, using an automated uploading and replacing procedure to transfer our content from the internal to the external wiki allowed us to spend more time on the remaining pages, like our poster and the presentation. And we hope that our experiences might also be useful for other teams writing their content in advance.

Script-Code

dwfileload.py:

Presets for Selenium IDE

HTML for Webserver-Input

CGI script code to be run on Webserver