Revision: 6760 Author: nicdumz Date: 2009-04-30 04:52:44 +0000 (Thu, 30 Apr 2009)
Log Message: ----------- Adding the possibility to use \n in commandline
Modified Paths: -------------- trunk/pywikipedia/add_text.py
Modified: trunk/pywikipedia/add_text.py =================================================================== --- trunk/pywikipedia/add_text.py 2009-04-30 04:41:00 UTC (rev 6759) +++ trunk/pywikipedia/add_text.py 2009-04-30 04:52:44 UTC (rev 6760) @@ -11,7 +11,7 @@ Furthermore, the following command line parameters are supported:
-page Use a page as generator --text Define which text add +-text Define which text add. "\n" are interpreted as newlines. -summary Define the summary to use -except Use a regex to understand if the template is already in the page -excepturl Use the html page as text where you want to see if there's the text, not the wiki-page. @@ -174,6 +174,8 @@ #nn got a message between the categories and the iw's and they want to keep it there, first remove it if (site.language()==u'nn'): newtext = newtext.replace(nn_iw_msg, '') + # Translating the \n into binary \n + addText = addText.replace('\n', '\n') # Adding the text newtext += u"\n%s" % addText # Reputting the categories
pywikipedia-svn@lists.wikimedia.org