Community help wikis per release

Phil Bull philbull at gmail.com
Sun Oct 21 23:00:55 UTC 2007


Hi Adam,

On Sun, 2007-10-21 at 18:27 -0400, Adam Sommer wrote:
> I've adjusted the macro file to check for the current release code
> names and if it doesn't match it will print the macro usage statement.
> From my tests I wasn't able to add any html or other objectionable
> strings.  
> 
> I agree there will be a small maintenance burden using this macro,
> because for each release the if elif statement will have to be
> updated.  I can't think of a way around this, unless there's a way to
> dynamically get a list of current releases from somewhere else? 

It should be possible to use the MoinMoin macro API to get data from
other wiki pages, but that looks complicated. These look like the
relevant parts from the built-in Include.py macro (minus some code to
set 'request' and 'fmt'):

page = Page(request, "PageNameOrSomething", formatter=fmt)
body = page.get_raw_body()

Alternatively, a workaround would be to make the macro fall back on
using pure version numbering if it doesn't have a codename for a
release, e.g. if we know the codename for 7.10 but not 8.04:

[[ReleaseVersion(gutsy, 8.04)]]

Ubuntu 7.10 (Gutsy Gibbon)
Ubuntu 8.04

> Also, from my tests changes to the macro file were visible when the
> page was resaved or refreshed.
> 
> I've also extracted the style info into a separate CSS file.  I wasn't
> sure of the naming scheme, so the class names should probably  be
> changed to match the site scheme if there is one. 

That's great, thanks!

Thanks again,

Phil

-- 
Phil Bull
http://www.launchpad.net/people/philbull





More information about the ubuntu-doc mailing list