The help of replace.py says that it will work on all pages found with a search. As far as I see, this is not the truth -- in two cases listed it exactly 100 titles to work on, while there were more than 100. (I also used -namespace:0 in command line.)
Pagegenerators.py has: def SearchPageGenerator(query, *number = 100*, namespaces = None, site = None): but no possibility to pass a different number from command line. Please enhance it with a number parameter.
2010/12/8 Bináris wikiposta@gmail.com
The help of replace.py says that it will work on all pages found with a search. As far as I see, this is not the truth -- in two cases listed it exactly 100 titles to work on, while there were more than 100. (I also used -namespace:0 in command line.)
-- Bináris
One more word to this topic: this is very much actual now due to long lasting lack of dumpserver, since we can solve a plenty of problems wit -search now without dumps.
done in r8801.
Greetings and merry christmas xqt
----- Original Nachricht ---- Von: Bináris wikiposta@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 18.12.2010 09:59 Betreff: Re: [Pywikipedia-l] Replace.py bug? No more than 100 items with -search
One more word to this topic: this is very much actual now due to long lasting lack of dumpserver, since we can solve a plenty of problems wit -search now without dumps.
-- Bináris
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
It is still open on SourceForge. And thanks again here publicly, the previous went to private address.
2010/12/26 info@gno.de
done in r8801.
Bináris
command: D:\Development\pywikibot>python replace.py "-cat:Dumpers" "|\n|-" "|Yes\n|-" It makes no chnge even the the dumpers page are full of tables with | empty followed by |- any help please?
First, you must specify -regex in the command if you want "\n" to mean a newline instead of literal \n. Second, "-cat:Dumpers" is not correct, use -cat:"Dumpers" or simply -cat:Dumpers instead, if you want to work with this category. ("" is only necessary if your category name has a space.)
2011/1/16 CobraSA CobraSA@live.com
command: D:\Development\pywikibot>python replace.py "-cat:Dumpers" "|\n|-" "|Yes\n|-" It makes no chnge even the the dumpers page are full of tables with | empty followed by |-
any help please?
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
And it is likely that once you have specified -regex, you have to type | instead of |, because | has a special meaning in regexes.
2011/1/16 Bináris wikiposta@gmail.com
First, you must specify -regex in the command if you want "\n" to mean a newline instead of literal \n. Second, "-cat:Dumpers" is not correct, use -cat:"Dumpers" or simply -cat:Dumpers instead, if you want to work with this category. ("" is only necessary if your category name has a space.)
2011/1/16 CobraSA CobraSA@live.com
command: D:\Development\pywikibot>python replace.py "-cat:Dumpers" "|\n|-" "|Yes\n|-" It makes no chnge even the the dumpers page are full of tables with | empty followed by |-
any help please?
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
-- Bináris
Hi
Thanks for helping
D:\Development\pywikibot>python replace.py -cat:Dumpers -regex "|\n|-" "|Yes\n|-" didn’t work at all
and without the \ before | it sort of freeze
From: Bináris Sent: Sunday, January 16, 2011 11:39 AM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] problem with replace.py
And it is likely that once you have specified -regex, you have to type | instead of |, because | has a special meaning in regexes.
2011/1/16 Bináris wikiposta@gmail.com
First, you must specify -regex in the command if you want "\n" to mean a newline instead of literal \n. Second, "-cat:Dumpers" is not correct, use -cat:"Dumpers" or simply -cat:Dumpers instead, if you want to work with this category. ("" is only necessary if your category name has a space.)
2011/1/16 CobraSA CobraSA@live.com
command: D:\Development\pywikibot>python replace.py "-cat:Dumpers" "|\n|-" "|Yes\n|-" It makes no chnge even the the dumpers page are full of tables with | empty followed by |- any help please?
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
-- Bináris
What does it mean "didn’t work at all"? What have you seen on the screen? Are you sure those are really empty, and no space in them?
By the way, now I remember, that earlier I had problems, too, when I wanted to substitute a newline (searching works well).
2011/1/16 CobraSA CobraSA@live.com
Hi
Thanks for helping
D:\Development\pywikibot>python replace.py -cat:Dumpers -regex "|\n|-" "|Yes\n|-" didn’t work at all
and without the \ before | it sort of freeze
*From:* Bináris wikiposta@gmail.com *Sent:* Sunday, January 16, 2011 11:39 AM *To:* Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org *Subject:* Re: [Pywikipedia-l] problem with replace.py
And it is likely that once you have specified -regex, you have to type | instead of |, because | has a special meaning in regexes.
2011/1/16 Bináris wikiposta@gmail.com
First, you must specify -regex in the command if you want "\n" to mean a newline instead of literal \n. Second, "-cat:Dumpers" is not correct, use -cat:"Dumpers" or simply -cat:Dumpers instead, if you want to work with this category. ("" is only necessary if your category name has a space.)
2011/1/16 CobraSA CobraSA@live.com
command: D:\Development\pywikibot>python replace.py "-cat:Dumpers" "|\n|-" "|Yes\n|-" It makes no chnge even the the dumpers page are full of tables with | empty followed by |-
any help please?
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
-- Bináris
-- Bináris
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
didn’t work I mean, nothing was changed Yes I’m sure there’s no space after the “|”
From: Bináris Sent: Sunday, January 16, 2011 12:20 PM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] problem with replace.py
What does it mean "didn’t work at all"? What have you seen on the screen? Are you sure those are really empty, and no space in them?
By the way, now I remember, that earlier I had problems, too, when I wanted to substitute a newline (searching works well).
2011/1/16 CobraSA CobraSA@live.com
Hi
Thanks for helping
D:\Development\pywikibot>python replace.py -cat:Dumpers -regex "|\n|-" "|Yes\n|-" didn’t work at all
and without the \ before | it sort of freeze
From: Bináris Sent: Sunday, January 16, 2011 11:39 AM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] problem with replace.py
And it is likely that once you have specified -regex, you have to type | instead of |, because | has a special meaning in regexes.
2011/1/16 Bináris wikiposta@gmail.com
First, you must specify -regex in the command if you want "\n" to mean a newline instead of literal \n. Second, "-cat:Dumpers" is not correct, use -cat:"Dumpers" or simply -cat:Dumpers instead, if you want to work with this category. ("" is only necessary if your category name has a space.)
2011/1/16 CobraSA CobraSA@live.com
command: D:\Development\pywikibot>python replace.py "-cat:Dumpers" "|\n|-" "|Yes\n|-" It makes no chnge even the the dumpers page are full of tables with | empty followed by |- any help please?
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
-- Bináris
-- Bináris
------------------------------------------------------------------------------
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Hi guys,
Op 16-1-2011 12:20, Bináris schreef:
What does it mean "didn’t work at all"? What have you seen on the screen? Are you sure those are really empty, and no space in them?
By the way, now I remember, that earlier I had problems, too, when I wanted to substitute a newline (searching works well).
Try using \r\n for finding the newline, so someting like "|\r\n|-" "|Yes\n|-"
Maarten
2011/1/16 CobraSA <CobraSA@live.com mailto:CobraSA@live.com>
Hi Thanks for helping D:\Development\pywikibot>python replace.py -cat:Dumpers -regex "\|\n\|-" "\|Yes\n\|-" didn’t work at all and without the \ before | it sort of freeze *From:* Bináris <mailto:wikiposta@gmail.com> *Sent:* Sunday, January 16, 2011 11:39 AM *To:* Pywikipedia discussion list <mailto:pywikipedia-l@lists.wikimedia.org> *Subject:* Re: [Pywikipedia-l] problem with replace.py And it is likely that once you have specified -regex, you have to type \| instead of |, because | has a special meaning in regexes. 2011/1/16 Bináris <wikiposta@gmail.com <mailto:wikiposta@gmail.com>> First, you must specify -regex in the command if you want "\n" to mean a newline instead of literal \n. Second, "-cat:Dumpers" is not correct, use -cat:"Dumpers" or simply -cat:Dumpers instead, if you want to work with this category. ("" is only necessary if your category name has a space.) 2011/1/16 CobraSA <CobraSA@live.com <mailto:CobraSA@live.com>> command: D:\Development\pywikibot>python replace.py "-cat:Dumpers" "|\n|-" "|Yes\n|-" It makes no chnge even the the dumpers page are full of tables with | empty followed by |- any help please? _______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org <mailto:Pywikipedia-l@lists.wikimedia.org> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l -- Bináris -- Bináris ------------------------------------------------------------------------ _______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org <mailto:Pywikipedia-l@lists.wikimedia.org> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l _______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org <mailto:Pywikipedia-l@lists.wikimedia.org> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
-- Bináris
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
I already tried that, no change is made. Thanks
From: Maarten Dammers Sent: Sunday, January 16, 2011 12:29 PM To: pywikipedia-l@lists.wikimedia.org Subject: Re: [Pywikipedia-l] problem with replace.py
Hi guys,
Op 16-1-2011 12:20, Bináris schreef: What does it mean "didn’t work at all"? What have you seen on the screen? Are you sure those are really empty, and no space in them?
By the way, now I remember, that earlier I had problems, too, when I wanted to substitute a newline (searching works well).
Try using \r\n for finding the newline, so someting like "|\r\n|-" "|Yes\n|-"
Maarten
2011/1/16 CobraSA CobraSA@live.com
Hi
Thanks for helping
D:\Development\pywikibot>python replace.py -cat:Dumpers -regex "|\n|-" "|Yes\n|-" didn’t work at all
and without the \ before | it sort of freeze
From: Bináris Sent: Sunday, January 16, 2011 11:39 AM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] problem with replace.py
And it is likely that once you have specified -regex, you have to type | instead of |, because | has a special meaning in regexes.
2011/1/16 Bináris wikiposta@gmail.com
First, you must specify -regex in the command if you want "\n" to mean a newline instead of literal \n. Second, "-cat:Dumpers" is not correct, use -cat:"Dumpers" or simply -cat:Dumpers instead, if you want to work with this category. ("" is only necessary if your category name has a space.)
2011/1/16 CobraSA CobraSA@live.com
command: D:\Development\pywikibot>python replace.py "-cat:Dumpers" "|\n|-" "|Yes\n|-" It makes no chnge even the the dumpers page are full of tables with | empty followed by |- any help please?
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
-- Bináris
-- Bináris
----------------------------------------------------------------------------
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
-- Bináris
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
-------------------------------------------------------------------------------- _______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
could it be a bug in replace.py?
From: Bináris Sent: Sunday, January 16, 2011 11:39 AM To: Pywikipedia discussion list Subject: Re: [Pywikipedia-l] problem with replace.py
And it is likely that once you have specified -regex, you have to type | instead of |, because | has a special meaning in regexes.
2011/1/16 Bináris wikiposta@gmail.com
First, you must specify -regex in the command if you want "\n" to mean a newline instead of literal \n. Second, "-cat:Dumpers" is not correct, use -cat:"Dumpers" or simply -cat:Dumpers instead, if you want to work with this category. ("" is only necessary if your category name has a space.)
2011/1/16 CobraSA CobraSA@live.com
command: D:\Development\pywikibot>python replace.py "-cat:Dumpers" "|\n|-" "|Yes\n|-" It makes no chnge even the the dumpers page are full of tables with | empty followed by |- any help please?
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
-- Bináris