Revision: 8600
Author: xqt
Date: 2010-09-28 10:31:32 +0000 (Tue, 28 Sep 2010)
Log Message:
-----------
do not change digits iside tables for now
Modified Paths:
--------------
trunk/pywikipedia/cosmetic_changes.py
Modified: trunk/pywikipedia/cosmetic_changes.py
===================================================================
--- trunk/pywikipedia/cosmetic_changes.py 2010-09-27 09:37:41 UTC (rev 8599)
+++ trunk/pywikipedia/cosmetic_changes.py 2010-09-28 10:31:32 UTC (rev 8600)
@@ -727,9 +727,9 @@
# do not change digits inside html-tags
pattern = re.compile(u'<[/]*?[^</]+?[/]*?>', re.UNICODE)
exceptions.append(pattern)
-## disabled for now: some problems with wring picture size
-## for i in range(0,10):
-## text = pywikibot.replaceExcept(text, str(i), u'٠١٢٣٤٥٦٧٨٩'[i], exceptions)
+ exceptions.append('table') #exclude tables for now
+ for i in range(0,10):
+ text = pywikibot.replaceExcept(text, str(i), u'٠١٢٣٤٥٦٧٨٩'[i], exceptions)
return text
# Retrieved from "http://commons.wikimedia.org/wiki/Commons:Tools/pywiki_file_description_cle…"
Revision: 8597
Author: xqt
Date: 2010-09-25 11:08:10 +0000 (Sat, 25 Sep 2010)
Log Message:
-----------
update from trunk
Modified Paths:
--------------
branches/rewrite/pywikibot/textlib.py
Modified: branches/rewrite/pywikibot/textlib.py
===================================================================
--- branches/rewrite/pywikibot/textlib.py 2010-09-25 10:15:35 UTC (rev 8596)
+++ branches/rewrite/pywikibot/textlib.py 2010-09-25 11:08:10 UTC (rev 8597)
@@ -369,7 +369,7 @@
"""
# Find a marker that is not already in the text.
- marker = findmarker( oldtext, u'@@')
+ marker = findmarker(oldtext, u'@@')
if site is None:
site = pywikibot.getSite()
separator = site.family.interwiki_text_separator
@@ -383,8 +383,8 @@
separator=separatorstripped)
s = interwikiFormat(new, insite = site)
if s:
- separator = site.family.interwiki_text_separator
- if site.language() in site.family.interwiki_attop:
+ if site.language() in site.family.interwiki_attop or \
+ u'<!-- interwiki at top -->' in oldtext:
newtext = s + separator + s2.replace(marker,'').strip()
else:
# calculate what was after the language links on the page
@@ -627,7 +627,6 @@
separator=separatorstripped)
s = categoryFormat(new, insite = site)
if s:
- separator = site.family.category_text_separator
if site.language() in site.family.category_attop:
newtext = s + separator + s2
else:
Revision: 8596
Author: xqt
Date: 2010-09-25 10:15:35 +0000 (Sat, 25 Sep 2010)
Log Message:
-----------
Interwiki directive to place interwikis at top of a page
Modified Paths:
--------------
trunk/pywikipedia/pywikibot/textlib.py
Modified: trunk/pywikipedia/pywikibot/textlib.py
===================================================================
--- trunk/pywikipedia/pywikibot/textlib.py 2010-09-24 04:24:44 UTC (rev 8595)
+++ trunk/pywikipedia/pywikibot/textlib.py 2010-09-25 10:15:35 UTC (rev 8596)
@@ -375,7 +375,7 @@
"""
# Find a marker that is not already in the text.
- marker = findmarker( oldtext, u'@@')
+ marker = findmarker(oldtext, u'@@')
if site is None:
site = pywikibot.getSite()
separator = site.family.interwiki_text_separator
@@ -389,7 +389,9 @@
separator=separatorstripped)
s = interwikiFormat(new, insite = site)
if s:
- if site.language() in site.family.interwiki_attop:
+
+ if site.language() in site.family.interwiki_attop or \
+ u'<!-- interwiki at top -->' in oldtext:
newtext = s + separator + s2.replace(marker,'').strip()
else:
# calculate what was after the language links on the page
Revision: 8593
Author: xqt
Date: 2010-09-23 16:46:30 +0000 (Thu, 23 Sep 2010)
Log Message:
-----------
changing digits on ckb-wiki disabled for now. There are some problems with picture sizes
Modified Paths:
--------------
trunk/pywikipedia/cosmetic_changes.py
Modified: trunk/pywikipedia/cosmetic_changes.py
===================================================================
--- trunk/pywikipedia/cosmetic_changes.py 2010-09-23 15:18:04 UTC (rev 8592)
+++ trunk/pywikipedia/cosmetic_changes.py 2010-09-23 16:46:30 UTC (rev 8593)
@@ -727,8 +727,9 @@
# do not change digits inside html-tags
pattern = re.compile(u'<[/]*?[^</]+?[/]*?>', re.UNICODE)
exceptions.append(pattern)
- for i in range(0,10):
- text = pywikibot.replaceExcept(text, str(i), u'٠١٢٣٤٥٦٧٨٩'[i], exceptions)
+## disabled for now: some problems with wring picture size
+## for i in range(0,10):
+## text = pywikibot.replaceExcept(text, str(i), u'٠١٢٣٤٥٦٧٨٩'[i], exceptions)
return text
# Retrieved from "http://commons.wikimedia.org/wiki/Commons:Tools/pywiki_file_description_cle…"
Revision: 8592
Author: xqt
Date: 2010-09-23 15:18:04 +0000 (Thu, 23 Sep 2010)
Log Message:
-----------
put references tag on the floor (requested at http://de.wikipedia.org/wiki/Hilfe_Diskussion:Einzelnachweise#Positionierun… )
Modified Paths:
--------------
trunk/pywikipedia/noreferences.py
Modified: trunk/pywikipedia/noreferences.py
===================================================================
--- trunk/pywikipedia/noreferences.py 2010-09-22 15:15:06 UTC (rev 8591)
+++ trunk/pywikipedia/noreferences.py 2010-09-23 15:18:04 UTC (rev 8592)
@@ -85,10 +85,10 @@
u'Poznámky',
],
'de': [ # no explicit policy on where to put the references
- u'Literatur',
- u'Weblinks',
- u'Siehe auch',
- u'Weblink', # bad, but common singular form of Weblinks
+## u'Literatur',
+## u'Weblinks',
+## u'Siehe auch',
+## u'Weblink', # bad, but common singular form of Weblinks
],
'en': [ # no explicit policy on where to put the references
u'Further reading',