Overview

Plugin Usage
----------------------------------------------------------------------
Create a symbolic link to `gwgenerator.cgi` in the root level of the 
BioGPS cgi-bin folder like so:

       $ ln -s gwgenerator/gwgenerator.cgi gwgenerator.cgi

Assuming Python is set up as a cgi language in your server, you
should then be able to navigate to it in a browser. It takes two
arguments: 
    1. id=<entrez id>
       This dictates what resources the generator will create.
    2. upload=<keyword>
       This, with the id parameter, will specify that the cgi script
       should create a new page on wikipedia according to the keyword
       given. The possible keywords are as such:
       - 'templatename': create & upload template on wikipedia
       - 'name': create & upload article stub titled as the full gene
    	 name (i.e. 'Cyclin-dependent kinase 2')
       - 'symbol': like 'name', but the title is the HUGO gene symbol.
       - 'altsym': like 'symbol' but with ' (gene)' appended
         (i.e. 'CDK2 (gene)')
       This option causes the CGI to return 0 if successful, -1 if
       there was a problem with Wikipedia, or -2 if there was a
       problem with the CGI script or python code. The return code is
       used by gwgenerator.js to provide feedback to the user.

Examples:
    http://path/to/gwgenerator.cgi?id=1017 // display code for CDK2
    http://path/to/gwgenerator.cgi?id=1017&upload=altsym // create an
    article stub with the title 'CDK2 (gene)' on Wikipedia. 


Plugin Architecture
----------------------------------------------------------------------
The main plugin file (gwgenerator.cgi) relies on the genewiki module. 
This can either be installed locally or globally. 

NOTE (AS 20130712): tested with this version of genewiki module:
   https://bitbucket.org/sulab/pygenewiki/commits/a32fc1046bce10403df20d593837cdf65528f3a8

and this updated version:
    80:5e22e1cc794d

It also relies on files in gwgenerator/, such as:

    1. gwgenerator.js
       This file controls the button actions on the plugin page and 
       calls gwgenerator.cgi *by name* to write new templates/articles.

    2. body.html
       This is a 'skeleton' file that gwgenerator.cgi formats with the
       appropriate values. It is read directly into the cgi script and
       printed; thus, any changes to formatting or layout should be
       made on this file.

It assumes these files are located in a folder on the same level as
itself; this is best accomplished by symlinking or copying the cgi file
into the cgi-bin directory with gwgenerator/ existing on the same level,
as such:
- cgi-bin:
  - gwgenerator.cgi@ => ./gwgenerator/gwgenerator.cgi
  - gwgenerator/
    - gwgenerator.cgi
    - body.html
    - assets/
      - [supporting files]


Server Configuration
----------------------------------------------------------------------
Some servers require separate folders for static assets and dynamic 
content. We have edited the nginx config file to treat the assets/ 
subdirectory as the location of the static files.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.