The PEAK Developers' Center   WikiUp UserPreferences
 
HelpContents Search Diffs Info Edit Subscribe XML Print View
The following 231 words could not be found in the dictionary of 50 words (including 50 LocalSpellingWords) and are highlighted below:
Adding   Also   By   Command   Currently   Docs   Filenames   In   Installing   It   Line   Note   Old   Pages   Plugin   Plugins   Project   Questions   See   Support   The   To   Up   Updating   Usage   You   able   action   actually   add   addition   adds   all   allow   allows   also   alternate   alternative   an   and   any   appear   apply   arguments   as   assumed   backslashes   base   based   basic   be   before   being   below   bug   but   by   called   can   case   cfg   changed   character   class   code   codec   com   command   comment   comments   config   configuration   configure   containing   content   convert   converted   could   default   defaulting   defines   details   directed   directory   do   documentation   double   each   eby   editing   entry   escape   escapes   exactly   extension   file   filename   filenames   for   format   framework   from   function   given   goes   group   have   here   id   if   implement   in   intended   interpreted   into   is   it   its   just   keep   lets   like   line   list   listinfo   local   log   login   mailing   mailman   make   many   match   matching   more   must   name   need   nothing   now   of   old   on   one   only   option   optional   optionally   or   other   package   packages   page   pagename   pages   path   peak   place   plugin   plugins   point   posted   primarily   project   projects   pydistutils   raw   read   registering   relative   reports   required   resulting   rst   same   sarna   section   sensitive   separator   settings   setup   setuptools   should   single   so   some   something   source   specified   specify   string   subclassing   supported   takes   text   that   the   them   they   this   to   treated   two   type   types   uid   up   update   upload   uploaded   uploading   use   used   useful   userform   using   usually   value   what   when   where   which   wikiname   wikiup   will   with   without   words   works   you   your  

Clear message


Updating Project Wiki Pages from Docs using WikiUp

NEW in 1.1:
The --changed-file or -f option now lets you specify a single file to upload. (See Command-Line Usage below for details.)

The WikiUp project defines a setuptools extension to allow uploading Wiki pages from source documentation. It's primarily intended to be useful for PEAK projects to update the PEAK Wiki, but other projects could make use of the same basic framework.

Installing this project adds a wikiup command to setuptools-based packages. By default, this command will read a file called wikiup.cfg in the project directory containing content like this:

[wikiname]
pagename = filename

In other words, a file with a section for each wiki, and a pagename + filename on each line. (The filename is actually optional; if you just list a pagename without an =, the filename will be assumed to be the same as the page name.) Filenames must be relative to the setup directory, and use / as a separator, as they will be converted to an OS path using the distutils convert_path() function.

To configure a Wiki, you need to add it to a distutils config file (usually your $HOME/pydistutils.cfg or ~/.pydistutils.cfg file) like so:

[wikiup-wikiname]
url = base url here
type = plugin name here
... other settings, if any

In other words, for each wiki, you need a [wikiup-foo] section, where foo is the name of the wiki as it will appear in some project's wikiup.cfg file.

The url is the Wiki's base URL, and type is the name of the plugin to be used to do the uploading. Currently, the only supported value for type is OldMoin, which works with the old MoinMoin wiki used by the PEAK projects.

Command-Line Usage

The setup.py wikiup command optionally takes a --comment or -c option to specify an update comment to apply when editing. It can also be given --config-file or -C to specify an alternate config file in place of the local wikiup.cfg file.

Also, if you have many wiki pages, you can specify just a single filename to update, using --changed-file or -f. The file will be uploaded to all the matching pages in the project's wikiup.cfg. (Note: this option is case-sensitive and must exactly match one or more filenames in wikiup.cfg, or nothing will be uploaded.)

The OldMoin Plugin

The OldMoin plugin takes two optional arguments in its configuration section, in addition to the required type and url:

[wikiup-foo]

type = OldMoin
url = something

uid = login.id.goes.here
page_format = {{{ %s }}}

The uid allows you to specify a MoinMoin login ID to use; if specified, the plugin will use the userform Wiki action to log in as that ID before uploading any pages.

The page_format is a format string (defaulting to "#format rst\n%s") that will be used to convert the raw upload file into the page text that will be posted to the wiki. The string is interpreted using the string_escape codec, so you will need to double-up on backslashes to keep them from being treated as character escapes.

Adding Plugins

You can implement alternative plugins for other wiki types, by subclassing wikiup.Wiki and registering the resulting class in the wikiup.plugins entry point group. See the source code for details of what the plugin must be able to do.

Support

Questions, comments, and bug reports for this package should be directed to the PEAK mailing list.


PythonPowered
EditText of this page (last modified 2010-08-11 19:36:50)
FindPage by browsing, title search , text search or an index
Or try one of these actions: AttachFile, DeletePage, LikePages, LocalSiteMap, SpellCheck