Fixed things in wiki repo so reST decumentation conversion don't hickup as much.
This commit is contained in:
parent
daa327877c
commit
22b23be095
24 changed files with 148 additions and 203 deletions
|
|
@ -21,7 +21,7 @@
|
|||
# 3) Retrieve wiki files (*.wiki) from Google code by mercurial. Make sure
|
||||
# to retrieve them into a directory wikiconvert/wiki:
|
||||
#
|
||||
# hg clone https://code.google.com/p/evennia/wiki wiki
|
||||
# hg clone https://code.google.com/p/evennia.wiki wiki
|
||||
#
|
||||
# 4) Check so that you have the following file structure:
|
||||
#
|
||||
|
|
@ -65,6 +65,7 @@ def wiki2rest():
|
|||
"""
|
||||
Convert from wikifile to rst file, going through html
|
||||
"""
|
||||
|
||||
# convert from wikifile to html with wiki2html
|
||||
subprocess.call([RUBY_EXE, "wiki_convertor.rb", WIKI_DIR, HTML_DIR], cwd=WIKI2HTML_DIR)
|
||||
|
||||
|
|
@ -77,9 +78,13 @@ def wiki2rest():
|
|||
htmlfilename = os.path.join(HTML_DIR, filename)
|
||||
|
||||
string = "".join(open(htmlfilename, 'r').readlines())
|
||||
string = re.sub(r'<p class="summary">[A-Za-z0-9 ]*</p>', "", string)
|
||||
string = re.sub(r"<wiki:toc max_depth="[0-9]" />", "", string)
|
||||
string = re.sub(r'<p class="summary">[A-Za-z0-9 .-\:]*</p>', "", string)
|
||||
string = re.sub(r"<wiki:toc max_depth="[0-9]*" />", "", string)
|
||||
string = re.sub(r"<wiki:toc max_depth<h1>"[0-9]*" /></h1>", "", string)
|
||||
string = re.sub(r"<p>#settings Featured</p>", "", string)
|
||||
string = re.sub(r'<p class="labels">Featured</p>', "", string)
|
||||
string = re.sub(r'<wiki:comment>', "", string)
|
||||
string = re.sub(r'</wiki:comment>', "", string)
|
||||
#string = re.sub(r'<wiki:comment>[<>;a-zA\/\n-&Z0-9 ]*</wiki:comment>', "", string)
|
||||
f = open(htmlfilename, 'w')
|
||||
f.write(string)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue