Hi!
My old problem is that repalce.py can't write the pages to work on into a
file on my disk. I have used a modificated version for years that does no
changes but writes the title of the involved pages to a subpage on Wikipedia
in automated mode, and then I can make the replacements from that page much
more quickly than directly from dump or living Wikipedia. This is slow and
generates a plenty of dummy edits.
In other words, replace.py has a tool to get the titles from a file (-file)
or from a wikipage (-links), but has no tool to generate this file.
Now I am ready to rewrite it. This way we can start it and the bot will find
all the possible articles to work on and save the titles without editing
Wikipedia (and without artificial delay), meanwhile we can have the lunch or
run a marathon or sleep. Then we make the replacements from this with -file.
My idea is that replace.py should have two new parameters:
-save writes the results into a new file instead of editing articles. It
overwrites existing file without notice.
-saveappend writes into a file or appends to the existing one.
OR:
-save writes and appends (primary mode)
-savenew writes and overwrites
The help is here:
http://docs.python.org/howto/unicode.html#reading-and-writing-unicode-data
So we have to import codecs.
My script is:
articles=codecs.open('cikkek.txt','a',encoding='utf-8')
...
tutuzuzu=u'# %s\n' %page.aslink() <-- needs rewrite to the new syntax
articles.write(unicode(tutuzuzu)) <-- needs further testing, if nicode() is
really needed
articles.flush()
It works fine except '\n' is a unix-styled newline that has to be converted
by lfcr.py in order to make it readable with notepad.exe.
This is with constant filename, that should be developed to get from command
line.
Your opinions before I begin?
--
Bináris
I want to read a special page with Page.get(). The message is:
File "C:\Program Files\Pywikipedia\wikipedia.py", line 601, in get
raise NoPage('%s is in the Special namespace!' % self.aslink())
pywikibot.exceptions.NoPage
What is the solution?
--
Bináris
Hello all,
On 27 January 2011 19:39, <info(a)gno.de> wrote:
> is anything wrong with pywikipediabot nightlies
> http://toolserver.org/~pywikipedia/nightly/ ? The last update is dated 31
> Dec 2010
>
Due to maintenance on the toolserver, the cronjobs were removed. I had not
thought of fixing the nightly cronjob, so the script that updates the
nightly releases did not run for the last month or so. In addition, the 7zip
releases have been broken for longer - this should be fixed now, too. Yay!
Xqt, thanks for the heads-up :-)
Best regards,
Merlijn 'valhallasw' van Deen
Hi Merlijn
is anything wrong with pywikipediabot nightlies http://toolserver.org/~pywikipedia/nightly/ ? The last update is dated 31 Dec 2010
Regards
xqt
----- Original Nachricht ----
Von: Merlijn van Deen <valhallasw(a)arctus.nl>
An: Pywikipedia discussion list <pywikipedia-l(a)lists.wikimedia.org>
Datum: 25.01.2011 17:38
Betreff: Re: [Pywikipedia-l] Problem with wiki-specific translations at TWN
> Hi TEIA,
>
> First of all, thanks for your comments. Let me first give some background
> on
> the implementation.
>
> On 25 January 2011 16:28, The Evil IP address
> <theevilipaddress(a)hotmail.de>wrote:
>
> > Within the localizations of redirect.py, there are two Wikipedia specific
> > translations, "redirect-remove-broken" (an edit summary), and
> > "redirect-broken-redirect-template" (the template code to propose a page
> for
> > speedy deletion).
> >
> During the Amsterdan hackathon, we (siebrand, roberthl and myself)
> discussed
> this situation. We decided that - especially as we wanted to implement it
> during the hackathon - to take the approach of having 'simple
> configuration'
> - i.e. the templace code in redirect-broken-redirect-template - in the TW
> database. Configuration that was not simple text still is in the source
> files.
>
> There is a more fundamental problem with this than 'translators don't
> understand it'. The more fundamental problem is configuration should not be
> centralized, but should be *per wiki*. This means we should split *
> translations* off to TW and *configuration* off to the local wikis.
> However,
> these are not always easily separatable - for instance an edit summary with
> a link - how would you separate that?
>
> As we did not want to go into the details of this splitting, we decided
> just
> to push it all to TW and to see how well it works.
>
> That's the background. Now to what we see today.
>
> The problem with the first message is that people don't translate the links
> > (or don't leave them out if there's no such page on their wiki), but just
> > use the same links. This is because the translators are used to the
> warnings
> > that one gets when they leave out links or parameters in other softwares.
> >
> This is a problem, of course. We could/might solve this with better
> documentation (the 'qqq' language).
>
>
> > It's bad because edit summaries can't be changed afterward, so the links
> > stay there forever.
> >
> I don't think this really is an issue. First of all, bot owners are
> responsible for their own edits, so they should check them. Secondly, there
> are /lots/ of old edit summaries with broken links. It's just what happens
> at a wiki - a page is deleted, and the link is b0rked.
>
> >
> >
>
>
> > What do you suggest to tell people what to do with these translations? Of
> > course, the already existing wrong translations need to be taken care of,
> > but it should also be prevented that such things happen again in the
> future.
> >
> I'm not quite sure. In the long run, we should work out the problem of how
> to split configuration and translation correctly. In the short run,
> improving the 'qqq'-documentation might be a good start.
>
> Best regards,
> Merlijn 'valhallasw' van Deen
>
>
> --------------------------------
>
> _______________________________________________
> Pywikipedia-l mailing list
> Pywikipedia-l(a)lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>
Hello everyone,
The recent move of the translations to TWN is IMHO a long overdue step. However, as it's still pretty much in its infancy, not everything is yet perfect, so certain issues need to be fixed. I have to bring one to your attention that is a serious one IMO.
Within the localizations of redirect.py, there are two Wikipedia specific translations, "redirect-remove-broken" (an edit summary), and "redirect-broken-redirect-template" (the template code to propose a page for speedy deletion).
The problem with the first message is that people don't translate the links (or don't leave them out if there's no such page on their wiki), but just use the same links. This is because the translators are used to the warnings that one gets when they leave out links or parameters in other softwares. It's bad because edit summaries can't be changed afterward, so the links stay there forever.
The other translation is the template used to mark a page for speedy deletion. Many users just translate them to "{{db-r1}}", just like the en.wikipedia template, even if such a template doesn't exist there. In case their wiki doesn't even have such a template elsewhere, the message should probably be ignored. This is in fact not as bad as the other message, because such a template can be tracked, but it makes another burden when broken redirects are tagged with a non-existant template.
What do you suggest to tell people what to do with these translations? Of course, the already existing wrong translations need to be taken care of, but it should also be prevented that such things happen again in the future. There doesn't appear to be other problems with translations of Pywikipedia, so just returning to the old way is not an option, but still I believe this isn't quite ideal.
Cheers,
The Evil IP address
Hi everyone,
There might have been some confusion about whether the email below was
a request for access or a suggestion for process (or both).
Lewis has requested SVN access, and no one has appeared to object.
Could one of the current committers weigh in with a "+1" for Lewis if
you approve, and anyone who objects speak now or hold your peace?
Rob
---------- Forwarded message ----------
From: Lewis Cawte <lewiscawte(a)googlemail.com>
Date: Tue, Jan 4, 2011 at 10:36 AM
Subject: Re: [Pywikipedia-l] Commit access requests
To: Pywikipedia discussion list <pywikipedia-l(a)lists.wikimedia.org>
So, I've been talking to robla, Multichil and briefly betacommand on
IRC today, and here are some of the ideas we came up (while talking
about me possibly requesting commit to pywikipediabot) with, full logs
below that...
Be active on the IRC channel or mailing list and have submitted a few
good patches via Sourceforge or other methods.
Keep it flexible, don't get strict on commit access, we haven't been
up before. It'd be nice to see a flow of new developers.
Gained community consensus via the mailing list. "The request for
commit access can be simultaneous with the mail to the mailing list"
These are just ideas, and of course, can still be expanded or fine-tuned.
--
My Request
Basicly, if I get consensus from this post on my request for commit,
I'll submit a request for commit access via the correct email address.
As you'll see in the logs below, I'm basicly interested at this point
in time in maintaining the non-WMF family files in the SVN, and
working on the i18n translation that I hear you guys are planning to
work on rather soon. As a member of the translatewiki.net staff, and
an active user of pywikipediabot, I think it'd be nice to help out
there.
I've submitted a few patches via IRC before which have been commited,
and been active in the community, in the IRC channel and have probably
posted to the mailing lists (don't have time to dig that up now) a few
times, despite being subscribed for a long time.
--
IRC Logs
[16:52:22] <Lcawte> robla: so, any news on pybot commit? What are the
ideas so far? I've only seen the mailing list ones
[16:53:18] <robla> Lcawte: so, in this case, I think I'll ask the
person asking for access to say "hi" on the mailing list
[16:53:36] <robla> as for a generalized process, I'm not sure
[16:53:40] <Lcawte> Hm...
[16:54:27] <robla> (to be clear, asking him to say "hi" and not
granting svn access yet)
[16:57:13] <Delta> robla: Id probably not grant access
[17:04:55] <Lcawte> Delta: any idea of what you'd like to see as
requirements for pybot commit?
[17:07:18] <Delta> Lcawte: several good patches and active with either
the mailing list/bug system/ or this channel
[17:07:24] <Multichil> Lcawte : Do you want access?
[17:10:13] <Lcawte> Active in this channel, thats mainly bots and the
odd occasional person when someone shows up for help
[17:10:20] <Lcawte> Multichil: yeah :P
[17:10:42] <Multichil> Anything in particulair? Maybe getting it translated?
[17:11:52] <Lcawte> I'd be happy to help whoever else wants to work on
that as well, yeah, maintaining family files, I've submitted a few
minor patches, if that means a few lines of code changed, one fixed a
script completely, the other added mainly Wikia support to a script
(timestamps)
[17:12:07] <Lcawte> (the patches were through this channel)
[17:13:40] <Multichil> Lcawte : Next week we're planning on adding
pywikipedia to translatewiki :-) That's why I'm asking
[17:14:07] <Multichil> You're not a totall strange to the community so why not?
[17:14:40] <Lcawte> I know a few people are interesting with helping
with that, so I'll be around and offering to help if people want
[17:14:47] <Multichil> We've never been really strict, no need to
become strict now
[17:14:57] <Lcawte> I think Siebrand is interested in helping with it
as well, not sure though
[17:15:25] <Multichil> He will also be there, Gerard too
[17:15:42] <Multichil> http://nl.wikimedia.org/wiki/Hackathon#Mensen
[17:16:17] <Lcawte> Thank goodness, because someone needs commit to
extensions so they can commit the Translate config
[17:23:10] <Lcawte> Multichil, robla, what do you recommend, as there
is no vetting procedure currently in place, start a post on the
mailing list and if theres a fair consensus, request it?
[17:24:19] <robla> Lcawte: that sounds good to me
[17:24:28] <Multichil> robla : Don't bother, just give him access ;-)
[17:24:31] <Lcawte> lol
[17:24:57] <Multichil> Too much red tape with the same end result anyway
[17:27:01] <Lcawte> The only problem with requesting it, is I have to
get past Tim, I think he has auto-deny on my requests, or atleast with
extensions lol... I get he would like some decent lines of code from
me and all, but its kinda getting a pain in the butt not having it for
translatewiki.net and stuff... (MediaWiki r79535, r79534, 79533 and
79531... and theres another one earlier than that..
[17:51:22] <robla> so, I don't know any of the history here. I like
what Lcawte is suggesting with maybe one minor tweak. the request for
commit access can be simultaneous with the mail to the mailing list
[17:53:42] <robla> Tim's concern last time I spoke to him about this
was just that he just didn't have a good sense of the pywikipediabot
community, so it was tough for him to make the call
[17:55:46] <Lcawte> Mm, kinda like my discussion about pybot commit
for my first extensions commit request
[17:56:52] <Lcawte> I wonder, what family files are out of date... :/
[18:01:51] <Lcawte> [17:59:34] <Lcawte> Hm, the i18n family needs
updating.. its missing a namespace or two, I know it is, because I
added one yesterday :P
[18:13:53] <Lcawte> Well, theres more than one out of date family file :|
[18:20:41] <Lcawte> robla: shall I email these ideas to the list?
[18:21:08] <robla> Lcawte: yeah, that'd be great
--
Thanks,
Lewis Cawte
On 30/12/10 23:57, Rob Lanphier wrote:
Hi everyone,
We're cleaning out the commit access request queue, and came upon a
request for commit access to pywikipediabot. Two questions:
1. How should we generally vet these requests?
2. The access request is from this person:
http://www.mediawiki.org/wiki/User:Ebraminio
Any objections to granting access for this person?
I'm "robla" on IRC, and I'm currently camped out in #pywikipediabot if
you'd like to ping me to discuss further.
Thanks
Rob
_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Hi everyone,
We're cleaning out the commit access request queue, and came upon a
request for commit access to pywikipediabot. Two questions:
1. How should we generally vet these requests?
2. The access request is from this person:
http://www.mediawiki.org/wiki/User:Ebraminio
Any objections to granting access for this person?
I'm "robla" on IRC, and I'm currently camped out in #pywikipediabot if
you'd like to ping me to discuss further.
Thanks
Rob
Is this patch published anywhere? It would be a good idea to do so for all these bot owners who wants to use that bug related python version.
xqt
----- Original Nachricht ----
Von: John <phoenixoverride(a)gmail.com>
An: Pywikipedia discussion list <pywikipedia-l(a)lists.wikimedia.org>
Datum: 31.12.2010 16:23
Betreff: Re: [Pywikipedia-l] [Toolserver-l] Default Python will change to 2.7
> Yeah, River patched the toolserver version to fix the known unicode problem
>
> Delta
>
> On Fri, Dec 31, 2010 at 10:21 AM, <info(a)gno.de> wrote:
>
> > Hi folks,
> >
> > there is py 2.7.1 running on toolserver and I found this version does not
> > trigger unicode bug #3081100 whereas py 2.7.1 downloaded from
> > www.python.org has still this bug. Are there any changes or fixes made on
> > ts version?
> >
> > Greetings
> > xqt
> >
> >
> > ----- Original Nachricht ----
> > Von: Merlijn van Deen <valhallasw(a)arctus.nl>
> > An: toolserver-l(a)lists.wikimedia.org
> > Datum: 22.11.2010 11:59
> > Betreff: Re: [Pywikipedia-l] [Toolserver-l] Default Python will change to
> > 2.7
> >
> > > Hello all,
> > >
> > > This is especially relevant for all interwiki bots on the toolserver.
> > > Do *not* use python 2.7 for those bots.
> > >
> > > There is a bug [1] in the unicode normalization that causes page
> > > titles to become mangled [2]. This, in turn, results in botwars [3].
> > > As such, interwiki bots on wikipedia should use a python version that
> > > does not have this bug, which means using a version before 2.6.5.
> > >
> > > Although you will get a warning message when using a python version
> > > that exhibits this bug, the bot will still work. As such, you may very
> > > well cause bot wars if you start using py2.7.
> > >
> > > Best regards,
> > > Merlijn van Deen
> > >
> > >
> > > [1] http://bugs.python.org/issue10254
> > > [2]
> > >
> >
> http://sourceforge.net/tracker/?func=detail&atid=603138&aid=3081100&group_id
>
> > > =93107
> > > [3]
> > >
> >
> http://de.wikipedia.org/w/index.php?title=GNU-Lizenz_f%C3%BCr_freie_Dokument
>
> > > ation&action=history
> > >
> > > On 22 November 2010 11:22, River Tarnell <river.tarnell(a)wikimedia.de>
> > > wrote:
> > > >
> > > > -----BEGIN PGP SIGNED MESSAGE-----
> > > > Hash: SHA1
> > > >
> > > > Hi,
> > > >
> > > > During the general maintenance on Dec 6th, we will change the default
> > > Python
> > > > version (/usr/bin/python) on the Solaris user servers from 2.6 to
> 2.7.
> > > You may
> > > > wish to test your tools with /usr/bin/python2.7 before then.
> > > >
> > > > - river.
> > > > -----BEGIN PGP SIGNATURE-----
> > > > Version: GnuPG v2.0.16 (FreeBSD)
> > > >
> > > > iEYEARECAAYFAkzqREgACgkQIXd7fCuc5vIhFQCgpX20z0B9xHikuwl+yiEUDzFH
> > > > WjYAn1wqm21wZjP1uQhsEO7RkxlTyE/N
> > > > =CqUE
> > > > -----END PGP SIGNATURE-----
> > > >
> > > > _______________________________________________
> > > > Toolserver-l mailing list (Toolserver-l(a)lists.wikimedia.org)
> > > > https://lists.wikimedia.org/mailman/listinfo/toolserver-l
> > > > Posting guidelines for this list:
> > > https://wiki.toolserver.org/view/Mailing_list_etiquette
> > >
> > > _______________________________________________
> > > Pywikipedia-l mailing list
> > > Pywikipedia-l(a)lists.wikimedia.org
> > > https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
> > >
> >
> > _______________________________________________
> > Pywikipedia-l mailing list
> > Pywikipedia-l(a)lists.wikimedia.org
> > https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
> >
>
>
> --------------------------------
>
> _______________________________________________
> Pywikipedia-l mailing list
> Pywikipedia-l(a)lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>