Skip to content

Release v0.3

Compare
Choose a tag to compare
@rahaaatul rahaaatul released this 23 Nov 14:46
· 3 commits to main since this release

In this release, we focused on enhancing search functionality, improving script structure and error handling, and updating dependencies.

Highlights

Search

  • Pagination for navigating through search results.
  • Caching of previously visited pages to avoid re-fetching.
  • Improved user experience with added options and better error handling.

Features

  • Appended a book emoji (📖) before each title in the search results.
  • Added the ability to navigate to the next page and previous page.
  • Added "➡️ Next page" and "⬅️ Previous page" options to the titles and urls lists.
  • Added "🔍 Search again" and "❌ Exit" options to the titles and urls lists.
  • Implemented caching of previously visited pages to avoid re-fetching them.

Refactors

  • Improved main script structure and error handling:
    • Renamed cls function to clear_terminal for better readability (unused).
    • Moved choices inside the main function to limit its scope.
    • Added sys import for handling script exit.
    • Improved error handling by checking if selected_action is None and exiting gracefully.
    • Wrapped main function call in a try block to handle KeyboardInterrupt and exit gracefully.
    • Renamed variables for clarity: options to actions and res to result.
  • Improved chapter fetching and error handling:
    • Renamed variable crap to script for better readability.
    • Added a check to ensure string is not None before proceeding.
    • Simplified download_folder assignment using a conditional expression.
    • Added logging for cases where no tracks are found in the provided URL.
    • General cleanup and improved readability.
  • Improved search module structure and error handling:
    • Combined if not_found and if not_found.text == "Nothing Found" into a single condition.
    • Added a check to ensure results is a list before iterating.
    • Handled "Search again" selection by calling search_book() recursively.
    • Handled "Exit" selection by exiting the function gracefully.
    • Handled "Next page" and "Previous page" selections to navigate accordingly.

Chores

  • Updated dependencies and version:
    • Bump version from 0.2 to 0.3.
    • Updated dependencies:
      • json5 from 0.9.10 to 0.9.28
      • pick from 2.3.2 to 2.4.0
      • requests from 2.27.1 to 2.32.3
      • tqdm from 4.64.0 to 4.67.0
      • urllib3 from 1.26.8 to 2.2.3
    • Maintained other dependencies at current versions.

❤️ Big thanks to Copilot