[Mediawiki-l] {{REVISIONID}}? Or an alternative?

Chris Watkins chriswaterguy at appropedia.org
Fri Feb 20 08:42:16 UTC 2009


It seems like {{REVISIONID}} doesn't
work<https://bugzilla.wikimedia.org/show_bug.cgi?id=12694>.
I've tried it on Wikipedia, Wikiversity and Appropedia, and it comes out
blank.

Is there another way that I can insert a revision ID into a document? I want
to do it with a bot, rather than manually for each page.

It should probably be the last revision id, as I need to "subst:" the value,
and I'm guessing that won't work with the current value. But I'll try
anything, and I'm not so concerned whether it's the current or previous
revision ID.


I asked on Pywikipedia-L, and got this response. Unfortunately it requires
coding, and I don't understand it - so I'm wondering if there's another
option.

You're looking for the Page.latestRevision() function here:

nicdumz at host:~/pywikipedia$ python
Python 2.5.2 (r252:60911, Oct  5 2008, 19:24:49)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import wikipedia
Checked for running processes. 1 processes currently running,
including the current process.
>>> mainpage = wikipedia.Page(wikipedia.

getSite('en', 'wikipedia'), 'Main Page')
>>> mainpage.latestRevision()
Getting 1 pages from wikipedia:en...
260905624

But you'll have to code yourself in python to insert it somewhere...
It's sort of a "custom" use.


Thanks!
-- 
Chris Watkins (a.k.a. Chriswaterguy)

Appropedia.org - Sharing knowledge to build rich, sustainable lives.

identi.ca/appropedia / twitter.com/appropedia
blogs.appropedia.org

I like this: five.sentenc.es


More information about the MediaWiki-l mailing list