mirror of
https://github.com/RicterZ/nhentai.git
synced 2025-04-20 11:01:17 +02:00
remove img2pdf in requirements
This commit is contained in:
parent
d2e68c6c45
commit
7570b6ae7d
@ -9,7 +9,6 @@ import zipfile
|
|||||||
import shutil
|
import shutil
|
||||||
import requests
|
import requests
|
||||||
import sqlite3
|
import sqlite3
|
||||||
import img2pdf
|
|
||||||
|
|
||||||
from nhentai import constant
|
from nhentai import constant
|
||||||
from nhentai.logger import logger
|
from nhentai.logger import logger
|
||||||
@ -195,6 +194,11 @@ def generate_cbz(output_dir='.', doujinshi_obj=None, rm_origin_dir=False, write_
|
|||||||
|
|
||||||
|
|
||||||
def generate_pdf(output_dir='.', doujinshi_obj=None, rm_origin_dir=False):
|
def generate_pdf(output_dir='.', doujinshi_obj=None, rm_origin_dir=False):
|
||||||
|
try:
|
||||||
|
import img2pdf
|
||||||
|
except ImportError:
|
||||||
|
logger.error("Please install img2pdf package by using pip.")
|
||||||
|
|
||||||
"""Write images to a PDF file using img2pdf."""
|
"""Write images to a PDF file using img2pdf."""
|
||||||
if doujinshi_obj is not None:
|
if doujinshi_obj is not None:
|
||||||
doujinshi_dir = os.path.join(output_dir, doujinshi_obj.filename)
|
doujinshi_dir = os.path.join(output_dir, doujinshi_obj.filename)
|
||||||
|
@ -4,5 +4,4 @@ BeautifulSoup4>=4.0.0
|
|||||||
threadpool>=1.2.7
|
threadpool>=1.2.7
|
||||||
tabulate>=0.7.5
|
tabulate>=0.7.5
|
||||||
future>=0.15.2
|
future>=0.15.2
|
||||||
img2pdf>=0.3.6
|
|
||||||
iso8601 >= 0.1
|
iso8601 >= 0.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user