On Mon, 26 Nov 2007, Daniel Cannon wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
S. Nunes wrote:
Hi,
I'm trying to use the Mediawiki API to get information about revisions
to a given page. I understand that it is possible to get the entire
contents of a given revision. However I would like to know if it is
possible to only get the diffs introduced in a given revision? This
would result in a reduced bandwidth consumption.
At present time, there is no way to do this with the API. It is an oft
requested feature, but unfortunately, no one has gotten around to
getting it implemented. In the meantime the only way to get diffs for a
revision is to fetch the full page text of the revision and the previous
revision and compare the two using GNU diff or a similar utility.
You can save some bandwidth (on large pages) by adding action=render
to a regular diff url, like this:
http://en.wikipedia.org/w/index.php?action=raw&title=Wikipedia:Administ…
However, you also then have to screen-scrape the relevant parts of
the diff, and to convert " < > and & to " < >
&.
Paolo (en:User:Tizio)