From d633f5bca37f7064d9398e1e326184fed7f21b38 Mon Sep 17 00:00:00 2001 From: Peter Taylor Date: Wed, 9 Mar 2022 11:05:05 +0000 Subject: [PATCH] renamed to itchiodl and uploaded to PIP --- .gitignore | 3 +- Readme.md | 10 +- {src/itchio => itchiodl}/__init__.py | 0 {src/itchio => itchiodl}/bundle.py | 0 .../bundle_tool/__main__.py | 0 .../downloader/__main__.py | 0 {src/itchio => itchiodl}/game.py | 0 {src/itchio => itchiodl}/library.py | 0 {src/itchio => itchiodl}/login.py | 0 {src/itchio => itchiodl}/utils.py | 0 poetry.lock | 140 ------------------ pyproject.toml | 4 +- 12 files changed, 9 insertions(+), 148 deletions(-) rename {src/itchio => itchiodl}/__init__.py (100%) rename {src/itchio => itchiodl}/bundle.py (100%) rename {src/itchio => itchiodl}/bundle_tool/__main__.py (100%) rename {src/itchio => itchiodl}/downloader/__main__.py (100%) rename {src/itchio => itchiodl}/game.py (100%) rename {src/itchio => itchiodl}/library.py (100%) rename {src/itchio => itchiodl}/login.py (100%) rename {src/itchio => itchiodl}/utils.py (100%) delete mode 100644 poetry.lock diff --git a/.gitignore b/.gitignore index bfc9c93..5d6f639 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ venv __pycache__ -src/* -!src/itchio \ No newline at end of file +dist \ No newline at end of file diff --git a/Readme.md b/Readme.md index 61854f6..9ad704b 100644 --- a/Readme.md +++ b/Readme.md @@ -1,24 +1,26 @@ +## IMPORTANT NOTICE: up until 2022-03-09, the package was called itchio, it is now called itchiodl (to avoid pypi conflicts) + # Itchio Downloader Tool ## Install ```bash -pip install git+https://github.com/emersont1/itchio +pip install itchiodl ``` ## Download All Games in library from account ```bash -python -m itchio.downloader +python -m itchiodl.downloader ``` This uses the same API the itchio app uses to download the files. If you have 2FA enabled, generate an API key [here](https://itch.io/user/settings/api-keys) and run the following instead ```bash -python -m itchio.downloader --api-key=KEYHERE +python -m itchiodl.downloader --api-key=KEYHERE ``` ## Add All Games in a bundle to your library ```bash -python -m itchio.bundle_tool +python -m itchiodl.bundle_tool ``` This is a bit of a bodge, but it works. It essentially goes through and clicks the "Download" link on every item on the bundle's page, which adds it to your itchio library. It does not download any files. You will need the download page's URL (this will be in the bundle's email, and possibly your purchase history). It will not work with 2FA, and I'm unlikely to be able to fix it without making it far more complicated diff --git a/src/itchio/__init__.py b/itchiodl/__init__.py similarity index 100% rename from src/itchio/__init__.py rename to itchiodl/__init__.py diff --git a/src/itchio/bundle.py b/itchiodl/bundle.py similarity index 100% rename from src/itchio/bundle.py rename to itchiodl/bundle.py diff --git a/src/itchio/bundle_tool/__main__.py b/itchiodl/bundle_tool/__main__.py similarity index 100% rename from src/itchio/bundle_tool/__main__.py rename to itchiodl/bundle_tool/__main__.py diff --git a/src/itchio/downloader/__main__.py b/itchiodl/downloader/__main__.py similarity index 100% rename from src/itchio/downloader/__main__.py rename to itchiodl/downloader/__main__.py diff --git a/src/itchio/game.py b/itchiodl/game.py similarity index 100% rename from src/itchio/game.py rename to itchiodl/game.py diff --git a/src/itchio/library.py b/itchiodl/library.py similarity index 100% rename from src/itchio/library.py rename to itchiodl/library.py diff --git a/src/itchio/login.py b/itchiodl/login.py similarity index 100% rename from src/itchio/login.py rename to itchiodl/login.py diff --git a/src/itchio/utils.py b/itchiodl/utils.py similarity index 100% rename from src/itchio/utils.py rename to itchiodl/utils.py diff --git a/poetry.lock b/poetry.lock deleted file mode 100644 index 0667f84..0000000 --- a/poetry.lock +++ /dev/null @@ -1,140 +0,0 @@ -[[package]] -name = "args" -version = "0.1.0" -description = "Command Arguments for Humans." -category = "main" -optional = false -python-versions = "*" - -[[package]] -name = "beautifulsoup4" -version = "4.10.0" -description = "Screen-scraping library" -category = "main" -optional = false -python-versions = ">3.0.0" - -[package.dependencies] -soupsieve = ">1.2" - -[package.extras] -html5lib = ["html5lib"] -lxml = ["lxml"] - -[[package]] -name = "certifi" -version = "2021.10.8" -description = "Python package for providing Mozilla's CA Bundle." -category = "main" -optional = false -python-versions = "*" - -[[package]] -name = "charset-normalizer" -version = "2.0.9" -description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "main" -optional = false -python-versions = ">=3.5.0" - -[package.extras] -unicode_backport = ["unicodedata2"] - -[[package]] -name = "clint" -version = "0.5.1" -description = "Python Command Line Interface Tools" -category = "main" -optional = false -python-versions = "*" - -[package.dependencies] -args = "*" - -[[package]] -name = "idna" -version = "3.3" -description = "Internationalized Domain Names in Applications (IDNA)" -category = "main" -optional = false -python-versions = ">=3.5" - -[[package]] -name = "requests" -version = "2.26.0" -description = "Python HTTP for Humans." -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" - -[package.dependencies] -certifi = ">=2017.4.17" -charset-normalizer = {version = ">=2.0.0,<2.1.0", markers = "python_version >= \"3\""} -idna = {version = ">=2.5,<4", markers = "python_version >= \"3\""} -urllib3 = ">=1.21.1,<1.27" - -[package.extras] -socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"] -use_chardet_on_py3 = ["chardet (>=3.0.2,<5)"] - -[[package]] -name = "soupsieve" -version = "2.3.1" -description = "A modern CSS selector implementation for Beautiful Soup." -category = "main" -optional = false -python-versions = ">=3.6" - -[[package]] -name = "urllib3" -version = "1.26.7" -description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" - -[package.extras] -brotli = ["brotlipy (>=0.6.0)"] -secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] -socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] - -[metadata] -lock-version = "1.1" -python-versions = "^3.8" -content-hash = "0f49cc8736815a5e828a9353cb3e166d90bb0bc1d1f4a59978bf5f930a4fe14d" - -[metadata.files] -args = [ - {file = "args-0.1.0.tar.gz", hash = "sha256:a785b8d837625e9b61c39108532d95b85274acd679693b71ebb5156848fcf814"}, -] -beautifulsoup4 = [ - {file = "beautifulsoup4-4.10.0-py3-none-any.whl", hash = "sha256:9a315ce70049920ea4572a4055bc4bd700c940521d36fc858205ad4fcde149bf"}, - {file = "beautifulsoup4-4.10.0.tar.gz", hash = "sha256:c23ad23c521d818955a4151a67d81580319d4bf548d3d49f4223ae041ff98891"}, -] -certifi = [ - {file = "certifi-2021.10.8-py2.py3-none-any.whl", hash = "sha256:d62a0163eb4c2344ac042ab2bdf75399a71a2d8c7d47eac2e2ee91b9d6339569"}, - {file = "certifi-2021.10.8.tar.gz", hash = "sha256:78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872"}, -] -charset-normalizer = [ - {file = "charset-normalizer-2.0.9.tar.gz", hash = "sha256:b0b883e8e874edfdece9c28f314e3dd5badf067342e42fb162203335ae61aa2c"}, - {file = "charset_normalizer-2.0.9-py3-none-any.whl", hash = "sha256:1eecaa09422db5be9e29d7fc65664e6c33bd06f9ced7838578ba40d58bdf3721"}, -] -clint = [ - {file = "clint-0.5.1.tar.gz", hash = "sha256:05224c32b1075563d0b16d0015faaf9da43aa214e4a2140e51f08789e7a4c5aa"}, -] -idna = [ - {file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"}, - {file = "idna-3.3.tar.gz", hash = "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"}, -] -requests = [ - {file = "requests-2.26.0-py2.py3-none-any.whl", hash = "sha256:6c1246513ecd5ecd4528a0906f910e8f0f9c6b8ec72030dc9fd154dc1a6efd24"}, - {file = "requests-2.26.0.tar.gz", hash = "sha256:b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7"}, -] -soupsieve = [ - {file = "soupsieve-2.3.1-py3-none-any.whl", hash = "sha256:1a3cca2617c6b38c0343ed661b1fa5de5637f257d4fe22bd9f1338010a1efefb"}, - {file = "soupsieve-2.3.1.tar.gz", hash = "sha256:b8d49b1cd4f037c7082a9683dfa1801aa2597fb11c3a1155b7a5b94829b4f1f9"}, -] -urllib3 = [ - {file = "urllib3-1.26.7-py2.py3-none-any.whl", hash = "sha256:c4fdf4019605b6e5423637e01bc9fe4daef873709a7973e195ceba0a62bbc844"}, - {file = "urllib3-1.26.7.tar.gz", hash = "sha256:4987c65554f7a2dbf30c18fd48778ef124af6fab771a377103da0585e2336ece"}, -] diff --git a/pyproject.toml b/pyproject.toml index e6ea250..27b38fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] -name = "itchio" -version = "1.0.4" +name = "itchiodl" +version = "1.1.0" description = "Python Scripts for downloading / archiving your itchio library" authors = ["Peter Taylor "] license = "MIT"