<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.python.pywikipediabot.general">
    <title>gmane.comp.python.pywikipediabot.general</title>
    <link>http://blog.gmane.org/gmane.comp.python.pywikipediabot.general</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12985"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12984"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12983"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12982"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12981"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12980"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12979"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12978"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12977"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12976"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12974"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12973"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12972"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12971"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12970"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12969"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12968"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12967"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12966"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12965"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12985">
    <title>Rewrite logging headers</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12985</link>
    <description>&lt;pre&gt;On the rewrite branch, how does one suppress the 20+ lines of logging
header that are output at the beginning of every script?

&lt;/pre&gt;</description>
    <dc:creator>Russell Blau</dc:creator>
    <dc:date>2013-05-15T20:08:13</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12984">
    <title>Re: redirect.py should (or at least give you the option to) tag for deletion broken redirects if the bot has not sysop rights</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12984</link>
    <description>&lt;pre&gt;Hi,

Thanks for your reply. My bot works currently at meta.wikimedia.org (Meta-Wiki). The speedy deletion tag is {{delete}} and accepts optional comments such as {{delete|1=Broken redirect.}}.

Regards,
M
----- Mensaje original -----
De: pywikipedia-l-request&amp;lt; at &amp;gt;lists.wikimedia.org
Enviado: 13-05-13 14:00
Para: pywikipedia-l&amp;lt; at &amp;gt;lists.wikimedia.org
Asunto: Pywikipedia-l Digest, Vol 70, Issue 9

Send Pywikipedia-l mailing list submissions to pywikipedia-l&amp;lt; at &amp;gt;lists.wikimedia.org To subscribe or unsubscribe via the World Wide Web, visit https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l or, via email, send a message with subject or body 'help' to pywikipedia-l-request&amp;lt; at &amp;gt;lists.wikimedia.org You can reach the person managing the list at pywikipedia-l-owner&amp;lt; at &amp;gt;lists.wikimedia.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Pywikipedia-l digest..." Today's Topics: 1. Re: redirect.py should (or at least give you the option to) tag for deletion broken redirects if the bot has not sysop rights (info&amp;lt; at &amp;gt;gno.de) 2. Re: Two wikidata bots (Jan Dudík) ---------------------------------------------------------------------- Message: 1 Date: Sun, 12 May 2
 013 17:58:20 +0200 (CEST) From: info&amp;lt; at &amp;gt;gno.de To: pywikipedia-l&amp;lt; at &amp;gt;lists.wikimedia.org Subject: Re: [Pywikipedia-l] redirect.py should (or at least give you the option to) tag for deletion broken redirects if the bot has not sysop rights Message-ID: &amp;lt;215129750.383650.1368374300935.JavaMail.ngmail&amp;lt; at &amp;gt;webmail08.arcor-online.net&amp;gt; Content-Type: text/plain; charset=ISO-8859-1 This behaviour was not changed in past. Maybe the corresponding deletion tag has been changed. At which wiki are you working whith it? xqt ----- Original Nachricht ---- Von: Marco Aurelio &amp;lt;maurelio&amp;lt; at &amp;gt;gmx.es&amp;gt; An: Lista pywikibot &amp;lt;pywikipedia-l&amp;lt; at &amp;gt;lists.wikimedia.org&amp;gt; Datum: 10.05.2013 19:36 Betreff: [Pywikipedia-l] redirect.py should (or at least give you the option to) tag for deletion broken redirects if the bot has not sysop rights
  &amp;gt; Hi, &amp;gt; &amp;gt; I run my bot in some projects where I do handle broken/double redirects &amp;gt; repairs. IIRC in the past the redirect.py script did tagged for deletion the &amp;gt; broken redirects if the bot didn't had sysop rights (or a sysop was not in &amp;gt; the 'sysopnames' var in user_config). &amp;gt; &amp;gt; Why was this functionality removed? Did it gave problems? - I would be &amp;gt; interested in having it back. I even remember having translated some &amp;gt; messages in translatewiki.net for that. &amp;gt; &amp;gt; Thank you, &amp;gt; -M. &amp;gt; &amp;gt; &amp;gt; -------------------------------- &amp;gt; &amp;gt; _______________________________________________ &amp;gt; Pywikipedia-l mailing list &amp;gt; Pywikipedia-l&amp;lt; at &amp;gt;lists.wikimedia.org &amp;gt; https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l &amp;gt;
_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l&amp;lt; at &amp;gt;lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
&lt;/pre&gt;</description>
    <dc:creator>Marco Aurelio</dc:creator>
    <dc:date>2013-05-15T20:07:01</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12983">
    <title>Re: SVN reaching end of life - migration plan needed</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12983</link>
    <description>&lt;pre&gt;
Ooh, you found my tool :) Cleaning up those rule files should be
pretty trivial, then we can convert all of the wanted history pretty
quickly. I've gone ahead and drafted a page on mw.org based on
the rules you wrote along with a survey of the existing SVN layout.

https://www.mediawiki.org/wiki/Git/Conversion/pywikipedia



I'm afraid I won't be making it this year.

-Chad
_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l&amp;lt; at &amp;gt;lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
&lt;/pre&gt;</description>
    <dc:creator>Chad Horohoe</dc:creator>
    <dc:date>2013-05-15T11:33:50</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12982">
    <title>Re: SVN reaching end of life - migration plan needed</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12982</link>
    <description>&lt;pre&gt;Hi Chad,

In December, I think the consensus was to move to Gerrit [1] -
basically with the goal to keep it as close as possible to mediawiki,
hopefully also easing contributions (to mw for pwb developers and vice
versa). I have put some initial work into the migration (see
https://github.com/pywikibot/svn2git ), but I have not had the time to
smooth out the wrinkles.

Will you be at the Hackathon next week? I think this would be a good
topic to discuss there.

Merlijn

[1] http://lists.wikimedia.org/pipermail/pywikipedia-l/2012-December/007657.html

On 15 May 2013 01:37, Chad Horohoe &amp;lt;chorohoe&amp;lt; at &amp;gt;wikimedia.org&amp;gt; wrote:

_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l&amp;lt; at &amp;gt;lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
&lt;/pre&gt;</description>
    <dc:creator>Merlijn van Deen</dc:creator>
    <dc:date>2013-05-15T08:19:35</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12981">
    <title>SVN reaching end of life - migration plan needed</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12981</link>
    <description>&lt;pre&gt;Hi all,

The time has finally come upon us--I'm finally moving forward with shutting
down SVN and making it a read-only service. As Pywikipedia is the only
consumer of SVN anymore, I wanted to reach out to the community to find
out what everyone wants to do. As I see it, there's three courses of action
that Pywikipedia can go in:

1) Move to Gerrit
2) Move to Git elsewhere (Github, Google Code, etc)
3) Move to some other SVN service

I'm more than willing to help with any of these choices--the first two would
involve a conversion of the history to Git, along with importing it to the
destination of choice. Staying with SVN is also potentially possible, I'm
more than  happy to provide full SVN dumps if someone's wanting to setup
that service elsewhere.

What are people's thoughts? I've not come up with a firm date yet, but
coming to consensus sooner rather than later would be nice.

Thanks!

-Chad H.
_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l&amp;lt; at &amp;gt;lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
&lt;/pre&gt;</description>
    <dc:creator>Chad Horohoe</dc:creator>
    <dc:date>2013-05-14T23:37:44</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12980">
    <title>Re: Two wikidata bots</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12980</link>
    <description>&lt;pre&gt;Sorry, I am not able to change scripts in that way - I am only user,
not developer ;-)

I meant - there are some infoboxes, which have
| foo = bar
but in artice is it presented as

Foo: [[bar]]

(example: [[cs:šablona:Infobox okres]])


JAnD
2013/5/11 Maarten Dammers &amp;lt;maarten&amp;lt; at &amp;gt;mdammers.nl&amp;gt;:



&lt;/pre&gt;</description>
    <dc:creator>Jan Dudík</dc:creator>
    <dc:date>2013-05-12T20:00:13</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12979">
    <title>Re: redirect.py should (or at least give you the option to) tag for deletion broken redirects if the bot has not sysop rights</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12979</link>
    <description>&lt;pre&gt;This behaviour was not changed in past. Maybe the corresponding deletion tag has been changed. At which wiki are you working whith it?

xqt


----- Original Nachricht ----
Von:     Marco Aurelio &amp;lt;maurelio&amp;lt; at &amp;gt;gmx.es&amp;gt;
An:      Lista pywikibot &amp;lt;pywikipedia-l&amp;lt; at &amp;gt;lists.wikimedia.org&amp;gt;
Datum:   10.05.2013 19:36
Betreff: [Pywikipedia-l] redirect.py should (or at least give you the option
 to) tag for deletion broken redirects if the bot has not sysop rights


_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l&amp;lt; at &amp;gt;lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
&lt;/pre&gt;</description>
    <dc:creator>info&lt; at &gt;gno.de</dc:creator>
    <dc:date>2013-05-12T15:58:20</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12978">
    <title>Re: Two wikidata bots</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12978</link>
    <description>&lt;pre&gt;I think we should do this even for upcoming data types (date, number) in
the Hackathon, together

I'll do that for the trunk branch :)


On Sat, May 11, 2013 at 7:38 PM, Maarten Dammers &amp;lt;maarten&amp;lt; at &amp;gt;mdammers.nl&amp;gt;wrote:




&lt;/pre&gt;</description>
    <dc:creator>Amir Ladsgroup</dc:creator>
    <dc:date>2013-05-12T06:18:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12977">
    <title>Re: Two wikidata bots</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12977</link>
    <description>&lt;pre&gt;Hi Jan,

Op 10-5-2013 9:38, Jan Dudík schreef:
You're welcome to expand it to support more data types! :-)

Maarten


_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l&amp;lt; at &amp;gt;lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
&lt;/pre&gt;</description>
    <dc:creator>Maarten Dammers</dc:creator>
    <dc:date>2013-05-11T15:08:59</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12976">
    <title>redirect.py should (or at least give you the option to) tag for deletion broken redirects if the bot has not sysop rights</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12976</link>
    <description>&lt;pre&gt;Hi,

I run my bot in some projects where I do handle broken/double redirects repairs. IIRC in the past the redirect.py script did tagged for deletion the broken redirects if the bot didn't had sysop rights (or a sysop was not in the 'sysopnames' var in user_config).

Why was this functionality removed? Did it gave problems? - I would be interested in having it back. I even remember having translated some messages in translatewiki.net for that.

Thank you,
-M.
_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l&amp;lt; at &amp;gt;lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
&lt;/pre&gt;</description>
    <dc:creator>Marco Aurelio</dc:creator>
    <dc:date>2013-05-10T17:36:22</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12974">
    <title>Re: Two wikidata bots</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12974</link>
    <description>&lt;pre&gt;It looks good,
but only works for [[links]], not for strings :-(

JAnD
2013/5/9 Maarten Dammers &amp;lt;maarten&amp;lt; at &amp;gt;mdammers.nl&amp;gt;:



&lt;/pre&gt;</description>
    <dc:creator>Jan Dudík</dc:creator>
    <dc:date>2013-05-10T07:38:56</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12973">
    <title>Two wikidata bots</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12973</link>
    <description>&lt;pre&gt;Hi everyone,

Today I published and documented two scripts to mass add claims using 
the rewrite branch:
* claimit.py: A script to mass add Wikidata claims to a lot of items 
based on pages on Wikipedia [1]
* harvest_template.py: A script to mass add Wikidata claims based on 
information harvested from Wikipedia templates. [2]
Both are still a bit rough, but now it's possible to add claims on 
Wikidata without writing a single line of code. Just run these bots from 
the commandline.

I implemented it in rewrite because the I like the implementation of 
Wikidata more than in trunk. It would be nice if trunk could just have 
the same objects and interface as rewrite. Any opinions of this?

Maarten

[1] https://www.mediawiki.org/wiki/Manual:Pywikipediabot/claimit.py
[2] https://www.mediawiki.org/wiki/Manual:Pywikipediabot/harvest_template.py


_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l&amp;lt; at &amp;gt;lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
&lt;/pre&gt;</description>
    <dc:creator>Maarten Dammers</dc:creator>
    <dc:date>2013-05-09T21:06:10</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12972">
    <title>Argument Parsing</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12972</link>
    <description>&lt;pre&gt;Hi all,

Would it ever make sense to change the whole -argumentname: command
line argument style? For instance, replace it with the standard
argument handling provided by Python[0] or (GNU) getopt[1]. As every
style change, this may just be me, but I can still list a couple of
reasons to do this:

- Standard command line arguments
- Offload the argument parsing code to tried and true libraries

Maybe in the rewrite branch?

David E. Narvaez

[0] http://docs.python.org/2/library/argparse.html
[1] http://docs.python.org/2/library/getopt.html

_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l&amp;lt; at &amp;gt;lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
&lt;/pre&gt;</description>
    <dc:creator>David Narvaez</dc:creator>
    <dc:date>2013-05-09T05:21:34</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12971">
    <title>Re: Pywikipedia-l Digest, Vol 70, Issue 3</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12971</link>
    <description>&lt;pre&gt;Sorawee Porncharoenwase &amp;lt;nullzero.free&amp;lt; at &amp;gt;gmail.com&amp;gt;:

And for me.  Many thanks!

Michael Hamm

_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l&amp;lt; at &amp;gt;lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
&lt;/pre&gt;</description>
    <dc:creator>Michael Hamm</dc:creator>
    <dc:date>2013-05-05T15:22:19</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12970">
    <title>Re: replacing based on two regexes not near eachother</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12970</link>
    <description>&lt;pre&gt;Okay, This code works for me.

#------- user-fixes.py -------
import re

def homophix(match):
    return re.sub(r'(\{\{homophones\|)([^}=]*\}\})',
                  r'\1lang={{subst:langrev|'+match.group(1)+r'}}|\2',
                  match.group(0)
                  )

fixes['homophones'] = {
    'regex': True,
    'msg': {'_default':u'add lang to homophones'},
    'replacements': [
        (r'(?m)^== *([^\n]+) *== *((?!==(?!=))[^\n]*\n)*', homophix)
    ]
}
#--------------

See
http://en.wiktionary.org/w/index.php?title=Wiktionary%3ASandbox&amp;amp;diff=20335085&amp;amp;oldid=20335084for
its edit.


On Fri, May 3, 2013 at 4:02 AM, Michael Hamm &amp;lt;msh210&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:




&lt;/pre&gt;</description>
    <dc:creator>Sorawee Porncharoenwase</dc:creator>
    <dc:date>2013-05-03T12:09:25</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12969">
    <title>Re: replacing based on two regexes not near eachother</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12969</link>
    <description>&lt;pre&gt;Several hours ago, I wrote, in part:

I've taken the advice I've gotten on-list, but the script still
doesn't work.  I'd appreciate any further ideas.

Thanks,

Michael Hamm

_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l&amp;lt; at &amp;gt;lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
&lt;/pre&gt;</description>
    <dc:creator>Michael Hamm</dc:creator>
    <dc:date>2013-05-02T21:02:08</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12968">
    <title>Re: replacing based on two regexes not near eachother</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12968</link>
    <description>&lt;pre&gt;Bináris &amp;lt;wikiposta&amp;lt; at &amp;gt;gmail.com&amp;gt;:

Sorawee Porncharoenwase &amp;lt;nullzero.free&amp;lt; at &amp;gt;gmail.com&amp;gt;:

Thank you both very much.  Probably (I won't be able to test it until
later today) these were the problem -- or part of it.

Michael Hamm

_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l&amp;lt; at &amp;gt;lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
&lt;/pre&gt;</description>
    <dc:creator>Michael Hamm</dc:creator>
    <dc:date>2013-05-02T15:25:35</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12967">
    <title>Re: replacing based on two regexes not near eachother</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12967</link>
    <description>&lt;pre&gt;&amp;lt; at &amp;gt;Bináris: "(?m)" means /^/ and /$/ will also match beginning and ending of
lines, while "(?s)" means /./ will also match "\n". These two flags are not
the same and can't use interchangeably.

&amp;lt; at &amp;gt;Michael Hamm: Beside Bináris's suggestion, re.escape should be used only
on pattern parameter, not replacing text; use match.group(1) instead of
re.escape(match.group(1))

On Thu, May 2, 2013 at 2:41 PM, Bináris &amp;lt;wikiposta&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:



&lt;/pre&gt;</description>
    <dc:creator>Sorawee Porncharoenwase</dc:creator>
    <dc:date>2013-05-02T08:32:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12966">
    <title>Re: replacing based on two regexes not near eachother</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12966</link>
    <description>&lt;pre&gt;Try this first in replacements:

ur'(?m)^== *([a-zA-Z ]+) *==\n+ etc.
m for multiline (sometimes ?s works instead, I just use it without
understanding why), and space* in case there are spaces between == marks.

&lt;/pre&gt;</description>
    <dc:creator>Bináris</dc:creator>
    <dc:date>2013-05-02T07:41:11</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12965">
    <title>replacing based on two regexes not near each other</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12965</link>
    <description>&lt;pre&gt;Hi,

Each ns:0 page on English Wiktionary is divided into a bunch of
sections headed by level-2 headers.  The text of each level-2 header
is the name of a language; e.g., ==English==.

I use (something like) the following JavaScript when editing pages:

txt =
  txt.replace
  ( /^==([a-zA-Z ]+)==\n+(?:(?:===|[^=]).*\n+)*/gm,
    function(section, langname)
    { return '' +
        section.replace
        ( /(\{\{homophones\|)([^=}]*\}\})/gm,
          '$1lang={'+'{subst:langrev|'+langname+'}}|$2'
        );
    }
  );

This searches for {{homophones|...}} without a lang= parameter and
adds the lang= parameter appropriate for the ==section== in which
{{homophones|...}} appears.  This works.

I want to automate this, so wish to use pywikipediabot.  So I've
translated the above into Python as best I could, and come up with the
following user-fixes.py :

def homophix(match):
    return re.sub(r'(\{\{homophones\|)([^}=]*\}\})',
                  r'\1lang={{subst:langrev|'+re.escape(match.group(1))+r'}}|\2',
                  match.group(0)
                  )

fixes['homophones'] = {
    'regex': True,
    'msg': {'_default':u'add lang to homophones'},
    'replacements': [
        (ur'^==([a-zA-Z ]+)==\n+(?:(?:===|[^=]).*\n+)*', homophix)
    ]
}

...which I then tried to call using
python replace.py -fix:homophones -page:accapare


(Note that [[wikt:en:accapare]] has {{homophones|...}} without = .)

Python told me:
No changes were necessary in [[accapare]]
0 pages were changed.

So I guess it's either not matching or not replacing.

What am I doing wrong?

And what can I do instead?

Thanks,

Michael Hamm

_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l&amp;lt; at &amp;gt;lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
&lt;/pre&gt;</description>
    <dc:creator>Michael Hamm</dc:creator>
    <dc:date>2013-05-02T06:40:32</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12964">
    <title>Re: [rewrite] Using pywikibot.Timestamp instead of raw MediaWiki ones</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pywikipediabot.general/12964</link>
    <description>&lt;pre&gt;In function getVersionHistory, it should be
"pywikibot.Timestamp.fromISOformat", not
"pywikibot.Timestamp.fromtimestampformat"


On Sat, Apr 27, 2013 at 6:34 PM, legoktm &amp;lt;legoktm.wikipedia&amp;lt; at &amp;gt;gmail.com&amp;gt;wrote:



&lt;/pre&gt;</description>
    <dc:creator>Sorawee Porncharoenwase</dc:creator>
    <dc:date>2013-04-29T13:07:20</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.python.pywikipediabot.general">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.python.pywikipediabot.general</link>
  </textinput>
</rdf:RDF>
