mirror of
https://github.com/ciromattia/kcc
synced 2025-12-13 09:46:25 +00:00
CSS Formatting
This commit is contained in:
@@ -324,31 +324,31 @@ def genEpubStruct(path):
|
|||||||
os.mkdir(os.path.join(path, 'OEBPS', 'Text'))
|
os.mkdir(os.path.join(path, 'OEBPS', 'Text'))
|
||||||
f = open(os.path.join(path, 'OEBPS', 'Text', 'page_styles.css'), 'w')
|
f = open(os.path.join(path, 'OEBPS', 'Text', 'page_styles.css'), 'w')
|
||||||
f.writelines(["@page {\n",
|
f.writelines(["@page {\n",
|
||||||
" margin-bottom: 0;\n",
|
" margin-bottom: 0;\n",
|
||||||
" margin-top: 0\n",
|
" margin-top: 0\n",
|
||||||
" }\n"])
|
"}\n"])
|
||||||
f.close()
|
f.close()
|
||||||
f = open(os.path.join(path, 'OEBPS', 'Text', 'stylesheet.css'), 'w')
|
f = open(os.path.join(path, 'OEBPS', 'Text', 'stylesheet.css'), 'w')
|
||||||
f.writelines([".kcc {\n",
|
f.writelines([".kcc {\n",
|
||||||
" display: block;\n",
|
" display: block;\n",
|
||||||
" margin-bottom: 0;\n",
|
" margin-bottom: 0;\n",
|
||||||
" margin-left: 0;\n",
|
" margin-left: 0;\n",
|
||||||
" margin-right: 0;\n",
|
" margin-right: 0;\n",
|
||||||
" margin-top: 0;\n",
|
" margin-top: 0;\n",
|
||||||
" padding-bottom: 0;\n",
|
" padding-bottom: 0;\n",
|
||||||
" padding-left: 0;\n",
|
" padding-left: 0;\n",
|
||||||
" padding-right: 0;\n",
|
" padding-right: 0;\n",
|
||||||
" padding-top: 0;\n",
|
" padding-top: 0;\n",
|
||||||
" text-align: left\n",
|
" text-align: left\n",
|
||||||
" }\n",
|
"}\n",
|
||||||
".kcc1 {\n",
|
".kcc1 {\n",
|
||||||
" display: block;\n",
|
" display: block;\n",
|
||||||
" text-align: center\n",
|
" text-align: center\n",
|
||||||
" }\n",
|
"}\n",
|
||||||
".kcc2 {\n",
|
".kcc2 {\n",
|
||||||
" height: auto;\n",
|
" height: auto;\n",
|
||||||
" width: auto\n",
|
" width: auto\n",
|
||||||
" }\n"])
|
"}\n"])
|
||||||
f.close()
|
f.close()
|
||||||
for (dirpath, dirnames, filenames) in os.walk(os.path.join(path, 'OEBPS', 'Images')):
|
for (dirpath, dirnames, filenames) in os.walk(os.path.join(path, 'OEBPS', 'Images')):
|
||||||
chapter = False
|
chapter = False
|
||||||
|
|||||||
Reference in New Issue
Block a user