This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
""" | |
Script to upload images of panoramio to wikimedia commons. | |
by Shizhao 2014 | |
""" | |
import urllib2,re, random | |
import datetime |