Skip to content

Instantly share code, notes, and snippets.

@Fabiensk
Fabiensk / wk_dump_extract.py
Created May 2, 2015 20:16
Extract from a Wikivoyage dump (standard input) a page with a given title (all revisions)
#!/usr/bin/python3
import sys
import io
def main():
f = sys.stdin
title = sys.argv[1].strip()
page = ""
data = None
@Fabiensk
Fabiensk / wksource.py
Created May 2, 2015 20:11
Search in Wikivoyage history dump
#!/usr/bin/python
import sys, re
def check(expr, text):
res = expr.search(text)
if res==None:
return None
return res.group(1)