Skip to content

Issue 56 archivefile links #57

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

Merged
merged 2 commits into from
Jan 23, 2025
Merged

Conversation

kan-fu
Copy link
Collaborator

@kan-fu kan-fu commented Jan 13, 2025

Fix #56

Added two methods (getArchivefileUrl and getArchivefileUrls) to only return the URLs of the archivefiles so users can use them in their favorite download manager.

Also added an example of how to do that in aria2c.

file_urls = self.archive.getArchivefileUrls(filters, allPages)
if joinedWithNewline:
return "\n".join(file_urls)
else:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nitpicky comment, but the 'else' is unnecessary, ie:

        if joinedWithNewline:
            return "\n".join(file_urls)
        return file_urls

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. I normally omit the else when the else part is substantially bigger than the if part, so that it avoids the nesting for the longer code lines by ruling out those small and edge cases in the very beginning. For a one-liner, it looks more balanced to me inside an indentation block. Just a personal preference.

@spencerwplovie spencerwplovie merged commit abd6232 into main Jan 23, 2025
6 checks passed
@kan-fu kan-fu deleted the issue-56-archivefile-links branch February 7, 2025 21:54
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

Successfully merging this pull request may close these issues.

Make downloading archivefiles easier by using a download manager
2 participants