Skip to content

Commit

Permalink
🎨Use image download, PDF creation, and image deletion functionality t…
Browse files Browse the repository at this point in the history
…o main file.
  • Loading branch information
NTGNguyen committed Feb 22, 2024
1 parent a6ba6ac commit dd836ae
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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__':
Expand Down

0 comments on commit dd836ae

Please sign in to comment.