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.

13 KiB

In [25]:
from dateutil.parser import parse
from datetime import datetime
import mwclient 
from bs4 import BeautifulSoup

import os
from dotenv import load_dotenv
from pathlib import Path
In [26]:
load_dotenv()

# Page of the wiki with the pads
padliography = 'Padliography2'
In [32]:
def add_pad(link, title, overview, categories, date):

    parsed_date = parse(date)
    date = datetime.strftime(parsed_date, '%Y-%m-%d')

    return f'| {link} || {title} || {overview} || {categories} || {date} \n|-\n'
In [28]:
def get_pads():
    
    site = mwclient.Site('pzwiki.wdka.nl', path='/mw-mediadesign/')
    site.login(
    username=os.environ.get('MW_BOT'),
    password=os.environ.get('MW_KEY'),

    )

    html = site.api('parse', prop='text', page=padliography)
    table = BeautifulSoup(html['parse']['text']['*'], features="html.parser").find("table", attrs={"class":"padliography"})

    headers = [header.text.lower().strip() for header in table.find_all('th')]
    pads = [
        {headers[i]: cell.text.rstrip('\n') for i, cell in enumerate(row.find_all('td'))} 
        for row in table.find_all('tr')]
    pads = [ pad for pad in pads if pad != {}]
    return pads
In [33]:
pads = get_pads()

table = '{| class = "wikitable sortable padliography"\n|-\n!link !! title !! overview !! categories !! date\n|-\n'
for pad in pads:
    table += add_pad(pad['link'], pad['title'], pad['overview'], pad['categories'], pad['date'])
table += '|-\n|}'
print(table)
{| class = "wikitable sortable padliography"
|-
!link !! title !! overview !! categories !! date
|-
| https://pad.xpub.nl/p/o2jT2mUjNgH0Vk1uPZLR || Week_1 with Steve || Introduction to Reading, Writing and Research Methodologies + first reading, writing workshop || RWRM, Week_1 || 2021-09-22 
|-
| https://pad.xpub.nl/p/SP16_2107 || Introduction to prototyping || Knowledge and information organisation are deeply intimate acts || Prototyping, Week_1 || 2021-09-21 
|-
| https://pad.xpub.nl/p/SP16_2809 || Orientation/Navigation || Object relations are not just a story of how we use objects but rather how, through relating, we begin to inaugurate and structure our very capacity to position ourselves in reality and phantasy, and so, to the very work of thinking. || SP16, Week_2 || 2021-09-28 
|-
| https://pad.xpub.nl/p/si16-protoyping-week-2 || Prototyping || Soupboat is born || SP16, Week_2 || 2021-09-27 
|-
| https://pad.xpub.nl/p/SP16_0510 || Language patterns experiments || Cats cradle is about patterns and knots || SP16, Week_3 || 2021-10-05 
|-
| https://pad.xpub.nl/p/SP_16_0610 || Reader 'prototypes' || since we are exposed to several topics relates to orientation / disorientation / editing / so we could help(?) the readers to navigate different texts || SP16, RWRM, Week_3 || 2021-10-06 
|-
| https://pad.xpub.nl/p/SP16_1210 || Transcription processes || interpretive decisions (What is transcribed?) epresentational decisions (How is it transcribed?) || SP16, Week_4 || 2021-10-12 
|-
| https://pad.xpub.nl/p/SP16_0510_texts || Magic Words Glossary || Little spells that can be used anywhere on the pad to indicate how we want to interact with the text || SP16, Week_3 || 2021-10-05 
|-
| https://pad.xpub.nl/p/2021-10-11-protoyping || Prototyping XP8 + NLTK2 || Custom text corpus in NLTK || Prototyping, Week_4, NLTK || 2021-10-11 
|-
| https://pad.xpub.nl/p/si16-protoyping-week-3 || Prototyping XP7 + NLTK1 || Introduction to NLTK + Explorative programming ch 7 || Prototyping, Week_3, NLTK || 2021-10-04 
|-
| https://pad.xpub.nl/p/GroupMeeting_18102021 || Meeting SP16: Rejection? 🧠⚡ || First group meeting for the SP16 || SP16, Meeting, Rejection || 2021-10-18 
|-
| https://pad.xpub.nl/p/Rejection_Glossary || Rejection Glossary || Approaching rejection from a lot of points of view || SP16, Rejection || 2021-10-18 
|-
| https://pad.xpub.nl/p/GroupMeeting_27102021 || Group Meeting Structure || How do we want to work together? How can we structure future meetings? || SP16, Meeting, Rejection || 2021-10-27 
|-
| https://pad.xpub.nl/p/si16-protoyping-week-7 || Prototyping || Collecting texts and creating our own corpora || Week_7, Prototyping, NLTK || 2021-11-01 
|-
| https://pad.xpub.nl/p/week7_withClara || SP16 with Clara Balaguer ||  || Week_7, SP16 || 2021-11-02 
|-
| https://pad.xpub.nl/p/TBD_VLTK || TBD VLTK, by Clara Balaguer || A high-low mix tape on the vernacular || Week_7, SP16 || 2021-11-02 
|-
| https://pad.xpub.nl/p/Meeting_SP16_Nov_04 || Group Meeting || Remarks on the Rejection Glossary, Vernacular, SI16 Brainstorming, Organising our work || Week_7, SP16, Meeting, Rejection || 2021-11-04 
|-
| https://pad.xpub.nl/p/Meeting_Template || TEMPLATE for Group Meetings || Please copy from this template and paste to the actual meeting pad! || SP16, Meeting, Templates || 2021-11-04 
|-
| https://pad.xpub.nl/p/si16-protoyping-week-8 || Prototyping XP15, Publishing Pipeline || XP15 check in + Etherpad API with Python || Week_8, Prototyping || 2021-11-08 
|-
| https://pad.xpub.nl/p/SP16_0911 || SP16 with Cristina (Danny is sick) || RUMINATION, DIGESTION, REFLECTION a.k.a. "The long day with Cristina" || SP16, Week_8 || 2021-11-09 
|-
| https://pad.xpub.nl/p/si16-protoyping-week-9 || Prototyping || Sharing out prototypes, Creating a webpage w/ Python + html & css, What is "documentation" || Prototyping, Week_9 || 2021-11-15 
|-
| https://pad.xpub.nl/p/Meeting_16112021 || Group meeting || morning: SP16 structure proposals; afternoon: editorial w/ Cristina || Week_9, SP16 || 2021-11-16 
|-
| https://pad.xpub.nl/p/si16-protoyping-week-10 || Prototyping || Exploring ways to create the API [examples] || Week_10, Prototyping || 2021-11-22 
|-
| https://pad.xpub.nl/p/si16-26112021 || Guest Danny Tirthdas van der Kleij || Vernacular in the Software || Week_10, SP16 || 2021-11-26 
|-
| https://pad.xpub.nl/p/si16-protoyping-week-11 || Prototyping || Check-in + Tutorial + ... || Week_11, SP16, Prototyping || 2021-11-29 
|-
| https://pad.xpub.nl/p/si16-protoyping-week-12 || Prototyping || ... || Week_12, SP16, Prototyping || 2021-12-06 
|-
| https://pad.xpub.nl/p/si16-week-12 || SP16 with Cristina || Radical efficiency day || Week_12, SP16 || 2021-12-07 
|-
| https://pad.xpub.nl/p/18012022 || SP17 with Lidia & Co. || Ideology, gamification || Week_02, SP17 || 2022-01-18 
|-
| https://pad.xpub.nl/p/19012022 || RW&RM with Steve || Marx and Engels; Gramsci; Hebdidge; Chad McCail || Week_02, SP17, RWRM || 2022-01-19 
|-
| https://pad.xpub.nl/p/19012022 || SP17 with Lidia & Co. || Games as reproductive technologies, Predatory monetization || Week_03, SP17 || 2022-01-25 
|-
| https://pad.xpub.nl/p/si16_debrief || SP16 Debrief || Reflections, debrief with XPUB1, Aymeric, Michael, Cristina, Manetta and Steve || Debrief, SP16, Week_03 || 2022-01-26 
|-
| https://pad.xpub.nl/p/01022022 || SP17 with Lidia & Co. || Digesting, reflecting, more reads + Tutorials || SP17, Week_04 || 2022-02-01 
|-
| https://pad.xpub.nl/p/02022022 || RW&RM with Steve || NO NEW STUFF & Creating our Productive Play Glossary || SP17, RWRM, Week_04 || 2022-02-02 
|-
| https://pad.xpub.nl/p/SI17-prototyping-07022022 || Prototyping || Building little games, playful things, make mazes with python || Prototyping, Week_05 || 2022-02-07 
|-
| https://pad.xpub.nl/p/08022022 || SP17 with Lidia & Co. || What is modding and how it is connected to culture and labour || SP17, Week_05 || 2022-02-07 
|-
| https://pad.xpub.nl/p/role-playing-structure || Experimental Kitchen || Kim and Chae designed an experimental role-play session for the whole group || SP17, Week_05 || 2022-02-08 
|-
| https://pad.xpub.nl/p/paolopedercini || Paolo Pedercini session || tba || SP17, Week_05, Talks || 2022-02-09 
|-
| https://pad.xpub.nl/p/SI17-prototyping-14022022 || Prototyping || Play time for puzzles, mini-games collaboration tools || Prototyping, Week_06 || 2022-02-14 
|-
| https://pad.xpub.nl/p/16022022-ste%3C3 || RW&RM with Steve || Loot box ideas and prototypes || RWRM, Week_06 || 2022-02-16 
|-
| https://hub.xpub.nl/soupboat/pad/p/group_meeting_18022022 || Group meeting || set pre-launch date and group awareness, the loot box, our public and intentions towards our public || SP17, Meeting || 2022-02-18 
|-
| https://hub.xpub.nl/soupboat/pad/p/group_meeting_21022022 || Group meeting || Loot box proposals, PNF & confirm format - the Box || SP17, Meeting, Week_06 || 2022-02-21 
|-
| https://pad.xpub.nl/p/talks-chess-23022022 || dr. Shira Chess session || Public lecture & private Q&A with "Play Like A Feminist" author || SP17, Talks || 2022-02-23 
|-
| https://hub.xpub.nl/soupboat/pad/p/group_meeting_28022022 || Group meeting || Prototypes presentations, getting stuck and dividing into small groups to move on || SP17, Meeting || 2022-02-28 
|-
| https://pad.xpub.nl/p/SI17-prototyping-07-03-2022 || Prototyping || Bots, IRC [hello, again, mIRC-a :D] & chat bots with python || Prototyping, Week_09 || 2022-03-07 
|-
| https://pad.xpub.nl/p/08032022 || SP17 with Lidia & Co. || Progress updates from Teams #1, #2 and #3 || SP17, Week_09 || 2022-03-08 
|-
| https://pad.xpub.nl/p/xpub1-si17-editorial-groups-outlines || Editorial meeting || Team representatives meeting with the editors to align the overall concept || SP17, Week_09, Meeting || 2022-03-09 
|-
| https://pad.xpub.nl/p/SI17-prototyping-14-03-2022 || Prototyping || Catching up, git tutorial, deadlines for the week || Prototyping, Week_10 || 2022-03-14 
|-
| https://pad.xpub.nl/p/15032022 || SP17 with Lidia & Steve || Updates from editors and teams 1,2 3; to-dos for the week || SP17, Week_10 || 2022-03-14 
|-
| https://pad.xpub.nl/p/SI17-prototyping-21-03-2022 || Prototyping || Assessments, documentation & updates from teams 1 & 3; Hello, Spring! || SP17, Week_10 || 2022-03-21 
|-
| https://pad.xpub.nl/p/SIX-diffractive-cookbook || Diffractive Cookbook || Plan for the release of SI18.6 || SI18, Week_6 || 2022-06-02 
|-
|-
|}
In [ ]: