Revision: 4647
Author: rotem
Date: 2007-12-09 11:40:15 +0000 (Sun, 09 Dec 2007)
Log Message:
-----------
Avoid possible try to login as a sysop because of an edit restriction for autoconfirmed users.
Modified Paths:
--------------
trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py 2007-12-09 11:35:19 UTC (rev 4646)
+++ trunk/pywikipedia/wikipedia.py 2007-12-09 11:40:15 UTC (rev 4647)
@@ -878,7 +878,7 @@
return True
try:
- if self.editRestriction:
+ if self.editRestriction == 'sysop':
self.site().forceLogin(sysop=True)
else:
self.site().forceLogin()
@@ -1349,7 +1349,7 @@
* page is unprotected, and bot has an account for this site, or
* page is protected, and bot has a sysop account for this site.
"""
- if self.editRestriction:
+ if self.editRestriction == 'sysop':
userdict = config.sysopnames
else:
userdict = config.usernames
Revision: 4646
Author: rotem
Date: 2007-12-09 11:35:19 +0000 (Sun, 09 Dec 2007)
Log Message:
-----------
Adding a language parameter to testfamily.py, to check some comma-seperated languages.
Modified Paths:
--------------
trunk/pywikipedia/testfamily.py
Modified: trunk/pywikipedia/testfamily.py
===================================================================
--- trunk/pywikipedia/testfamily.py 2007-12-09 10:53:43 UTC (rev 4645)
+++ trunk/pywikipedia/testfamily.py 2007-12-09 11:35:19 UTC (rev 4646)
@@ -28,7 +28,6 @@
def testSite(site):
try:
-
wikipedia.getall(site, [wikipedia.Page(site, 'Any page name')])
except KeyboardInterrupt:
raise
@@ -39,22 +38,28 @@
def main():
all = False
+ language = None
for arg in wikipedia.handleArgs():
if arg == '-all':
all = True
-
+ elif arg[0:10] == '-language:':
+ language = arg[10:]
+
mySite = wikipedia.getSite()
+ if language is None:
+ language = mySite.lang
fam = mySite.family
if all:
for lang in fam.langs.iterkeys():
testSite(wikipedia.getSite(lang))
else:
- testSite(mySite)
-
+ languages = language.split(',')
+ for lang in languages:
+ testSite(wikipedia.getSite(lang))
+
if False:
# skip until the family gets global fixing
-
wikipedia.output(u"\n\n------------------ namespace table -------------------\n");
wikipedia.output(u" self.namespaces = {")
Anyone interested in joining the project? :)
Here is the initial content of the page
http://meta.wikimedia.org/wiki/Hello%2C_world!_project
'''[[w:en:Hello world program|Hello, world!]]''' is usually one of the
simplest possible programs in some programming language. However, it
becomes very complex if you want to put it on every [[Wikimedia]]
project in every language.
The goal of this project is not to show one more trivia implemented in
multilingual wiki environment, but to make roots for building
multilingual bots on (Media)Wiki based projects. It should be, also, an
educational material for future bot programmers.
The project is in the early state of development, and all constructive
inputs are welcome.
== "Simple" things to do ==
* Be sure that you know what are you doing. If you make a mess on some
project, you will be blocked there. If you make a mess on all projects,
you will be blocked everywhere.
* Make a page <nowiki>[[</nowiki>User:Your'''Bot'''Name/Hello, world!]]
with sentence "Hello, world!" on all Wikimedian projects.
** ''Simple'' note: You will need to open accounts for you and your bot
on all Wikimedian projects (if you didn't do yet) and verify your email
addresses. You will, also, need to wait four days for "maturity" of your
accounts.
** It is, also, a matter of good manners to introduce yourself and your
bot to the people of particular projects.
*** If you don't know particular language, it is good enough to write it
in English.
*** If you don't want to do copy-paste your text 1000+ times, make it
with your bot.
*** Tell something about you at your user page (including languages
which you are speaking by using Babel templates)
**** There are no some Babel templates on some projects? Copy it from
[[:en:|English Wikipedia]]. Of course, use bot for that if you are not a
masochist ;)
*** Tell something like "This is <YourUserName>'s test bot and it will
operating only inside of its and my user space" at your bot's user page.
*** Put interwiki links on all of your and your bot's user pages.
** Try to find some clever way how to translate "Hello, world!" in a
number of languages. [http://translate.google.com/ Google Translator] is
one of useful method for doing so. However, it has only a couple of
languages and Wikimedia has only a couple of hundreds of languages. If
you find some good method for doing so, please [[Talk:Hello, world!
project|let us know]].
*** Of course, maybe it is possible to find translations of this
sentence on the Internet?
*** You may ask native speakers to translate the sentence.
*** And, don't be disappointed if you don't have a translation. If you
tried all possible and impossible methods, make a page in English, your
language or some regional lingua franca.
** [[Talk:Hello, world! project|Let us know]] on how many projects in
how many languages you wrote "Hello, world!".
* Make a bot for checking updates of your "Hello, world!" pages and its
talk pages. Start it every day (or put it in the crontab of '''your'''
computer). Program should make output on some subpage of your bot's page
here, on Meta. Other option is to put feeds for all of the pages in your
favorite feed reader.
* [[Hello, world! project/code|Show the code]].
== Participants ==
Write it in the form:
<pre>
=== UserName, BotName ===
* phase 1
* phase 2
* phase ...
* phase n
* '''Current phase'''
</pre>
=== [[User:Millosh|Millosh]], [[User:Millbot|Millbot]] ===
* '''Making accounts.'''
[[Category:Bots]]
Feature Requests item #1846966, was opened at 2007-12-08 10:45
Message generated for change (Comment added) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1846966&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: sorting order on nds
Initial Comment:
Please add in "families/wikipedia_family.py", line 641 under "self.interwiki_putfirst" the line
'nds': ['nds-nl','pdc'] + self.alphabetic,
cause the Low Saxon Wikipedia wants interwiki links to Dutch Low Saxon at the beginning of the interwiki list. The Plautdietsch project with the code pdc does not yet exist, but a proposal is running and we want to include it at the beginning of the interwiki list right from the start.
Thanks in advance
Marcus Buck
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2007-12-08 10:47
Message:
Logged In: NO
Oh, sorry, of course the code for Plautdietsch is pdt, so it should be
'nds': ['nds-nl','pdt'] + self.alphabetic,
Marcus Buck
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1846966&group_…
Feature Requests item #1846966, was opened at 2007-12-08 10:45
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1846966&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: sorting order on nds
Initial Comment:
Please add in "families/wikipedia_family.py", line 641 under "self.interwiki_putfirst" the line
'nds': ['nds-nl','pdc'] + self.alphabetic,
cause the Low Saxon Wikipedia wants interwiki links to Dutch Low Saxon at the beginning of the interwiki list. The Plautdietsch project with the code pdc does not yet exist, but a proposal is running and we want to include it at the beginning of the interwiki list right from the start.
Thanks in advance
Marcus Buck
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1846966&group_…
Patches item #1843789, was opened at 2007-12-04 03:20
Message generated for change (Settings changed) made by toobaz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1843789&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
>Priority: 7
Private: No
Submitted By: Pietro Battiston (toobaz)
Assigned to: Nobody/Anonymous (nobody)
Summary: making image.py work
Initial Comment:
The following command:
python image.py pippo.png
gives the following output:
Checked for running processes. 1 processes currently running, including the
current process.
'Page' object has no attribute 'usingPages'
The problem is that oldImagePage is an instance of wikipedia.Page instead
of wikipedia.ImagePage.
I attach a very simple patch that fixes it. Then, everything works.
----------------------------------------------------------------------
Comment By: Pietro Battiston (toobaz)
Date: 2007-12-08 12:37
Message:
Logged In: YES
user_id=1553460
Originator: YES
Sorry, the original summary was totally wrong. The problem is in image.py,
not replace.py
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1843789&group_…
Patches item #1843789, was opened at 2007-12-04 03:20
Message generated for change (Comment added) made by toobaz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1843789&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Pietro Battiston (toobaz)
Assigned to: Nobody/Anonymous (nobody)
>Summary: making image.py work
Initial Comment:
The following command:
python image.py pippo.png
gives the following output:
Checked for running processes. 1 processes currently running, including the
current process.
'Page' object has no attribute 'usingPages'
The problem is that oldImagePage is an instance of wikipedia.Page instead
of wikipedia.ImagePage.
I attach a very simple patch that fixes it. Then, everything works.
----------------------------------------------------------------------
>Comment By: Pietro Battiston (toobaz)
Date: 2007-12-08 12:37
Message:
Logged In: YES
user_id=1553460
Originator: YES
Sorry, the original summary was totally wrong. The problem is in image.py,
not replace.py
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1843789&group_…