Skip to content

Instantly share code, notes, and snippets.

View emijrp's full-sized avatar

emijrp

View GitHub Profile
@emijrp
emijrp / wikimedia_commons_ia_status.py
Created August 5, 2016 19:34 — forked from JesseWeinstein/wikimedia_commons_ia_status.py
Wikimedia Commons status update script
import internetarchive.api as iaapi
import humanize
w=iaapi.get_item('wikimediacommons')
def extract(x):
s = x.identifier.split('-',1)
date = s[1] if '-' in s[1] else s[1][:4]+'-'+s[1][4:]
return ' |-\n | ' + ' || '.join((date, '{{IA id|'+x.identifier+'}}', str(x.files_count), humanize.naturalsize(x.item_size)))
@emijrp
emijrp / pub.py
Created August 2, 2016 21:15 — forked from shizhao/pub.py
Panoramio upload bot
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Script to upload images of panoramio to wikimedia commons.
by Shizhao 2014
"""
import urllib2,re, random
import datetime