Revision: 6949 Author: alexsh Date: 2009-06-11 02:56:44 +0000 (Thu, 11 Jun 2009)
Log Message: ----------- * wikimedia_sites.py: add wikiversity info * speedy_delete.py: - update wikipedia and wikinews categories from [[en:C:CSD]] interwiki - add wikt, ws, wb, wv, wq categories from en interwiki - add KeyboardInterrupt exception to quit program when no data in CSD category.
Modified Paths: -------------- trunk/pywikipedia/maintenance/wikimedia_sites.py trunk/pywikipedia/speedy_delete.py
Modified: trunk/pywikipedia/maintenance/wikimedia_sites.py =================================================================== --- trunk/pywikipedia/maintenance/wikimedia_sites.py 2009-06-10 19:41:57 UTC (rev 6948) +++ trunk/pywikipedia/maintenance/wikimedia_sites.py 2009-06-11 02:56:44 UTC (rev 6949) @@ -6,7 +6,7 @@ sys.path.append('..') import wikipedia
-families = ['wikipedia', 'wiktionary', 'wikiquote', 'wikisource', 'wikibooks', 'wikinews'] +families = ['wikipedia', 'wiktionary', 'wikiquote', 'wikisource', 'wikibooks', 'wikinews', 'wikiversity'] familiesDict = { 'wikipedia': 'wikipedias_wiki.php', 'wiktionary': 'wiktionaries_wiki.php', @@ -14,11 +14,12 @@ 'wikisource': 'wikisources_wiki.php', 'wikibooks': 'wikibooks_wiki.php', 'wikinews': 'wikinews_wiki.php', + 'wikiversity': 'wikiversity_wiki.php', } exceptions = ['www']
for family in families: - print 'Checking family %s:' % family + wikipedia.output('Checking family %s:' % family)
original = wikipedia.Family(family).languages_by_size obsolete = wikipedia.Family(family).obsolete
Modified: trunk/pywikipedia/speedy_delete.py =================================================================== --- trunk/pywikipedia/speedy_delete.py 2009-06-10 19:41:57 UTC (rev 6948) +++ trunk/pywikipedia/speedy_delete.py 2009-06-11 02:56:44 UTC (rev 6949) @@ -36,37 +36,196 @@
csd_cat={ 'wikipedia':{ - 'als': u'Kategorie:Wikipedia:Schnelllöschen', + 'ab': u'Категория:Candidates for speedy deletion', + 'ak': u'Category:Candidates for speedy deletion', + 'ang': u'Flocc:Candidates for speedy deletion', 'ar': u'تصنيف:صفحات للحذف السريع', - 'be': u'Катэгорыя:Вікіпэдыя:Кандыдатуры на выдаленьне', + 'arc': u'Category:Candidates for speedy deletion', + 'av': u'Категория:Candidates for speedy deletion', + 'ay': u'Categoría:Candidates for speedy deletion', + 'az': u'Kateqoriya:Vikipediya:Silinəcək səhifələr', + 'ba': u'Категория:Delete', + 'bar': u'Kategorie:Wikipedia:Schnelllöschen', + 'bat-smg': u'Kateguorėjė:Kandėdatā skobē trintė', + 'be': u'Катэгорыя:Артыкулы да выдалення', + 'be-x-old': u'Катэгорыя:Вікіпэдыя:Кандыдатуры на выдаленьне', + 'bh': u'Category:Candidates for speedy deletion', + 'bi': u'Category:Candidates for speedy deletion', + 'bn': u'বিষয়শ্রেণী:Candidates for speedy deletion', + 'bo': u'Category:Candidates for speedy deletion', + 'br': u'Rummad:Candidates for speedy deletion', + 'bug': u'Kategori:Candidates for speedy deletion', + 'bxr': u'Category:Candidates for speedy deletion', + 'ca': u'Categoria:Sol·licituds de supressió immediata', + 'cbk-zam': u'Categoría:Candidates for speedy deletion', + 'ce': u'Тоба:Candidates for speedy deletion', + 'ch': u'Katigoria:Candidates for speedy deletion', + 'chy': u'Category:Candidates for speedy deletion', + 'chr': u'Category:Candidates for speedy deletion', + 'cr': u'Category:Candidates for speedy deletion', 'cs': u'Kategorie:Stránky ke smazání', + 'cu': u'Катигорі́ꙗ:Страни́цѧ ничьжє́ниꙗ дѣлꙗ́', + 'cv': u'Категори:Тӳрех кăларса пăрахмалли статьясем', 'de': u'Kategorie:Wikipedia:Schnelllöschen', + 'diq': u'Category:Candidates for speedy deletion', + 'dsb': u'Kategorija:Boki k malsnemu lašowanju', + 'dv': u'ޤިސްމު:Candidates for speedy deletion', + 'ee': u'Category:Candidates for speedy deletion', 'en': u'Category:Candidates for speedy deletion', 'es': u'Categoría:Wikipedia:Borrar (definitivo)', 'fa': u'رده:مقالات نامزد حذف سریع', + 'ff': u'Catégorie:Candidates for speedy deletion', + 'fj': u'Category:Candidates for speedy deletion', 'fi': u'Luokka:Roskaa', 'fr': u'Catégorie:Wikipédia:Suppression immédiate demandée', + 'frp': u'Catègorie:Candidates for speedy deletion', + 'gd': u'Category:Candidates for speedy deletion', + 'gn': u'Ñemohenda:Candidates for speedy deletion', + 'gu': u'શ્રેણી:Candidates for speedy deletion', + 'glk': u'رده:Candidates for speedy deletion', + 'ha': u'Category:Candidates for speedy deletion', + 'hak': u'Category:Candidates for speedy deletion', + 'haw': u'Māhele:Candidates for speedy deletion', 'he': u'קטגוריה:ויקיפדיה: למחיקה מהירה', 'hsb': u'Kategorija:Strony k spěšnemu wušmórnjenju', + 'ht': u'Kategori:Candidates for speedy deletion', 'ia': u'Categoria:Wikipedia:Eliminar', - 'it': 'Categoria:Da_cancellare_subito', - 'ja': u'Category:即時削除', + 'ie': u'Category:Candidates for speedy deletion', + 'ig': u'Category:Candidates for speedy deletion', + 'ik': u'Category:Candidates for speedy deletion', + 'ilo': u'Category:Candidates for speedy deletion', + 'it': u'Categoria:Da cancellare subito', + 'iu': u'Category:Candidates for speedy deletion', + 'ja': u'Category:即時削除対象のページ', + 'jbo': u'Category:Candidates for speedy deletion', + 'kg': u'Category:Candidates for speedy deletion', + 'ki': u'Category:Candidates for speedy deletion', + 'kl': u'Kategori:Candidates for speedy deletion', + 'ko': u'분류:삭제 신청 문서', 'ks': u'Category:Candidates for speedy deletion', - 'nah': u'Categoría:Huiquipedia:Borrar (definitivo)', + 'kw': u'Category:Candidates for speedy deletion', + 'lad': u'Categoría:Candidates for speedy deletion', + 'lg': u'Category:Candidates for speedy deletion', + 'lij': u'Categorîa:Candidates for speedy deletion', + 'ln': u'Catégorie:Candidates for speedy deletion', + 'lt': u'Kategorija:Kandidatai skubiai trinti', + 'mg': u'Sokajy:Candidates for speedy deletion', + 'mk': u'Категорија:Страници за брзо бришење', + 'ml': u'വര്ഗ്ഗം:Candidates for speedy deletion', + 'na': u'Category:Candidates for speedy deletion', + 'nah': u'Neneuhcāyōtl:Huiquipedia:Borrar (definitivo)', + 'nds': u'Kategorie:Wikipedia:Gauweg', + 'ng': u'Category:Candidates for speedy deletion', 'nl': u'Categorie:Wikipedia:Nuweg', 'no': u'Kategori:Sider som er foreslått raskt slettet', + 'nov': u'Category:Candidates for speedy deletion', + 'nrm': u'Category:Candidates for speedy deletion', + 'nv': u'T'ááłáhági át'éego:Candidates for speedy deletion', + 'ny': u'Category:Candidates for speedy deletion', + 'om': u'Category:Wikipedia:Candidates for speedy deletion', + 'or': u'Category:Candidates for speedy deletion', + 'pa': u'ਸ਼੍ਰੇਣੀ:Delete', + 'pag': u'Category:Candidates for speedy deletion', + 'pam': u'Category:Candidates for speedy deletion', + 'pdc': u'Kategorie:Wikipedia:Lösche', 'pl': u'Kategoria:Ekspresowe kasowanko', + 'pih': u'Category:Candidates for speedy deletion', 'pt': u'Categoria:Páginas para eliminação rápida', + 'rn': u'Category:Candidates for speedy deletion', + 'ro': u'Categorie:Pagini de şters rapid', + 'roa-tara': u'Category:Candidates for speedy deletion', 'ru': u'Категория:Википедия:К быстрому удалению', + 'rw': u'Category:Candidates for speedy deletion', + 'sa': u'वर्गः:Candidates for speedy deletion', + 'sco': u'Category:Candidates for speedy deletion', + 'sd': u'زمرو:ترت ڊاٺ جا اميدوار', + 'simple': u'Category:Quick deletion requests', + 'sl': u'Kategorija:Predlogi za hitro brisanje', + 'sm': u'Category:Candidates for speedy deletion', + 'sn': u'Category:Candidates for speedy deletion', + 'ss': u'Category:Candidates for speedy deletion', + 'st': u'Category:Candidates for speedy deletion', + 'stq': u'Kategorie:Candidates for speedy deletion', 'sv': u'Kategori:Snabba raderingar', + 'sw': u'Jamii:Deleteme', + 'szl': u'Kategoria:Rychue wyćepywańy', + 'te': u'వర్గం:Candidates for speedy deletion', + 'th': u'หมวดหมู่:หน้าที่ถูกแจ้งลบ', + 'ti': u'Category:Candidates for speedy deletion', + 'tr': u'Kategori:Vikipedi silinecek sayfalar', + 'ts': u'Category:Candidates for speedy deletion', + 'tt': u'Törkem:Candidates for speedy deletion', + 'tum': u'Category:Candidates for speedy deletion', + 'tw': u'Category:Candidates for speedy deletion', 'uk': u'Категорія:Статті до швидкого вилучення', + 'ug': u'Category:Candidates for speedy deletion', + 've': u'Category:Candidates for speedy deletion', + 'vo': u'Klad:Pads moükabik', 'vi': u'Thể loại:Chờ xoá', + 'vec': u'Categoria:Da cancełare subito', + 'vls': u'Categorie:Wikipedia:Nuweg', + 'war': u'Category:Candidates for speedy deletion', + 'xal': u'Янз:Candidates for speedy deletion', + 'xh': u'Category:Candidates for speedy deletion', + 'yo': u'Ẹ̀ka:Candidates for speedy deletion', + 'za': u'分类:Candidates for speedy deletion', 'zh': u'Category:快速删除候选', + 'zh-classical': u'Category:速刪候', 'zh-yue': u'Category:快速刪除候選', + 'zu': u'Category:Candidates for speedy deletion', }, 'wikinews':{ + 'en': u'Category:Speedy deletion', + 'ja': u'Category:即時削除', 'zh': u'Category:快速删除候选', }, + 'wikisource':{ + 'ar': u'تصنيف:صفحات تخضع لنقاش الحذف', + 'id': u'Kategori:Usulan penghapusan', + 'ja': u'Category:即時削除', + 'no': u'Kategori:Sider som er foreslått raskt slettet', + 'pt': u'Categoria:!Páginas para eliminação rápida', + 'ro': u'Categorie:Propuneri pentru ştergere', + 'zh': u'Category:快速删除候选', + }, + 'wikiversity':{ + 'beta': u'Category:Candidates for speedy deletion', + 'cs': u'Kategorie:Stránky ke smazání', + 'de': u'Kategorie:Wikiversity:Löschen', + 'el': u'Κατηγορία:Σελίδες για γρήγορη διαγραφή', + 'en': u'Category:Candidates for speedy deletion', + 'es': u'Categoría:Wikiversidad:Borrar (definitivo)', + 'it': u'Categoria:Da cancellare subito', + 'ja': u'Category:Candidates for speedy deletion', + 'pt': u'Categoria:!Páginas para eliminação rápida', + }, + 'wikiquote':{ + 'cs': u'Kategorie:Údržba:Stránky ke smazání', + 'en': u'Category:Candidates for speedy deletion', + 'fi': u'Luokka:Roskaa', + 'ja': u'Category:即時削除', + 'ru': u'Категория:Викицитатник:К быстрому удалению', + 'simple': u'Category:Quick deletion requests', + 'zh': u'Category:快速删除候选', + }, + 'wiktionary':{ + 'en': u'Category:Candidates for speedy deletion', + 'fi': u'Luokka:Roskaa', + 'fr': u'Catégorie:Pages à supprimer rapidement', + 'ja': u'Category:即時削除', + 'simple': u'Category:Quick deletion requests', + 'tt': u'Törkem:Candidates for speedy deletion', + 'zh': u'Category:快速删除候选', + }, + 'wikibooks':{ + 'ca': u'Categoria:Elements a eliminar', + 'en': u'Category:Candidates for speedy deletion', + 'es': u'Categoría:Wikilibros:Borrar', + 'it': u'Categoria:Da cancellare subito', + 'ja': u'Category:即時削除', + 'pl': u'Kategoria:Ekspresowe kasowanko', + 'zh': u'Category:快速删除候选', + }, }
# If the site has several templates for speedy deletion, it might be @@ -120,7 +279,7 @@ }, 'zh':{ u'_default':u'[[WP:CSD]]', - u'Db-spam':u'[[WP:CSD#G11|CSD G11]]: 廣告、宣傳頁面', + u'Db-spam':u'[[WP:CSD#G11|CSD G11]]: 廣告、宣傳頁面', u'Notchinese':u'[[WP:CSD#G7|CSD G7]]: 非中文條目且長時間未翻譯', u'No source':u'[[WP:CSD#I3|CSD I3]]: 沒有來源連結,無法確認來源與版權資訊', u'No license':u'[[WP:CSD#I3|CSD I3]]: 沒有版權模板,無法確認版權資訊', @@ -313,8 +472,11 @@ startFromBeginning = True if count == 0: if startFromBeginning: - wikipedia.output(u'There are no pages to delete. Waiting for 30 seconds...') - time.sleep(30) + wikipedia.output(u'There are no pages to delete.\nWaiting for 30 seconds or press Ctrl+C to quit...') + try: + time.sleep(30) + except KeyboardInterrupt: + keepGoing = False else: startFromBeginning = True wikipedia.output(u'Quitting program.')
pywikipedia-svn@lists.wikimedia.org