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

Please add single issue download #6

Open
PoC-dev opened this issue Mar 15, 2024 · 1 comment
Open

Please add single issue download #6

PoC-dev opened this issue Mar 15, 2024 · 1 comment

Comments

@PoC-dev
Copy link

PoC-dev commented Mar 15, 2024

I've been searching for an automatic downloader for Heise magazines some years ago, but no avail. This changed. Thanks to you. :-)

I miss the feature to just get a single magazine, but fail to come up with a nice idea how to integrate this into the existing command line.

What do you think?

@AlexanderMelde
Copy link
Owner

Hello @PoC-dev, you're welcome!

To download just a single magazine one could remove the for-loop

dl_for_heise/download.sh

Lines 74 to 76 in 2e59241

for year in $(seq -f %g ${start_year} ${end_year}); do
$verbose && printf "${info} YEAR ${year}\n"
for i in $(seq -f %g 1 ${max_nr_of_magazines_per_year}); do

and instead assign a value to the year and issue number variables directly (or pass them to the script as arguments).

If you want to make this change, I would suggest saving your modifications to a separate file download_issue.sh, as unfortunately I don't have a heise subscription currently and could not review your changes to the original script.

To reduce redundancy, integrating it into the existing script would definitely be a nicer solution, but I think given the current size of the project we can go this path for now. if you want to prepare the code for a later merge, you could encapsulate the whole functionality for downloading one issue into a function that can either be called via the for-loop or directly.

Best,
Alexander

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

No branches or pull requests

2 participants