Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
refactor: better changelogs
NTFSvolumea50279420099
diff --git a/CHANGELOG.md b/CHANGELOG.mdnew file mode 100644index 000000000..cd1b3078e--- /dev/null+++ b/CHANGELOG.md@@ -0,0 +1,179 @@+# CHANGELOG++All notable changes to this project will be documented here. For more details, visit the wiki: https://script-ware.gitbook.io++The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).++## [5.6.38] - 2024-09-30++This update introduces the following changes:+1. Fix `scrape_items` creation for kemono and coomer links++#### Details:+- Fixes parents tracking for kemono and coomer links+++## [5.6.37] - 2024-09-30++This update introduces the following changes:+1. Fixes empty folder cleanup on python 3.11++#### Details:+- Fixes logic by walking the directory tree using os.walk to remain compatibility with python 3.11+++## [5.6.36] - 2024-09-30++This update introduces the following changes:+1. Delete empty files after a successful run.+2. Added a feature to save the origin of unsupported URLs++#### Details:+- Empty files (0 bytes) inside download_dir will be deleted alongside empty folders after a successful run+- Each unsupported URL will now be saved alongside the URL of the original item they came from (`Unsupported_URLs.txt`)+- Origin is also saved for password protected links, allowing the user to visit the URL (ex. forum post) and retrieve the password if available+++## [5.6.35] - 2024-09-30++This update introduces the following changes:+1. Small fixes for sorting system++#### Details:+- Fixes `scan_dir` selection logic+++## [5.6.34] - 2024-09-30++This update introduces the following changes:+1. Added a feature to fix the names of multipart archives.++#### Details:+- Multipart archives will be renamed to have the proper naming format when the `--remove-generated-id-from-filenames` argument is passed.+++## [5.6.33] - 2024-09-25++This update introduces the following changes:+1. Fix issues with checking how much free space is available on the disk.+2. Skip clearing the console when running with the `--no-ui` flag.++#### Details:++- Fixed an issue with free space not being properly checked when running with the `--retry-failed` flag.+- Made error output more clear when there is not enough free space to download a file.+- Skip clearing the console when running with the `--no-ui` flag to allow users to see the output of all runs done with `--no-ui`.+++## [5.6.32] - 2024-09-22++This update introduces the following changes:+1. Add new URLs categorization feature for the URLs.txt file.++#### Details:++- You can now group links under one download folder by adding a category name above the links in the `URLs.txt` file.+- The category name must be prefixed by three dashes (`---`) and must be on a new line.+- The category name will be used as the folder name for the links that follow it.+- To end a category, add three dashes (`---`) on a new line after the links.+- You can have multiple categories in the URLs.txt file, and the links will be grouped accordingly.+++For more details, visit the wiki: https://script-ware.gitbook.io/cyberdrop-dl/reference/configuration-options/settings#sorting+++## [5.6.30] - 2024-09-21++**SIMPCITY HAS BEEN REMOVED FROM THE SUPPORTED WEBSITES LIST.**++**TO SEE WHY, VISIT THE WIKI:** https://script-ware.gitbook.io/cyberdrop-dl/simpcity-support-dropped++## [5.6.20] - 2024-09-19++This update introduces the following changes:+1. Ability to scrape URLs from PixelDrain text post++#### Details:++- Cyberdrop-DL will now scrape URLs from PixelDrain text posts and make a folder for all the URLs within the post, reducing clutter.+++## [5.6.13] - 2024-09-19++This update introduces the following changes:+1. Per-config authentication settings++#### Details:++- If an `authentication.yaml` file is placed within your config directory, it will be used instead of the global authentication values.+++## [5.6.12] - 2024-09-19++This update introduces the following changes:+1. Reformat code and organize imports++#### Details:++- Reformatted code to be more readable and removed unused imports.+++## [5.6.11] - 2024-09-16++This update introduces the following changes:+1. Detect and raise an error for private gofile folders++#### Details:++- Private gofile folders will now raise an error when attempting to download them instead of crashing CDL+++## [5.6.1] - 2024-09-13++This update introduces the following changes:+1. Fixes issue with `--sort-all-downloads`+2. Improves sort status visibility++#### Details:++- The sort status is now display under hash, along with other statuses+- `--sort-all-downloads` is disabled by default, thus only cdl downloads are sorted without the flag+- `sort_folder` can not be the same as the `scan_dir`+++## [5.6.0] - 2024-09-13++This update introduces the following changes:+1. Updated the sorting progress UI to display more information.+2. Removed unused functions from progress bars.++#### Details:++- The sorting UI now displays the progress of each folder as it is being processed, including the number of files that have been sorted and the percentage of the folder that has been processed.+- The sorting UI now also shows what folders are in the queue to be sorted.+++## [5.5.1] - 2024-09-12++This update introduces the following changes:+1. Small fixes for sorting system++#### Details:++- use `-` instead of `_` for new arguments+- fix bug where `purge_dir` is called for each file, instead of each directory when done+++## [5.5.0] - 2024-09-12++This update introduces the following changes:+1. Finalizes new sorting feature+2. add scanning directory for sorting+3. adds progress bar for sorting++#### Details:++- skips need to scan db if `sort_cdl_only` is false+- progress bar for current progress of sorting files, incremented for each folder+- allow for setting a different folder to scan that is independent of the download folder\ No newline at end of filediff --git a/cyberdrop_dl/ui/ui.py b/cyberdrop_dl/ui/ui.pyindex 3061eeee5..03be36dd2 100644--- a/cyberdrop_dl/ui/ui.py+++ b/cyberdrop_dl/ui/ui.py@@ -1,7 +1,7 @@from __future__ import annotationsfrom pathlib import Path-from pydoc import pager+from rich.markdown import Markdownfrom textwrap import dedentfrom typing import TYPE_CHECKING@@ -10,7 +10,10 @@ from InquirerPy.validator import PathValidatorfrom rich import print as rprintfrom rich.console import Console-import cyberdrop_dl.utils.changelog as Changelog+import aiofiles+from aiohttp import request+import asyncio+from cyberdrop_dl import __version__from cyberdrop_dl.clients.hash_client import hash_directory_scannerfrom cyberdrop_dl.ui.prompts.general_prompts import (@@ -198,8 +201,31 @@ def program_ui(manager: Manager):import_cyberdrop_v4_items_prompt(manager)elif action == 11:- pager(Changelog.__doc__)+ changelog_path = manager.path_manager.config_dir.parent / "CHANGELOG.md"+ changelog_content = asyncio.run(_get_changelog(changelog_path))++ with console.pager(links = True):+ console.print(Markdown(changelog_content , justify = "left"))# Exitelif action == 12:exit(0)+++async def _get_changelog(changelog_path: Path):+ url = "https://raw.githubusercontent.com/jbsparrow/CyberDropDownloader/refs/heads/master/CHANGELOG.md"+ if not changelog_path.is_file():+ try:+ async with request("GET", url) as response:+ response.raise_for_status()+ async with aiofiles.open(changelog_path, 'wb') as f:+ await f.write(await response.read())+ except Exception:+ return "UNABLE TO GET CHANGELOG INFORMATION"++ changelog_lines = changelog_path.read_text(encoding="utf8").splitlines()+ # remove keep_a_changelog disclaimer+ changelog_content = "\n".join(changelog_lines[:4] + changelog_lines[6:])++ return changelog_content+\ No newline at end of filediff --git a/cyberdrop_dl/utils/changelog.py b/cyberdrop_dl/utils/changelog.pydeleted file mode 100644index 42b49def0..000000000--- a/cyberdrop_dl/utils/changelog.py+++ /dev/null@@ -1,274 +0,0 @@-"""----------------------------------------------------------------C\bCH\bHA\bAN\bNG\bGE\bEL\bLO\bOG\bG-\tVersion 5.6.38---D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN-\tThis update introduces the following changes:-\t\t1. Fix scrape_items creation for kemono and coomer links--\tDetails:-\t\t- Fixes parents tracking for kemono and coomer links--\tFor more details, visit the wiki: https://script-ware.gitbook.io----------------------------------------------------------------C\bCH\bHA\bAN\bNG\bGE\bEL\bLO\bOG\bG-\tVersion 5.6.37---D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN-\tThis update introduces the following changes:-\t\t1. Fixes empty folder cleanup on python 3.11--\tDetails:-\t\t- Fixes logic by walking the directory tree using os.walk to remain compatibility with python 3.11--\tFor more details, visit the wiki: https://script-ware.gitbook.io----------------------------------------------------------------C\bCH\bHA\bAN\bNG\bGE\bEL\bLO\bOG\bG-\tVersion 5.6.36---D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN-\tThis update introduces the following changes:-\t\t1. Delete empty files after a successful run.-\t\t2. Added a feature to save the origin of unsupported URLs--\tDetails:-\t\t- Empty files (0 bytes) inside download_dir will be deleted alongside empty folders after a successful run-\t\t- Each unsupported URL will now be saved alongside the URL of the original item they came from (Unsupported_URLs.txt)-\t\t- Origin is also saved for password protected links, allowing the user to visit the URL (ex. forum post) and retrieve the password if available---\tFor more details, visit the wiki: https://script-ware.gitbook.io----------------------------------------------------------------C\bCH\bHA\bAN\bNG\bGE\bEL\bLO\bOG\bG-\tVersion 5.6.35---D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN-\tThis update introduces the following changes:-\t\t1. Small fixes for sorting system--\tDetails:-\t\t- Fixes scan_dir selection logic---\tFor more details, visit the wiki: https://script-ware.gitbook.io----------------------------------------------------------------C\bCH\bHA\bAN\bNG\bGE\bEL\bLO\bOG\bG-\tVersion 5.6.34---D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN-\tThis update introduces the following changes:-\t\t1. Added a feature to fix the names of multipart archives.--\tDetails:-\t\t- Multipart archives will be renamed to have the proper naming format when the --remove-generated-id-from-filenames argument is passed.---\tFor more details, visit the wiki: https://script-ware.gitbook.io----------------------------------------------------------------C\bCH\bHA\bAN\bNG\bGE\bEL\bLO\bOG\bG-\tVersion 5.6.33---D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN-\tThis update introduces the following changes:-\t\t1. Fix issues with checking how much free space is available on the disk.-\t\t2. Skip clearing the console when running with the --no-ui flag.--\tDetails:-\t\t- Fixed an issue with free space not being properly checked when running with the --retry-failed flag.-\t\t- Made error output more clear when there is not enough free space to download a file.-\t\t- Skip clearing the console when running with the --no-ui flag to allow users to see the output of all runs done with --no-ui.---\tFor more details, visit the wiki: https://script-ware.gitbook.io----------------------------------------------------------------C\bCH\bHA\bAN\bNG\bGE\bEL\bLO\bOG\bG-\tVersion 5.6.32---D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN-\tThis update introduces the following changes:-\t\t1. Add new URLs categorization feature for the URLs.txt file.--\tDetails:-\t\t- You can now group links under one download folder by adding a category name above the links in the URLs.txt file.-\t\t- The category name must be prefixed by three dashes (---) and must be on a new line.-\t\t- The category name will be used as the folder name for the links that follow it.-\t\t- To end a category, add three dashes (---) on a new line after the links.-\t\t- You can have multiple categories in the URLs.txt file, and the links will be grouped accordingly.---\tFor more details, visit the wiki: https://script-ware.gitbook.io/cyberdrop-dl/reference/configuration-options/settings#sorting----------------------------------------------------------------C\bCH\bHA\bAN\bNG\bGE\bEL\bLO\bOG\bG-\tVersion 5.6.30---S\bSI\bIM\bMP\bPC\bCI\bIT\bTY\bY H\bHA\bAS\bS B\bBE\bEE\bEN\bN R\bRE\bEM\bMO\bOV\bVE\bED\bD F\bFR\bRO\bOM\bM T\bTH\bHE\bE S\bSU\bUP\bPP\bPO\bOR\bRT\bTE\bED\bD W\bWE\bEB\bBS\bSI\bIT\bTE\bES\bS L\bLI\bIS\bST\bT.\b.--T\bTO\bO S\bSE\bEE\bE W\bWH\bHY\bY,\b, V\bVI\bIS\bSI\bIT\bT T\bTH\bHE\bE W\bWI\bIK\bKI\bI:\b: https://script-ware.gitbook.io/cyberdrop-dl/simpcity-support-dropped----------------------------------------------------------------C\bCH\bHA\bAN\bNG\bGE\bEL\bLO\bOG\bG-\tVersion 5.6.20---D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN-\tThis update introduces the following changes:-\t\t1. Ability to scrape URLs from PixelDrain text post--\tDetails:-\t\t- Cyberdrop-DL will now scrape URLs from PixelDrain text posts and make a folder for all the URLs within the post, reducing clutter.---\tFor more details, visit the wiki: https://script-ware.gitbook.io----------------------------------------------------------------C\bCH\bHA\bAN\bNG\bGE\bEL\bLO\bOG\bG-\tVersion 5.6.13---D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN-\tThis update introduces the following changes:-\t\t1. Per-config authentication settings--\tDetails:-\t\t- If an authentication.yaml file is placed within your config directory, it will be used instead of the global authentication values.---\tFor more details, visit the wiki: https://script-ware.gitbook.io----------------------------------------------------------------C\bCH\bHA\bAN\bNG\bGE\bEL\bLO\bOG\bG-\tVersion 5.6.12---D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN-\tThis update introduces the following changes:-\t\t1. Reformat code and organize imports--\tDetails:-\t\t- Reformatted code to be more readable and removed unused imports.---\tFor more details, visit the wiki: https://script-ware.gitbook.io----------------------------------------------------------------C\bCH\bHA\bAN\bNG\bGE\bEL\bLO\bOG\bG-\tVersion 5.6.11---D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN-\tThis update introduces the following changes:-\t\t1. Detect and raise an error for private gofile folders--\tDetails:-\t\t- Private gofile folders will now raise an error when attempting to download them instead of crashing CDL---\tFor more details, visit the wiki: https://script-ware.gitbook.io----------------------------------------------------------------C\bCH\bHA\bAN\bNG\bGE\bEL\bLO\bOG\bG-\tVersion 5.6.1---D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN-\tThis update introduces the following changes:-\t\t1. Fixes issue with --sort-all-downloads-\t\t2. Improves sort status visibility--\tDetails:-\t\t- The sort status is now display under hash, along with other statuses-\t\t- --sort-all-downloads is disabled by default, thus only cdl downloads are sorted without the flag-\t\t- The sort_folder can not be the same as the scan_dir---\tFor more details, visit the wiki: https://script-ware.gitbook.io----------------------------------------------------------------C\bCH\bHA\bAN\bNG\bGE\bEL\bLO\bOG\bG-\tVersion 5.6.0---D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN-\tThis update introduces the following changes:-\t\t1. Updated the sorting progress UI to display more information.-\t\t2. Removed unused functions from progress bars.--\tDetails:-\t\t- The sorting UI now displays the progress of each folder as it is being processed, including the number of files that have been sorted and the percentage of the folder that has been processed.-\t\t- The sorting UI now also shows what folders are in the queue to be sorted.---\tFor more details, visit the wiki: https://script-ware.gitbook.io----------------------------------------------------------------C\bCH\bHA\bAN\bNG\bGE\bEL\bLO\bOG\bG-\tVersion 5.5.1--D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN-\tThis update introduces the following changes:-\t\t1. small fixes for sorting system----\tDetails:-\t\t- use - instead of _ for new arguments-\t\t- fix bug where purge_dir is called for each file, instead of each directory when done---\tFor more details, visit the wiki: https://script-ware.gitbook.io----------------------------------------------------------------C\bCH\bHA\bAN\bNG\bGE\bEL\bLO\bOG\bG-\tVersion 5.5.0--D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN-\tThis update introduces the following changes:-\t\t1. Finalizes new sorting feature-\t\t2. add scanning directory for sorting-\t\t3. adds progress bar for sorting----\tDetails:-\t\t- skips need to scan db if sort_cdl_only is false-\t\t- progress bar for current progress of sorting files,incremented for each folder-\t\t- allow for setting a different folder to scan that is independent of the download folder--\tFor more details, visit the wiki: https://script-ware.gitbook.io----------------------------------------------------------------"""diff --git a/pyproject.toml b/pyproject.tomlindex 7bb31dc1f..1c7eceb34 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -7,6 +7,7 @@ readme = "README.md"repository = "https://github.com/jbsparrow/CyberDropDownloader"documentation = "https://script-ware.gitbook.io/cyberdrop-dl/"packages = [{ include = "cyberdrop_dl" }]+include = ["CHANGELOG.md"][tool.poetry.dependencies]python = "^3.11"@@ -38,3 +39,6 @@ cyberdrop-dl = "cyberdrop_dl.main:main"[build-system]requires = ["poetry-core>=1.0.0"]build-backend = "poetry.core.masonry.api"++[tool.poetry.urls]+Changelog = "https://github.com/jbsparrow/CyberDropDownloader/blob/master/CHANGELOG.md"\ No newline at end of file