|
|
@ -2,7 +2,7 @@ import urllib2 |
|
|
|
import re |
|
|
|
from texts.models import * |
|
|
|
|
|
|
|
NEXT = "http://next.pad.ma/" |
|
|
|
NEXT = "http://pad.ma/" |
|
|
|
OLD = "http://pad.ma/" |
|
|
|
IdMapping = {} |
|
|
|
regex = re.compile(r'(http:\/\/.*?pad.ma\/(V.*?))[\s\"\<\n]') |
|
|
@ -47,6 +47,12 @@ def doAll(): |
|
|
|
p.html = newText |
|
|
|
p.save() |
|
|
|
|
|
|
|
def doAllSide(): |
|
|
|
for p in PadmaText.objects.all(): |
|
|
|
print p.title |
|
|
|
newLeftBar = replaceUrls(p.left_bar) |
|
|
|
p.left_bar = newLeftBar |
|
|
|
p.save() |
|
|
|
|
|
|
|
def nextToCurrent(text): |
|
|
|
return text.replace(NEXT, OLD) |
|
|
|