comparison MoinMoin/script/migration/_conv160.py @ 2599:13f0331f3a42

1.6 converter: add content conversion (unfinished), cleanup
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 04 Aug 2007 16:54:35 +0200
parents b609934451e6
children b601db2e4d34
comparison
equal deleted inserted replaced
2596:86295432620c 2599:13f0331f3a42
52 52
53 @copyright: 2007 by Thomas Waldmann 53 @copyright: 2007 by Thomas Waldmann
54 @license: GNU GPL, see COPYING for details. 54 @license: GNU GPL, see COPYING for details.
55 """ 55 """
56 56
57 import os.path, sys 57 import os.path
58 import codecs, urllib, glob 58 import codecs, urllib, glob
59 59
60 from MoinMoin import config, wikiutil 60 from MoinMoin import config, wikiutil
61 from MoinMoin.script.migration.migutil import opj, listdir, copy_file, move_file, copy_dir 61 from MoinMoin.script.migration.migutil import opj, listdir, copy_file, move_file, copy_dir
62 62
63 import mimetypes # this MUST be after wikiutil import! 63 import mimetypes # this MUST be after wikiutil import!
64
65 from _conv160_wiki import convert_wiki
64 66
65 def markup_converter(text, renames): 67 def markup_converter(text, renames):
66 """ Convert the <text> content of some Page, using <renames> dict to rename 68 """ Convert the <text> content of some Page, using <renames> dict to rename
67 links correctly. Additionally, convert some changed markup. 69 links correctly. Additionally, convert some changed markup.
68 """ 70 """
69 if "#format wiki" not in text and "#format" in text: 71 if "#format wiki" not in text and "#format" in text:
70 return text # this is not a wiki page, leave it as is 72 return text # this is not a wiki page, leave it as is
71 # TODO convert markup of page 73
74 text = convert_wiki(text, renames)
72 return text 75 return text
73 76
74 77
75 class EventLog: 78 class EventLog:
76 def __init__(self, request, fname): 79 def __init__(self, request, fname):