Revision: 3916 Author: valhallasw Date: 2007-07-27 18:05:19 +0000 (Fri, 27 Jul 2007)
Log Message: ----------- added 'some' $Id$'s
Modified Paths: -------------- trunk/pywikipedia/basic.py trunk/pywikipedia/capitalize_redirects.py trunk/pywikipedia/casechecker.py trunk/pywikipedia/cosmetic_changes.py trunk/pywikipedia/delete.py trunk/pywikipedia/fixes.py trunk/pywikipedia/image.py trunk/pywikipedia/interwiki_graph.py trunk/pywikipedia/misspelling.py trunk/pywikipedia/query.py trunk/pywikipedia/rcsort.py trunk/pywikipedia/refcheck.py trunk/pywikipedia/spamremove.py trunk/pywikipedia/speedy_delete.py trunk/pywikipedia/templatecount.py trunk/pywikipedia/udp-log.py trunk/pywikipedia/unusedfiles.py trunk/pywikipedia/us-states.py trunk/pywikipedia/userlib.py trunk/pywikipedia/welcome.py trunk/pywikipedia/wikipediatools.py trunk/pywikipedia/wiktionarytest.py
Modified: trunk/pywikipedia/basic.py =================================================================== --- trunk/pywikipedia/basic.py 2007-07-27 17:56:52 UTC (rev 3915) +++ trunk/pywikipedia/basic.py 2007-07-27 18:05:19 UTC (rev 3916) @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python # -*- coding: utf-8 -*- """ This is not a complete bot; rather, it is a template from which simple @@ -18,6 +18,7 @@
-debug: Don't do any changes. """ +__version__ = '$Id$' import wikipedia import pagegenerators import sys
Modified: trunk/pywikipedia/capitalize_redirects.py =================================================================== --- trunk/pywikipedia/capitalize_redirects.py 2007-07-27 17:56:52 UTC (rev 3915) +++ trunk/pywikipedia/capitalize_redirects.py 2007-07-27 18:05:19 UTC (rev 3916) @@ -1,9 +1,10 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*-
# # (C) Yrithinnd # Class licensed under terms of the MIT license # +__version__ = '$Id$'
import time, sys import wikipedia, pagegenerators, catlib
Modified: trunk/pywikipedia/casechecker.py =================================================================== --- trunk/pywikipedia/casechecker.py 2007-07-27 17:56:52 UTC (rev 3915) +++ trunk/pywikipedia/casechecker.py 2007-07-27 18:05:19 UTC (rev 3916) @@ -1,8 +1,9 @@ -#!/usr/bin/python +#!/usr/bin/python # -*- coding: utf-8 -*- """ Script to enumerate all pages on the wiki and find all titles with mixed latin and cyrilic alphabets. """ +__version__ = '$Id$'
# # Permutations code was taken from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/190465
Modified: trunk/pywikipedia/cosmetic_changes.py =================================================================== --- trunk/pywikipedia/cosmetic_changes.py 2007-07-27 17:56:52 UTC (rev 3915) +++ trunk/pywikipedia/cosmetic_changes.py 2007-07-27 18:05:19 UTC (rev 3916) @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- """ This module can do slight modifications to a wiki page source code such that the code looks cleaner. The changes are not supposed to change the look of the @@ -6,7 +6,7 @@
WARNING: This module needs more testing! """ - +__version__ = '$Id$' import wikipedia, pagegenerators import sys import re
Modified: trunk/pywikipedia/delete.py =================================================================== --- trunk/pywikipedia/delete.py 2007-07-27 17:56:52 UTC (rev 3915) +++ trunk/pywikipedia/delete.py 2007-07-27 18:05:19 UTC (rev 3916) @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- """ This script can be used to delete and undelete pages en masse. Of course, you will need an admin account on the relevant wiki. @@ -24,6 +24,7 @@
python delete.py -cat:"To delete" -always """ +__version__ = '$Id$' # # Distributed under the terms of the MIT license. #
Modified: trunk/pywikipedia/fixes.py =================================================================== --- trunk/pywikipedia/fixes.py 2007-07-27 17:56:52 UTC (rev 3915) +++ trunk/pywikipedia/fixes.py 2007-07-27 18:05:19 UTC (rev 3916) @@ -1,5 +1,6 @@ -# -*- coding: utf-8 -*- - +# -*- coding: utf-8 -*- +""" File containing all standard fixes """ +__version__ = '$Id$' fixes = { # These replacements will convert HTML to wiki syntax where possible, and # make remaining tags XHTML compliant.
Modified: trunk/pywikipedia/image.py =================================================================== --- trunk/pywikipedia/image.py 2007-07-27 17:56:52 UTC (rev 3915) +++ trunk/pywikipedia/image.py 2007-07-27 18:05:19 UTC (rev 3916) @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- """ This script can be used to change one image to another or remove an image entirely.
@@ -30,6 +30,7 @@ python image.py Flag.jpg Flag.svg
""" +__version__ = '$Id$' # # Distributed under the terms of the MIT license. #
Modified: trunk/pywikipedia/interwiki_graph.py =================================================================== --- trunk/pywikipedia/interwiki_graph.py 2007-07-27 17:56:52 UTC (rev 3915) +++ trunk/pywikipedia/interwiki_graph.py 2007-07-27 18:05:19 UTC (rev 3916) @@ -1,3 +1,5 @@ +""" Module with the graphviz drawing calls """ +__version__ = '$Id$' import threading pydotfound = True try:
Modified: trunk/pywikipedia/misspelling.py =================================================================== --- trunk/pywikipedia/misspelling.py 2007-07-27 17:56:52 UTC (rev 3915) +++ trunk/pywikipedia/misspelling.py 2007-07-27 18:05:19 UTC (rev 3916) @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- """ This script works similar to solve_disambiguation.py. It is supposed to fix links that contain common spelling mistakes. This is only possible on wikis @@ -20,6 +20,7 @@ -main only check pages in the main namespace, not in the talk, wikipedia, user, etc. namespaces. """ +__version__ = '$Id$'
# (C) Daniel Herding, 2007 #
Modified: trunk/pywikipedia/query.py =================================================================== --- trunk/pywikipedia/query.py 2007-07-27 17:56:52 UTC (rev 3915) +++ trunk/pywikipedia/query.py 2007-07-27 18:05:19 UTC (rev 3916) @@ -1,3 +1,6 @@ +""" Please describe your module here ;) """ + +__version__ = '$Id$' import wikipedia import simplejson import urllib
Modified: trunk/pywikipedia/rcsort.py =================================================================== --- trunk/pywikipedia/rcsort.py 2007-07-27 17:56:52 UTC (rev 3915) +++ trunk/pywikipedia/rcsort.py 2007-07-27 18:05:19 UTC (rev 3916) @@ -1,10 +1,11 @@ -#!/usr/bin/python +#!/usr/bin/python # -*- coding: utf-8 -*- # A tool to see the recentchanges ordered by user instead of by date. This # is meant to be run as a CGI script. # Currently only works on Dutch Wikipedia, I do intend to make it more generally # usable. # Permission has been asked to run this on the toolserver. +__version__ = '$Id$'
import cgi import cgitb
Modified: trunk/pywikipedia/refcheck.py =================================================================== --- trunk/pywikipedia/refcheck.py 2007-07-27 17:56:52 UTC (rev 3915) +++ trunk/pywikipedia/refcheck.py 2007-07-27 18:05:19 UTC (rev 3916) @@ -1,4 +1,4 @@ -""" +""" This script checks references to see if they are properly formatted. Right now it just counts the total number of transclusions of any number of given templates.
@@ -18,6 +18,7 @@ python refcheck.py -count ref note -namespace:0
""" +__version__ = '$Id$'
import wikipedia, config import replace, pagegenerators
Modified: trunk/pywikipedia/spamremove.py =================================================================== --- trunk/pywikipedia/spamremove.py 2007-07-27 17:56:52 UTC (rev 3915) +++ trunk/pywikipedia/spamremove.py 2007-07-27 18:05:19 UTC (rev 3916) @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- #!/usr/bin/python
import wikipedia, editarticle @@ -20,6 +20,7 @@ in using this option!
""" +__version__ = '$Id$'
def main(): automatic = False
Modified: trunk/pywikipedia/speedy_delete.py =================================================================== --- trunk/pywikipedia/speedy_delete.py 2007-07-27 17:56:52 UTC (rev 3915) +++ trunk/pywikipedia/speedy_delete.py 2007-07-27 18:05:19 UTC (rev 3916) @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- """ This bot is used to quickly trawl through candidates for speedy deletion in a fast and semi-automated fashion. The bot displays the contents of each page one at a @@ -29,6 +29,7 @@ none needed yet
""" +__version__ = '$Id$' # # Distributed under the terms of the MIT license. #
Modified: trunk/pywikipedia/templatecount.py =================================================================== --- trunk/pywikipedia/templatecount.py 2007-07-27 17:56:52 UTC (rev 3915) +++ trunk/pywikipedia/templatecount.py 2007-07-27 18:05:19 UTC (rev 3916) @@ -1,4 +1,4 @@ -""" +""" This script will display the list of pages transcluding a given list of templates. It can also be used to simply count the number of pages (rather than listing each individually). @@ -25,6 +25,7 @@ python templatecount.py -list -namespace:14 cfd cfdu
""" +__version__ = '$Id$'
import wikipedia, config import replace, pagegenerators
Modified: trunk/pywikipedia/udp-log.py =================================================================== --- trunk/pywikipedia/udp-log.py 2007-07-27 17:56:52 UTC (rev 3915) +++ trunk/pywikipedia/udp-log.py 2007-07-27 18:05:19 UTC (rev 3916) @@ -1,4 +1,4 @@ -#/usr/bin/env python +#/usr/bin/env python # -*- coding: utf-8 -*- # # (C) Misza13 misza1313@gmail.com, 2007 @@ -6,6 +6,7 @@ # Distributed under the terms of the MIT license. # import sys, re, socket +__version__ = '$Id$'
TARGET_HOST = 'tools.wikimedia.de' TARGET_PORT = 42448
Modified: trunk/pywikipedia/unusedfiles.py =================================================================== --- trunk/pywikipedia/unusedfiles.py 2007-07-27 17:56:52 UTC (rev 3915) +++ trunk/pywikipedia/unusedfiles.py 2007-07-27 18:05:19 UTC (rev 3916) @@ -1,10 +1,12 @@ -#!/usr/bin/python +#!/usr/bin/python # -*- coding: utf-8 -*- """ This bot appends some text to all unused images and other text to the respective uploaders.
You are asked for confirmation before every change. """ +__version__ = '$Id$' + import wikipedia import pagegenerators import sys
Modified: trunk/pywikipedia/us-states.py =================================================================== --- trunk/pywikipedia/us-states.py 2007-07-27 17:56:52 UTC (rev 3915) +++ trunk/pywikipedia/us-states.py 2007-07-27 18:05:19 UTC (rev 3916) @@ -1,4 +1,4 @@ -#coding: utf-8 +#coding: utf-8 """ Check pages on the English Wikipedia whether they are in the form Something, State, and if so, create a redirect from Something, ST. @@ -14,6 +14,7 @@ -force: Don't ask whether to create pages, just create them.
""" +__version__ = '$Id$' # # (C) Andre Engels, 2004 #
Modified: trunk/pywikipedia/userlib.py =================================================================== --- trunk/pywikipedia/userlib.py 2007-07-27 17:56:52 UTC (rev 3915) +++ trunk/pywikipedia/userlib.py 2007-07-27 18:05:19 UTC (rev 3916) @@ -1,11 +1,14 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- """ Library to work with users, their pages and talk pages. """ +__version__ = '$Id$'
import re, httplib import wikipedia
+ + class AutoblockUserError(wikipedia.Error): """ The class AutoblockUserError is an exception that is raised whenever
Modified: trunk/pywikipedia/welcome.py =================================================================== --- trunk/pywikipedia/welcome.py 2007-07-27 17:56:52 UTC (rev 3915) +++ trunk/pywikipedia/welcome.py 2007-07-27 18:05:19 UTC (rev 3916) @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python # -*- coding: utf-8 -*- """ Script to welcome new users. This script works out of the box for Wikis that @@ -11,12 +11,12 @@ Ensure you have community support before running this bot!
URLs to current implementations: -* Arabic Wikipedia: http://ar.wikipedia.org/wiki/%D9%88%D9%8A%D9%83%D9%8A%D8%A8%D9%8A%D8%AF%D9%8... الترحيب +* Arabic Wikipedia: http://ar.wikipedia.org/wiki/?????????:??? ??????? * Wikimedia Commons: http://commons.wikimedia.org/wiki/Commons:Welcome_log * Dutch Wikipedia: http://nl.wikipedia.org/wiki/Wikipedia:Logboek_welkom * Italian Wikipedia: http://it.wikipedia.org/wiki/Wikipedia:Benvenuto_log * English Wikiquote: http://en.wikiquote.org/wiki/Wikiquote:Welcome_log -* Persian Wikipedia: http://fa.wikipedia.org/wiki/%D9%88%DB%8C%DA%A9%DB%8C%E2%80%8C%D9%BE%D8%AF%D... خوشامد +* Persian Wikipedia: http://fa.wikipedia.org/wiki/?????????:????? ??????
Everything that needs customisation to support additional projects is indicated by comments. @@ -149,7 +149,7 @@ # # Distributed under the terms of the MIT license. # -__version__ = '$Id: welcome.py,v 1.4 2007/04/14 18:05:42 siebrand Exp' +__version__ = '$Id$' #
import wikipedia, string @@ -188,10 +188,10 @@ #The page where the bot will save the log (e.g. Wikipedia:Welcome log). logbook = { 'commons': u'Project:Welcome log', - 'ar': u'Project:سجل الترحيب', + 'ar': u'Project:??? ???????', 'de': None, # no welcome log on de: 'en': u'Project:Welcome log', - 'fa': u'Project:سیاهه خوشامد', + 'fa': u'Project:????? ??????', 'it': u'Project:Benvenuto log', 'nl': u'Project:Logboek welkom', 'no': u'Project:Velkomstlogg', @@ -200,10 +200,10 @@ #The edit summary for the welcome message (e.g. Welcome!). summary = { 'commons':u'Welcome!', - 'ar':u'مرحبا!', + 'ar':u'?????!', 'de':u'Herzlich willkommen!', 'en':u'Welcome!', - 'fa':u'خوش آمدید!', + 'fa':u'??? ?????!', 'it':u'Benvenuto!', 'nl':u'Welkom!', 'no':u'Velkommen!', @@ -214,10 +214,10 @@ # sign, so in this way it will change according to your parameters). netext = { 'commons':u'{{subst:welcome}}%s', - 'ar':u'{{نسخ:مستخدم:Alnokta/ترحيب}}%s', + 'ar':u'{{???:??????:Alnokta/?????}}%s', 'de':u'{{subst:Hallo}} %s', 'en':u'{{subst:welcome}}%s', - 'fa':u'{{جا:خوشامد}}%s', + 'fa':u'{{??:??????}}%s', 'it':u'{{Benvebot}} %s', 'nl':u'{{Welkomstbericht}}%s', 'no':u'{{subst:bruker:jhs/vk}}%s', @@ -226,10 +226,10 @@ # The edit summary for updating the welcome log (e.g. Updating log). summary2 = { 'commons':u'Updating log', - 'ar':u'تحديث السجل', + 'ar':u'????? ?????', 'de':u'Aktualisiere Logdatei', 'en':u'Updating log', - 'fa':u'به روز رسانی سیاهه', + 'fa':u'?? ??? ????? ?????', 'it':u'Aggiorno il log', 'nl':u'Logboek bijwerken', 'no':u'Oppdaterer logg', @@ -238,10 +238,10 @@ # The page where the bot will report users with a possibly bad username. report_page = { 'commons': u'Project:Administrators' noticeboard/User problems/Usernames to be checked', - 'ar': 'Project:إخطار الإداريين/أسماء مستخدمين للفحص', + 'ar': 'Project:????? ?????????/????? ???????? ?????', 'de': u'Benutzer:Filnik/Report', 'en': u'Project:Administrator intervention against vandalism', - 'fa': u'Project:تابلوی اعلانات مدیران/گزارش ربات', + 'fa': u'Project:?????? ??????? ??????/????? ????', 'it': u'Utente:Filbot/Report', 'nl': u'Project:Verzoekpagina voor moderatoren/RegBlok/Te controleren gebruikersnamen', 'no': u'Bruker:JhsBot II/Rapport', @@ -250,10 +250,10 @@ # The edit summary for reporting a possibly bad username. comment = { 'commons':u'Adding a username that needs to be checked', - 'ar':u'إضافة اسم مستخدم يحتاج للفحص', + 'ar':u'????? ??? ?????? ????? ?????', 'de':u'Ergänze zu überprüfenden Benutzernamen', 'en':u'Adding a username that needs to be checked', - 'fa':u'افزودن حساب کاربری نیازمند بررسی', + 'fa':u'?????? ???? ?????? ??????? ?????', 'it':u'Aggiunto utente da controllare', 'nl':u'Te controleren gebruikersnaam toegevoegd', 'no':u'Legger til et brukernavn som m? sjekkes', @@ -263,9 +263,9 @@ # (this parameter is optional). bad_pag = { 'commons': u'Project:Welcome log/Bad_names', - 'ar': u'Project:سجل الترحيب/أسماء سيئة', + 'ar': u'Project:??? ???????/????? ????', 'en': u'Project:Welcome log/Bad_names', - 'fa': u'Project:سیاهه خوشامد/نام بد', + 'fa': u'Project:????? ??????/??? ??', 'it': u'Utente:Filbot/Bad_words', 'nl': u'Project:Logboek_welkom/Bad_names', 'no': u'Bruker:JhsBot/Daarlige ord', @@ -278,7 +278,7 @@ 'ar':u"\n*{{user13|%s}}" + timeselected, 'de':u'\n*[[Benutzer Diskussion:%s]] ' + timeselected, 'en':u'\n*{{Userlinks|%s}} ' + timeselected, - 'fa':u'\n*{{کاربر|%s}}' + timeselected, + 'fa':u'\n*{{?????|%s}}' + timeselected, 'it':u"\n{{Reported|%s|", 'nl':u'\n*{{linkgebruiker%s}} ' + timeselected, 'no':u'\n*{{bruker|%s}} ' + timeselected, @@ -287,15 +287,15 @@ # Set where you load your list of signatures that the bot will load if you use # the random argument (this parameter is optional). random_sign = { - 'ar': u'ويكيبيديا:سجل الترحيب/توقيعات', - 'fa': u'Project:سیاهه خوشامد/امضاها', + 'ar': u'?????????:??? ???????/???????', + 'fa': u'Project:????? ??????/??????', 'en': u'User:Filnik/Sign', 'it': u'Project:Benvenuto log/User', } # The page where the bot reads the real-time whitelist page. # (this parameter is optional). whitelist_pg = { - 'ar':u'ويكيبيديا:سجل الترحيب/قائمةبيضاء', + 'ar':u'?????????:??? ???????/??????????', 'en':u'User:Filnik/whitelist', 'it':u'Utente:Filbot/whitelist', }
Modified: trunk/pywikipedia/wikipediatools.py =================================================================== --- trunk/pywikipedia/wikipediatools.py 2007-07-27 17:56:52 UTC (rev 3915) +++ trunk/pywikipedia/wikipediatools.py 2007-07-27 18:05:19 UTC (rev 3916) @@ -1,3 +1,4 @@ +__version__ = '$Id$' import os, sys
def absoluteFilename(*f):
Modified: trunk/pywikipedia/wiktionarytest.py =================================================================== --- trunk/pywikipedia/wiktionarytest.py 2007-07-27 17:56:52 UTC (rev 3915) +++ trunk/pywikipedia/wiktionarytest.py 2007-07-27 18:05:19 UTC (rev 3916) @@ -1,7 +1,8 @@ -#!/usr/bin/python +#!/usr/bin/python # -*- coding: utf-8 -*-
"""Unit tests for Wiktionary.py""" +__version__ = '$Id$'
import wiktionary import unittest
pywikipedia-l@lists.wikimedia.org