Tech/HowTo/Mediawiki from the command line

From lathama
< Tech‎ | HowTo
Jump to navigation Jump to search

Work in progress

#!/usr/bin/env python3

import sys
import urllib.request

if len(sys.argv) > 1:
    title = sys.argv[1]
else:
    title = 'Main_Page'

wikiurl = "https://lathama.net/index.php?action=raw&title=" + title
page = urllib.request.urlopen(wikiurl)

output = page.read().decode('utf-8')
print(output)

Resources