When I used replace.py and tried to use an "!" in the replace text, it replaced it with a weird string of text (actually part of a replace command I ran weeks ago).
I've been able to fix everything except getting the ! where it should be.
If I run: python replace.py -cat:"The Transition Handbook" "-- Please do not remove " "!-- Please do not remove "
...t doesn't change anything.
If I try a backslash before the exclamation mark, "!", it prompts to insert it *including* the backslash.
How do I just insert a "!"? I tried looking online but found nothing.
Thanks Chris
haha =)
An exclamation mark has a special meaning for some terminals, related to command history. If I'm right, the command "!n" where n is an integer repeats the n-th last command; and "blabla!<tab> looks for older commands matching blabla.
Anyway. I had the same problem. The only workaround I found was to disable the history search features in bash : Add : set +o histexpand at the bottom of ~/.bashrc, source ~/.bashrc and your problem should be fixed.
Does anyone has a better workaround ?
2008/11/25 Chris Watkins chriswaterguy@appropedia.org:
When I used replace.py and tried to use an "!" in the replace text, it replaced it with a weird string of text (actually part of a replace command I ran weeks ago).
I've been able to fix everything except getting the ! where it should be.
If I run: python replace.py -cat:"The Transition Handbook" "-- Please do not remove " "!-- Please do not remove "
...t doesn't change anything.
If I try a backslash before the exclamation mark, "!", it prompts to insert it including the backslash.
How do I just insert a "!"? I tried looking online but found nothing.
Thanks Chris
-- Chris Watkins (a.k.a. Chriswaterguy)
Appropedia.org - Sharing knowledge to build rich, sustainable lives.
blogs.appropedia.org
I like this: five.sentenc.es
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Thanks, Nicolas - it worked perfectly.
On Mon, Nov 24, 2008 at 20:37, Nicolas Dumazet nicdumz@gmail.com wrote:
haha =)
An exclamation mark has a special meaning for some terminals, related to command history. If I'm right, the command "!n" where n is an integer repeats the n-th last command; and "blabla!<tab> looks for older commands matching blabla.
Anyway. I had the same problem. The only workaround I found was to disable the history search features in bash : Add : set +o histexpand at the bottom of ~/.bashrc, source ~/.bashrc and your problem should be fixed.
Does anyone has a better workaround ?
2008/11/25 Chris Watkins chriswaterguy@appropedia.org:
When I used replace.py and tried to use an "!" in the replace text, it replaced it with a weird string of text (actually part of a replace
command
I ran weeks ago).
I've been able to fix everything except getting the ! where it should be.
If I run: python replace.py -cat:"The Transition Handbook" "-- Please do not remove
"
"!-- Please do not remove "
...t doesn't change anything.
If I try a backslash before the exclamation mark, "!", it prompts to
insert
it including the backslash.
How do I just insert a "!"? I tried looking online but found nothing.
Thanks Chris
-- Chris Watkins (a.k.a. Chriswaterguy)
Appropedia.org - Sharing knowledge to build rich, sustainable lives.
blogs.appropedia.org
I like this: five.sentenc.es
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
-- Nicolas Dumazet — NicDumZ [ nɪk.d̪ymz ] _______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Dear Chris,
Am Dienstag 25 November 2008 03:09:20 schrieb Chris Watkins:
If I run: python replace.py -cat:"The Transition Handbook" "-- Please do not remove " "!-- Please do not remove "
...t doesn't change anything.
You can use HTML entities: python replace.py -cat:"The Transition Handbook" "-- Please do not remove " "!-- Please do not remove "
The downside of this is that the HTML entity will be in the wiki source code. If you do, however, enable the cosmetic changes, the entity will automatically be converted to an exclamation mark before saving to the wiki. Just add this line to your user-config.py:
cosmetic_changes = True
Cheers
Daniel
DragoonWraith and Daniel - very clever solutions.
These should be documented - maybe in a few weeks I'll take some of the things I've learnt on this list and add them to the MediaWiki.org pages. I assume that's the main place - or should it go on the Botwikihttp://botwiki.sno.cc/wiki/ ?
Many thanks! Chris
On Wed, Nov 26, 2008 at 03:26, Daniel Herding DHerding@gmx.de wrote:
Dear Chris,
Am Dienstag 25 November 2008 03:09:20 schrieb Chris Watkins:
If I run: python replace.py -cat:"The Transition Handbook" "-- Please do not remove
"
"!-- Please do not remove "
...t doesn't change anything.
You can use HTML entities: python replace.py -cat:"The Transition Handbook" "-- Please do not remove " "!-- Please do not remove "
The downside of this is that the HTML entity will be in the wiki source code. If you do, however, enable the cosmetic changes, the entity will automatically be converted to an exclamation mark before saving to the wiki. Just add this line to your user-config.py:
cosmetic_changes = True
Cheers
Daniel
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Chris Watkins ha scritto:
python replace.py -cat:"The Transition Handbook" "-- Please do
not remove "
"!-- Please do not remove "
...t doesn't change anything.
python replace.py -cat:"The Transition Handbook" "-- Please do not remove " '!-- Please do not remove '
'text' instead of "text".