From dbcf04fd5bf74673d54ab67399af12bfdfc67ec4 Mon Sep 17 00:00:00 2001 From: Michael Murtaugh Date: Sat, 19 Oct 2024 14:50:27 +0200 Subject: [PATCH] epicpedia --- epicpedia_2024/epicpedia_2024.html | 20 ++++ epicpedia_2024/epicpedia_2024.ipynb | 118 +++++++++++++++++++ epicpedia_2024/epicpedia_2024.js | 18 +++ epicpedia_2024/radio_plays.html | 172 ++++++++++++++++++++++++++++ epicpedia_2024/radio_plays.md | 7 ++ epicpedia_2024/showdiff.html | 48 ++++++++ 6 files changed, 383 insertions(+) create mode 100644 epicpedia_2024/epicpedia_2024.html create mode 100644 epicpedia_2024/epicpedia_2024.ipynb create mode 100644 epicpedia_2024/epicpedia_2024.js create mode 100644 epicpedia_2024/radio_plays.html create mode 100644 epicpedia_2024/radio_plays.md create mode 100644 epicpedia_2024/showdiff.html diff --git a/epicpedia_2024/epicpedia_2024.html b/epicpedia_2024/epicpedia_2024.html new file mode 100644 index 0000000..c12e3f7 --- /dev/null +++ b/epicpedia_2024/epicpedia_2024.html @@ -0,0 +1,20 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/epicpedia_2024/epicpedia_2024.ipynb b/epicpedia_2024/epicpedia_2024.ipynb new file mode 100644 index 0000000..4b8cd49 --- /dev/null +++ b/epicpedia_2024/epicpedia_2024.ipynb @@ -0,0 +1,118 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "e2544890-3bb4-4457-a4c3-9711121c59f9", + "metadata": {}, + "source": [ + "Epicpedia: graduation work made in 2008 by Networked Media student Annemieke van der Hoek \n", + "https://pzwiki.wdka.nl/mediadesign/Epicpedia\n", + "\n", + "Later Annemieke would present the work, in collaboration with her sister as a theater performance and workshop at VJ12: \n", + "https://video.constantvzw.org/vj12/epicpedia.ogv\n", + "\n", + "Following example begrudginly given here: \n", + "https://stackoverflow.com/questions/52283962/how-to-find-textual-differences-between-revisions-on-wikipedia-pages-with-mwclie\n", + "\n", + "https://www.mediawiki.org/wiki/API:Compare\n", + "\n", + "\n", + "Considering: \n", + "https://en.wikipedia.org/wiki/Han_Kang\n", + "\n", + "Oldest revision: \n", + "https://en.wikipedia.org/w/index.php?title=Han_Kang&oldid=376586279\n", + "\n", + "Thanks, Fred, now I see that there's a [REST API](https://www.mediawiki.org/wiki/API:REST_API) as well. Not sure what the differences are.\n", + "\n", + "Also using the URLSearchParams class in js: \n", + "https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams\n", + "\n", + "Using the classic/action API, there's page > revisions: \n", + "https://www.mediawiki.org/wiki/API:Revisions\n", + "\n", + "Examples given on API:Revisions page:\n", + "\n", + "Last 5 edits\n", + "\n", + "https://www.mediawiki.org/w/api.php?action=query&prop=revisions&titles=MediaWiki&rvlimit=5&rvprop=timestamp|user|comment\n", + "\n", + "first edits\n", + "\n", + "https://www.mediawiki.org/w/api.php?action=query&prop=revisions&titles=MediaWiki&rvlimit=5&rvprop=timestamp|user|comment&rvdir=newer\n", + "\n", + "Adding ids and flags\n", + "\n", + "https://www.mediawiki.org/w/api.php?action=query&prop=revisions&titles=MediaWiki&rvlimit=5&rvprop=timestamp|user|comment|ids|flags&rvdir=newer\n", + "\n", + "adapted to Han Kang's entry:\n", + "\n", + "https://www.mediawiki.org/w/api.php?action=query&prop=revisions&titles=Han_Kang&rvlimit=5&rvprop=timestamp|user|comment|ids|flags&rvdir=newer\n", + "\n", + "https://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=Han%20Kang&rvlimit=5&rvprop=timestamp|user|comment|ids|flags&rvdir=newer\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "b3a48c4e-dcb3-4fa7-9524-e4fc8eae8a39", + "metadata": {}, + "outputs": [ + { + "ename": "ModuleNotFoundError", + "evalue": "No module named 'mwclient'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[1], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mmwclient\u001b[39;00m\n\u001b[1;32m 3\u001b[0m revisions \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mlist\u001b[39m(page\u001b[38;5;241m.\u001b[39mrevisions(prop\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mids\u001b[39m\u001b[38;5;124m'\u001b[39m)) \n\u001b[1;32m 4\u001b[0m last_revision_id \u001b[38;5;241m=\u001b[39m revisions[\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m1\u001b[39m][\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mrevid\u001b[39m\u001b[38;5;124m'\u001b[39m]\n", + "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'mwclient'" + ] + } + ], + "source": [ + "import mwclient\n", + "\n", + "revisions = list(page.revisions(prop='ids')) \n", + "last_revision_id = revisions[-1]['revid']\n", + "first_revision_id = revisions[0]['revid']\n", + "compare_result = site.get('compare', fromrev=last_revision_id, torev=first_revision_id)\n", + "html_diff = compare_result['compare']['*']\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f710d169-e284-4e27-834b-e31d98d7bf63", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.2" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/epicpedia_2024/epicpedia_2024.js b/epicpedia_2024/epicpedia_2024.js new file mode 100644 index 0000000..841b029 --- /dev/null +++ b/epicpedia_2024/epicpedia_2024.js @@ -0,0 +1,18 @@ +var url = "https://en.wikipedia.org/w/api.php"; + +var params = { + action: "compare", + format: "json", + fromtitle: "Template:Unsigned", + totitle: "Template:UnsignedIP", + origin: "*" + +}; +fetch(url + "?" + (new URLSearchParams(params)).toString()) + .then(resp => resp.json()) + .then(data => { + console.log("data", data); + }) + .catch(err => { + console.log("bad", err); + }); diff --git a/epicpedia_2024/radio_plays.html b/epicpedia_2024/radio_plays.html new file mode 100644 index 0000000..e080c2e --- /dev/null +++ b/epicpedia_2024/radio_plays.html @@ -0,0 +1,172 @@ + + + + + + + radio_plays + + + +

Georges Perec - Die Maschine

+ + + diff --git a/epicpedia_2024/radio_plays.md b/epicpedia_2024/radio_plays.md new file mode 100644 index 0000000..11ecc01 --- /dev/null +++ b/epicpedia_2024/radio_plays.md @@ -0,0 +1,7 @@ +Georges Perec - Die Maschine + +* [The Machine: English translation](https://hub.xpub.nl/bootleglibrary/read/918/pdf) +* [Mainframe Experimentalism](https://hub.xpub.nl/bootleglibrary/book/789), Bellos article (chapter 2) +* +* [VJ12 programme](https://calibre.constantvzw.org/read/29/pdf) + diff --git a/epicpedia_2024/showdiff.html b/epicpedia_2024/showdiff.html new file mode 100644 index 0000000..591fbe7 --- /dev/null +++ b/epicpedia_2024/showdiff.html @@ -0,0 +1,48 @@ + + + + + + + +
+
+
+
+ + + \ No newline at end of file