45 444
правки
Lankier (обсуждение | вклад) м (орфография) |
м (update) |
||
def replace_quote(text):
# safe replace quote (do not replace inside [[
i = 0
ret = ''
ret += wlink
i = k
ret += text[i:].replace(u'«', u'„').replace(u'»', u'“')
return ret
continue
if link.isRedirectPage():
print 'redir:', link
link = link.getRedirectTarget()
if link.isDisambig():
templ_im = u'{{Сообщение ЗЛВ|даты=%s|текст=%s|иллюстрация=%s|архив=%s}}\n'
def insert_templ(talk, text, date, year, month, image):
if talk.exists():
ptext = talk.get()
#return False
else:
for t in
t = t.replace(' ', '[
pat = re.compile(r'{{\s*'+t+r'\s*[\|}<]', re.I|re.U|re.S)
match = pat.search(ptext)
if match:
# template exists
wikipedia.output('*** template exists: '+talk.aslink())
|
правки