diff --git a/kcc/comic2ebook.py b/kcc/comic2ebook.py index 1cfdd9a..a22a90b 100755 --- a/kcc/comic2ebook.py +++ b/kcc/comic2ebook.py @@ -60,10 +60,12 @@ def buildHTML(path, imgfile): "\n", "", filename[0], "\n", "\n", + "\n", + "\n", "\n", - "\n", - "
\"",
\n", + "\n", + "
\"",
\n", #"
\n", #"\n", @@ -319,6 +321,34 @@ def genEpubStruct(path): chapterlist = [] cover = None os.mkdir(os.path.join(path, 'OEBPS', 'Text')) + f = open(os.path.join(path, 'OEBPS', 'Text', 'page_styles.css'), 'w') + f.writelines(["@page {\n", + " margin-bottom: 0;\n", + " margin-top: 0\n", + " }\n"]) + f.close() + f = open(os.path.join(path, 'OEBPS', 'Text', 'stylesheet.css'), 'w') + f.writelines([".kcc {\n", + " display: block;\n", + " margin-bottom: 0;\n", + " margin-left: 0;\n", + " margin-right: 0;\n", + " margin-top: 0;\n", + " padding-bottom: 0;\n", + " padding-left: 0;\n", + " padding-right: 0;\n", + " padding-top: 0;\n", + " text-align: left\n", + " }\n", + ".kcc1 {\n", + " display: block;\n", + " text-align: center\n", + " }\n", + ".kcc2 {\n", + " height: auto;\n", + " width: auto\n", + " }\n"]) + f.close() for (dirpath, dirnames, filenames) in os.walk(os.path.join(path, 'OEBPS', 'Images')): chapter = False for afile in filenames: