This commit is contained in:
cwx
2022-12-04 22:29:04 +08:00
commit 499cb29fa3
11 changed files with 628 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
from xml.dom.minidom import Document
document = Document()
class comicInfoXmlNode():
chapter = "Title"
comic_name = "Series"
dep = "Summary"
author = "Writer"
tags = "Genre"
cbs = "Publisher"
lang = "LanguageISO"
@classmethod
def setNodeAndValue(cls,node,value):
node = document.createElement(node)
node_text = document.createTextNode(value)
node.appendChild(node_text)
@classmethod
def setChapter(cls,value):
cls.setNodeAndValue(cls.chapter,value)
@classmethod
def setComicName(cls,value):
cls.setNodeAndValue(cls.comic_name, value)
@classmethod
def getComicInfoXML(cls):
cls.setChapter()
class comicInfo():
#输出xml
@classmethod
def writeComicInfoXML(cls,c_title,chapter,dep,author,tags="韩漫",c_publisher="韩漫",language="zh"):
#file 预期 CBZ/"comic_name"/chapter
print()
+28
View File
@@ -0,0 +1,28 @@
class comicStr:
url = "url"
xpath = "xpath"
title = "title"
icon = "icon"
author = "author"
dep = "dep"
chapters = "chapters"
homepage = "homepage"
chapter_href = "chapter_href"
list_img = "list_img"
img = "img"
last_update = "last_update"
alias = "alias"
tags = "tags"
action = "action"
chapters_href = "chapters_href"
base_url = ""
data = "data"
result = "result"
@classmethod
def setBaseUrl(cls,url):
cls.base_url = url
@classmethod
def getBaseUrl(cls):
return cls.base_url
+6
View File
@@ -0,0 +1,6 @@
import os
class pathStr:
base_comic_out = "COMICOUT"
base_CBZ = os.path.join(base_comic_out,"CBZ")
base_comic_img = os.path.join(base_comic_out,"outputComic")