Update readme

Begin logging
Account for fb2 books without covers
This commit is contained in:
BasioMeusPuga
2019-01-19 01:19:58 +05:30
parent 5e3987dc04
commit 506c458544
25 changed files with 138 additions and 27 deletions

View File

@@ -15,11 +15,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
import logging
import zipfile
from urllib.parse import unquote
from bs4 import BeautifulSoup
logger = logging.getLogger(__name__)
class EPUB:
def __init__(self, filename):
@@ -189,7 +192,7 @@ class EPUB:
if biggest_image:
self.book['cover'] = self.read_from_zip(biggest_image)
else:
print('No cover found for: ' + self.filename)
logger.error('No cover found for: ' + self.filename)
# Parse spine and arrange chapter paths acquired from the opf
# according to the order IN THE SPINE