You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

4.5 KiB

Epicpedia: graduation work made in 2008 by Networked Media student Annemieke van der Hoek
https://pzwiki.wdka.nl/mediadesign/Epicpedia

Later Annemieke would present the work, in collaboration with her sister as a theater performance and workshop at VJ12:
https://video.constantvzw.org/vj12/epicpedia.ogv

Following example begrudginly given here:
https://stackoverflow.com/questions/52283962/how-to-find-textual-differences-between-revisions-on-wikipedia-pages-with-mwclie

https://www.mediawiki.org/wiki/API:Compare

Considering:
https://en.wikipedia.org/wiki/Han_Kang

Oldest revision:
https://en.wikipedia.org/w/index.php?title=Han_Kang&oldid=376586279

Thanks, Fred, now I see that there's a REST API as well. Not sure what the differences are.

Also using the URLSearchParams class in js:
https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams

Using the classic/action API, there's page > revisions:
https://www.mediawiki.org/wiki/API:Revisions

Examples given on API:Revisions page:

Last 5 edits

https://www.mediawiki.org/w/api.php?action=query&prop=revisions&titles=MediaWiki&rvlimit=5&rvprop=timestamp|user|comment

first edits

https://www.mediawiki.org/w/api.php?action=query&prop=revisions&titles=MediaWiki&rvlimit=5&rvprop=timestamp|user|comment&rvdir=newer

Adding ids and flags

https://www.mediawiki.org/w/api.php?action=query&prop=revisions&titles=MediaWiki&rvlimit=5&rvprop=timestamp|user|comment|ids|flags&rvdir=newer

adapted to Han Kang's entry:

https://www.mediawiki.org/w/api.php?action=query&prop=revisions&titles=Han_Kang&rvlimit=5&rvprop=timestamp|user|comment|ids|flags&rvdir=newer

https://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=Han%20Kang&rvlimit=5&rvprop=timestamp|user|comment|ids|flags&rvdir=newer

In [1]:
import mwclient

revisions = list(page.revisions(prop='ids'))  
last_revision_id = revisions[-1]['revid']
first_revision_id = revisions[0]['revid']
compare_result = site.get('compare', fromrev=last_revision_id, torev=first_revision_id)
html_diff = compare_result['compare']['*']
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[1], line 1
----> 1 import mwclient
      3 revisions = list(page.revisions(prop='ids'))  
      4 last_revision_id = revisions[-1]['revid']

ModuleNotFoundError: No module named 'mwclient'
In [ ]: