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

Add URLs support to collection #59

Closed
rgaudin opened this issue May 26, 2023 · 0 comments · Fixed by #62
Closed

Add URLs support to collection #59

rgaudin opened this issue May 26, 2023 · 0 comments · Fixed by #62
Assignees
Labels
enhancement New feature or request

Comments

@rgaudin
Copy link
Member

rgaudin commented May 26, 2023

To support nautilus-webui but also because it makes nautilus a lot more flexible, we want the JSON collection to support setting URLs on each entry in addition to files.

Because the simple List[str] for files is already showing limits (#57), we want to extend it.

  • It's still a list
  • It can still contain a single str and in this case, current behavior applies (it's a member name of the accompanying archive)
  • It can also be a Dict[str, str] composed of
{
  "archive-member": "01 BOOK for printing .pdf",  # optional, member name inside archive (same as current)
  "url": "http://books.com/310398120.pdf",  # optional, has precedence over `archive-member`, url to download file from
  "filename": "My book.pdf",  # optional, filename to use in ZIM, regardless of original one
}

One of archive-member or url should be present, otherwise it is not considered.
All those url are to be fetched and stored in the ZIM, at the requested filename or using the basename of the URL.

User is responsible for not uniqueness of filenames.

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

Successfully merging a pull request may close this issue.

2 participants