mirror of
https://github.com/RicterZ/nhentai.git
synced 2025-04-20 11:01:17 +02:00
move import statement to function
This commit is contained in:
parent
e2a1d79b1b
commit
7e4dff8fec
@ -1,7 +1,6 @@
|
|||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
from iso8601 import parse_date
|
|
||||||
from xml.sax.saxutils import escape
|
from xml.sax.saxutils import escape
|
||||||
|
|
||||||
|
|
||||||
@ -31,6 +30,7 @@ def serialize_json(doujinshi, dir):
|
|||||||
|
|
||||||
|
|
||||||
def serialize_comicxml(doujinshi, dir):
|
def serialize_comicxml(doujinshi, dir):
|
||||||
|
from iso8601 import parse_date
|
||||||
with open(os.path.join(dir, 'ComicInfo.xml'), 'w') as f:
|
with open(os.path.join(dir, 'ComicInfo.xml'), 'w') as f:
|
||||||
f.write('<?xml version="1.0" encoding="utf-8"?>\n')
|
f.write('<?xml version="1.0" encoding="utf-8"?>\n')
|
||||||
f.write('<ComicInfo xmlns:xsd="http://www.w3.org/2001/XMLSchema" '
|
f.write('<ComicInfo xmlns:xsd="http://www.w3.org/2001/XMLSchema" '
|
||||||
|
Loading…
x
Reference in New Issue
Block a user