http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11286
Revision: 11286
Author: xqt
Date: 2013-03-28 17:08:58 +0000 (Thu, 28 Mar 2013)
Log Message:
-----------
remove obsolete interwiki message on top of iw links
Modified Paths:
--------------
trunk/pywikipedia/add_text.py
Modified: trunk/pywikipedia/add_text.py
===================================================================
--- trunk/pywikipedia/add_text.py 2013-03-28 17:03:30 UTC (rev 11285)
+++ trunk/pywikipedia/add_text.py 2013-03-28 17:08:58 UTC (rev 11286)
@@ -87,9 +87,7 @@
'¶ms;': pagegenerators.parameterHelp,
}
-nn_iw_msg = u'<!--interwiki (no, sv, da first; then other languages
alphabetically by name)-->'
-
class NoEnoughData(pywikibot.Error):
""" Error class for when the user doesn't specified all the data needed """
@@ -240,16 +238,6 @@
interwikiInside = pywikibot.getLanguageLinks(newtext, site)
# Removing the interwiki
newtext = pywikibot.removeLanguageLinks(newtext, site)
- # nn got a message between the categories and the iw's
- # and they want to keep it there, first remove it
- hasCommentLine = False
- if (site.language() == u'nn'):
- regex = re.compile(
- '(<!-- ?interwiki \(no(?:/nb)?, ?sv, ?da first; then other
languages alphabetically by name\) ?-->)')
- found = regex.findall(newtext)
- if found:
- hasCommentLine = True
- newtext = regex.sub('', newtext)
# Adding the text
newtext += u"\n%s" % addText
@@ -257,9 +245,6 @@
newtext = pywikibot.replaceCategoryLinks(newtext,
categoriesInside, site,
True)
- #Put the nn iw message back
- if site.language() == u'nn' and (interwikiInside or
hasCommentLine):
- newtext = newtext + u'\r\n\r\n' + nn_iw_msg
# Dealing the stars' issue
allstars = []
starstext = pywikibot.removeDisabledParts(text)
_______________________________________________
Pywikipedia-svn mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-svn