with open(sys.argv[2], "w") as o:
with open(sys.argv[1], "r") as f:
for line in f.readlines():
+ if sys.argv[1].endswith("comparison_table.tex") and \
+ line.startswith("\begin{itemize}"):
+ o.write(line)
+ o.write("\\itemsep -0.3em\n")
+ continue
if not line.startswith("[[!inline"):
o.write(line)
continue
if fname.startswith("gf_reference"):
with open("../../nmigen-gf/"+fname) as inc:
o.write(inc.read())
+ else:
+ with open("../%s" % fname) as inc:
+ o.write(inc.read())
else:
- with open("../%s.mdwn" % fname) as inc:
- o.write(inc.read())
+ if fname.endswith(".mdwn"):
+ with open("../%s" % fname) as inc:
+ o.write(inc.read())
+ elif fname == 'openpower/isatables/fields.text':
+ with open("../../openpower-isa/%s" % fname) as inc:
+ o.write(inc.read())
+ else:
+ with open("../%s.mdwn" % fname) as inc:
+ o.write(inc.read())