Giter VIP home page Giter VIP logo

drpg's People

Contributors

dependabot[bot] avatar glujan avatar mem89de avatar rays avatar toddbradley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

drpg's Issues

Fails on Linux due to "/" in folder name

Processing: /r/dndbehindthescreen Monster Ecology Anthology - 893096-Monster_ecology_anthology.pdf
Waiting to download: 207419 - 0
Traceback (most recent call last):
File "/usr/lib/python3.8/pathlib.py", line 1279, in mkdir
self._accessor.mkdir(self, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/r/dndbehindthescreen Monster Ecology Anthology'

Homebrew recipe for MacOS

This repo holds a script, not a library, so it should be possible to install drpg using a popular package manager like Homebrew, not pip which is a package manager for Python developers.

mapping company and product names to directory names is different than DTRPG client

Hi, I just found this project and was very happy to see someone else put this together. Yesterday, fed up with DTRPG's lack of Apple Silicon support, I started reverse engineering the DTRPG API that their client app uses, with the goal of building my own simple Python client app. But I see you've already done that, which is awesome! And the code is beautiful.

There are some differences I've spotted between drpg and the official client app, though. And so I wondered if your intent was to make them interoperable. Two of the differences I've seen are that the algorithms the two pieces of software use to map company and product names into directory names aren't the same. Here are a couple of examples:

The DTRPG client app saved this file: /Game Designers__039_ Workshop _GDW_/Ebook_ The Science Fiction In Traveller/The-Science-Fiction-In-Traveller-Kindle.jpg while your drpg code saved this file: /Game Designers' Workshop (GDW)/Ebook - The Science Fiction In Traveller/The-Science-Fiction-In-Traveller-Kindle.jpg

Another example:

Official client app: /Michael Brown/The Eyes of Winter _Holiday Adventure_/The_Eyes_of_Winter.pdf

drpg: /Michael Brown/The Eyes of Winter (Holiday Adventure)/The_Eyes_of_Winter.pdf

You could argue which is better, but the main point is that they're different. Should they be?

Error during sync

Get the following error after it sync's for a while.

Unexpected error occurred, stopping!
Traceback (most recent call last):
File "/home/mark/.local/bin/drpg", line 8, in
sys.exit(run())
^^^^^
File "/home/mark/.local/lib/python3.11/site-packages/drpg/cmd.py", line 32, in run
DrpgSync(config).sync()
File "/home/mark/.local/lib/python3.11/site-packages/drpg/sync.py", line 67, in sync
pool.starmap(self._process_item, process_item_args)
File "/usr/lib64/python3.11/multiprocessing/pool.py", line 375, in starmap
return self._map_async(func, iterable, starmapstar, chunksize).get()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/multiprocessing/pool.py", line 774, in get
raise self._value
File "/usr/lib64/python3.11/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/multiprocessing/pool.py", line 51, in starmapstar
return list(itertools.starmap(args[0], args[1]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mark/.local/lib/python3.11/site-packages/drpg/sync.py", line 38, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/mark/.local/lib/python3.11/site-packages/drpg/sync.py", line 76, in _process_item
url_data = self._api.file_task(product["products_id"], item["bundle_id"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mark/.local/lib/python3.11/site-packages/drpg/api.py", line 94, in file_task
while (data := resp.json()["message"])["progress"].startswith("Preparing"):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
TypeError: string indices must be integers, not 'str'

Move to pyproject.toml

  • move configuration from setup.cfg to pyproject.toml
  • move requirements.in and requirements.dev.in to project.toml
  • Update contributing.md. It references setuptools but the project is using build.
  • #42

Update httpx to 1.0

Once released, I'd like to update tox and requirements files to use final httpx 1.0. Currently tox is using beta and requirements file 0.19.

Snap/Flatpak for Linux users

This repo holds a script, not a library, so it should be possible to install drpg using a popular package manager like snap or flatpack, not pip which is a package manager for Python developers.

Limited sync

Hi! This is amazing and I love it. Is it possible to have it selectively sync, and just download a handful of the files?

If you would be open, I could try to provide a patch to start support, but I also don't want to jump in if not!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.