ویکی‌پدیا:درخواست‌های ربات/زیباسازی ویکی‌پدیا فارسی: تفاوت میان نسخه‌ها

محتوای حذف‌شده محتوای افزوده‌شده
←‏کد اصلی: اصلاح ارجاع
خط ۵۲:
wikipedia.config.put_throttle = 0
wikipedia.put_throttle.setDelay()
cleaning_version=u'۷.۸.۰۱'
msg=u'('+cleaning_version +u')'
faSite = wikipedia.getSite('fa')
خط ۴۷۷:
text=text.replace(u'== "',u'== ').replace(u'" ==',u' ==')
text=text.replace(u"== '''",u'== ').replace(u"''' == ",u' ==')
text=text.replace(u"=='''",u'==').replace(u"'''== ",u'==')
for i in u".:,;»«&^#@•→←↔↑↓…~٫،؛ٔ*":
سطر ۵۲۷ ⟵ ۵۲۸:
if len(refsa) > 7:
text = text.replace(u'{{پانویس}}',u'{{پانویس|۲}}')
text = text.replace(u'{{پانویس|اندازه=کوچک}}',u'{{پانویس|۲|اندازه=کوچک}}')
text = text.replace(u'{{پانویس|عرض=۳۰}}',u'{{پانویس|۲|عرض=۳۰}}')
text = text.replace(u'{{پانویس|اندازه=ریز}}',u'{{پانویس|۲|اندازه=ریز}}')
text = text.replace(u'{{پانویس|گروه=پانویس}}',u'{{پانویس|۲|گروه=پانویس}}')
text = text.replace(u'{{پانویس|چپ‌چین=بله}}',u'{{پانویس|۲|چپ‌چین=بله}}')
 
# Files
سطر ۶۰۳ ⟵ ۶۰۹:
 
def Citation (text,msg):
done=False
for a in [u'{{citation',u'{{Citation']:
if a in text:
سطر ۶۰۹ ⟵ ۶۱۶:
for item in subslinks:
b+=1
if b==1 or a+u' needed' in item :
continue
item=item.split(u'}}')[0]
item_old=item
#item2 = re.sub(ur'[ضصثقفغعهخحجچشسیبلاتنمکگظطزرذآدپو]', "",item)
#if item!=item2:
# continue
count=-1
for i in u'۰۱۲۳۴۵۶۷۸۹':
سطر ۶۲۲ ⟵ ۶۲۹:
if item!=item_old:
text=text.replace(item_old,item)
done=True
msg=u'ارجاع+'+msg
if done:
msg=u'ارجاع+'+msg
return text,msg