I am running replace.py and have several questions. Any help on any of the
questions would be appreciated.
* Can I replace only the first result per page?
* Can I exclude hits within a wikilink, url or header? E.g. can I look for
appropriate technology but ensure it's not inside a wikilink, e.g.
* [[Peter's appropriate technology lamp]] or
* [[Wikipedia:Appropriate technology|appropriate technology stuff at
Wikipedia]]) or
* http://forum.permaculture.org (if I'm looking for "permaculture").
* == Permaculture program ==
Thanks - and thanks also to Merlijn van Deen for answering my last question.
--
Chris Watkins (a.k.a. Chriswaterguy)
Appropedia.org - Sharing knowledge to build rich, sustainable lives.
Blog: chriswaterguy.livejournal.com/
Buying at Amazon, eBay etc? Start at http://appropedia.maatiam.com and a
percentage of your purchase supports Appropedia - at no extra cost.
Where men are the most sure and arrogant, they are commonly the most
mistaken, and have there given reins to passion, without that proper
deliberation and suspense, which can alone secure them from the grossest
absurdities. -- David Hume
When using replace.py without the -always parameter, I've found a serious
problem: If I accidentally interrupt the operation,* I get a message like
the following, "Waiting for xx pages to be put. Estimated time remaining:
xxxxx" - however, it fails to make the changes, even when I leave it a long
time. If I've made a lot of changes, this is a very big problem. The full
output is shown below.
*I wanted to copy a page name to edit manually, and reflexively used ctrl+C
to copy, but of course this is a KeyboardInterrupt. It's very ingrained
habit, and realistically I'm likely to make the same mistake in future.
--
Do you want to accept these changes? ([y]es, [N]o, [e]dit, open in
[b]rowser, [a]ll, [q]uit) Traceback (most recent call last):
File "/home/cwg/pwb/pagegenerators.py", line 763, in __iter__
yield loaded_page
GeneratorExit
Traceback (most recent call last):
File "replace.py", line 694, in <module>
main()
File "replace.py", line 690, in main
bot.run()
File "replace.py", line 387, in run
['y', 'N', 'e', 'b', 'a', 'q'], 'N')
File "/home/cwg/pwb/wikipedia.py", line 6228, in inputChoice
data = ui.inputChoice(question, answers, hotkeys, default).lower()
File "/home/cwg/pwb/userinterfaces/terminal_interface.py", line 261, in
inputChoice
answer = self.input(prompt)
File "/home/cwg/pwb/userinterfaces/terminal_interface.py", line 238, in
input
text = raw_input()
KeyboardInterrupt
Waiting for 67 pages to be put. Estimated time remaining: 0:11:10
--
Chris Watkins (a.k.a. Chriswaterguy)
Appropedia.org - Sharing knowledge to build rich, sustainable lives.
Blog: chriswaterguy.livejournal.com/
Buying at Amazon, eBay etc? Start at http://appropedia.maatiam.com and a
percentage of your purchase supports Appropedia - at no extra cost.
Where men are the most sure and arrogant, they are commonly the most
mistaken, and have there given reins to passion, without that proper
deliberation and suspense, which can alone secure them from the grossest
absurdities. -- David Hume
Bugs item #2007115, was opened at 2008-06-30 23:03
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2007115&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: other
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: H92-nowiki (h92-nowiki)
Assigned to: Nobody/Anonymous (nobody)
Summary: SyntaxError: invalid syntax
Initial Comment:
python version.py output:
Pywikipedia [http] trunk/pywikipedia (r5660, Jun 30 2008, 13:04:44)
Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04)
[GCC 4.0.1 (Apple Computer, Inc. build 5367)]
OK: Recently, clean_sandbox.py, replace.py, template.py and more have failed, producing the same message:
File "/[blablabla]/clean_sandbox.py", line 55
<<<<<<< .mine
^
SyntaxError: invalid syntax
The other scripts I mentioned also produce this (but with another line number), replace.py produces line 156 for instance.
What is this, how can it be fixed?
Oh, and I apologize for any mistakes in this report, it's my first time. :)
Best regards,
w:no:User:H92
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2007115&group_…
Patches item #2005964, was opened at 2008-06-29 17:23
Message generated for change (Comment added) made by melancholie
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2005964&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: 6
Private: No
Submitted By: Melancholie (melancholie)
Assigned to: Nobody/Anonymous (nobody)
Summary: Update/optimization of featured.py
Initial Comment:
1. added dsb summary
2. removed all namespace prefixes (else they just get obsolete with the time); using English standards in that patch (how to use module dicts?)...
Diff patch is attached ;-)
See also coloured diff:
http://als.wikipedia.org/w/index.php?title=Benutzer%3AMelancholieBot%2Ffeat…
----------------------------------------------------------------------
>Comment By: Melancholie (melancholie)
Date: 2008-06-29 17:26
Message:
Logged In: YES
user_id=2089773
Originator: YES
Note: The uz template namespace has been changed for example...
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2005964&group_…