From dd836ae57f575cd0fd6feb15e729cb9698521acb Mon Sep 17 00:00:00 2001 From: NTGNguyen <23521049@gm.uit.edu.vn> Date: Thu, 22 Feb 2024 23:28:46 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8Use=20image=20download,=20PDF=20cre?= =?UTF-8?q?ation,=20and=20image=20deletion=20functionality=20to=20main=20f?= =?UTF-8?q?ile.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/main.py b/main.py index c176411..3410b88 100644 --- a/main.py +++ b/main.py @@ -5,6 +5,11 @@ PrintIntro, Config, UserOptions, LinkParse, print_title, pause, logger) +from src.constants import DOWNLOAD_DIR +from src.utils.utils import create_directory +from src.modules.download_images import DownloadImages +from src.modules.create_pdf import CreatePDF +from src.modules.delete_img import DeleteIMG def main() -> None: @@ -35,6 +40,12 @@ def main() -> None: print_title('DOWNLOAD') print_title('PDF') + if create_directory(DOWNLOAD_DIR): + DownloadImages.dowload_images(user_options.links, DOWNLOAD_DIR) + if user_options.create_pdf: + CreatePDF.create_pdf(DOWNLOAD_DIR, user_options.links) + if user_options.clean_img: + DeleteIMG.delete_jpg(DOWNLOAD_DIR, user_options.links) if __name__ == '__main__':