Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request functionality: Add sequential prefix to file name #193

Open
arromdee opened this issue Jun 28, 2021 · 3 comments
Open

Request functionality: Add sequential prefix to file name #193

arromdee opened this issue Jun 28, 2021 · 3 comments

Comments

@arromdee
Copy link

dosage can get comics in order. However, if the site does not name its files sequentially, trying to view the downloaded files in order can be a problem.

So this is a request for dosage to have an option to add a prefix to each file name which is decreased as it obtains older comics. For instance,if a comic has "page196.jpg", "Extra_holiday_page.jpg", and "page195.jpg", the output files might be PREFIX5000_page196.jpg", PREFIX4999_Extra_holiday_page,jpg", and "PREFIX4998_page195.jpg", so that when a comics reader is used on the pages it will pick them up in sorted order.

Since dosage starts with the most recent comic, you will have to start with a large number like 5000 and decrement it, rather than start with 1 and work your way up.

You may have to disallow using a prefix unless the user starts with an empty directory, since it may otherwise be hard to provide a proper prefix value.

@TobiX
Copy link
Member

TobiX commented Jun 29, 2021

There are some helper tools in the repository to get to a similar state after the fact:

  • Run dosage with -o json
  • Use scripts/order-symlinks.py

@GittyGharial
Copy link

GittyGharial commented Sep 25, 2023

There are some helper tools in the repository to get to a similar state after the fact:

  • Run dosage with -o json
  • Use scripts/order-symlinks.py

Where might /scripts/order-symlinks.py be located? I searched the entirety of my ~/.local/pipx/venvs/dosage/ and didn't find a scripts folder

I found the script in the GitHub repo and downloaded it, worked out of the box and was pretty easy to modify for my purposes! Thanks as always for this fantastic tool

@TobiX
Copy link
Member

TobiX commented Sep 28, 2023

Where might /scripts/order-symlinks.py be located? I searched the entirety of my ~/.local/pipx/venvs/dosage/ and didn't find a scripts folder

Hmm, the whole scripts folder isn't installed, since it's outside the default package. It was intended that only development scripts are kept there, so order-symlinks should probably be polished and moved into the main source...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants