Compare commits

...

3 Commits

Author SHA1 Message Date
2215e5e925 added summary section 2023-01-20 09:26:53 +01:00
0e9a90e92a added platform test 2023-01-20 09:26:32 +01:00
663ab4a095 added summary section 2023-01-20 09:26:12 +01:00
3 changed files with 19 additions and 5 deletions

View File

@ -1,10 +1,14 @@
import os
from werkzeug.security import generate_password_hash
from sys import platform
#CONTENT_BASE_DIR = os.getenv("CONTENT_BASE_DIR", "/library") #docker
#CONTENT_BASE_DIR = os.getenv("CONTENT_BASE_DIR", "/home/drudoo/ComicsTest/Comics") #linux
CONTENT_BASE_DIR = os.getenv("CONTENT_BASE_DIR", "/Comics/ComicRack") #windows
#CONTENT_BASE_DIR = os.getenv("CONTENT_BASE_DIR", "testlibrary") #windows test library
if platform == "linux" or platform == "linux2":
CONTENT_BASE_DIR = os.getenv("CONTENT_BASE_DIR", "/home/drudoo/ComicsTest/Comics") #linux
elif platform == "win32":
CONTENT_BASE_DIR = os.getenv("CONTENT_BASE_DIR", "/Comics/ComicRack") #windows
#CONTENT_BASE_DIR = os.getenv("CONTENT_BASE_DIR", "testlibrary") #windows test library
THUMBNAIL_DIR = os.getenv("THUMBNAIL_DIR",'thumbnails')

View File

@ -63,8 +63,18 @@ class Entry(object):
self.size = extras.get_size(f, 'mb')
data=BeautifulSoup(s.open('ComicInfo.xml').read(), "xml")
#self.cover=s.open('P00001.jpg').read()
self.authors = data.select('Writer')[0].text.split(",")
if data.select('Writer') != []:
self.authors = data.select('Writer')[0].text.split(",")
else:
config._print("No Writer found: " + str(data.select('Writer')))
self.cover = "/image/" + extras.get_cvdb(data.select('Notes')) + ".jpg"
if data.select('Summary') != []:
self.summary = data.select('Summary')[0].text
else:
config._print("No Summary found: " + str(data.select('Summary')))
#print(data)

View File

@ -27,10 +27,10 @@
<entry>
<title>{{ entry.title }}</title>
<id>{{ entry.id }}</id>
<summary type="text">{{ entry.summary }}</summary>
{% for author in entry.authors %}
<author>
<name>{{ author }}</name>
<uri></uri>
</author>
{% endfor %}
{% if entry.updated %} <updated>{{ entry.updated }}</updated> {% endif %}