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

Use catalog.db for better insights into publications when merging #16

Open
AndreasSko opened this issue Sep 20, 2020 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@AndreasSko
Copy link
Owner

Sometimes it can be hard to figure out what publication a bookmark or marking belongs to when only looking at the KeySymbol or DocumentID. We could benefit from the catalog that JWLibrary is using to show all available publications.

Proposed approach:
Create an additional package that is responsible for looking up the publication a KeySymbol or DocumentID is belonging to. We are able to use API for that:

  1. Fetch the current manifest from https://app.jw-cdn.org/catalogs/publications/v4/manifest.json
  2. Download the current catalog from https://app.jw-cdn.org/catalogs/publications/v4/{MANIFEST}/catalog.db.gz
  3. Cache it locally and only fetch it again if we are not able to lookup a publication (because it may be too new)
  4. Query the DB for the KeySymbol or DocumentID (using the PublicationDocument table).
@abdon-copper
Copy link

Nice, that would indeed be useful. One thing I ran into with a related project was that MepsLanguage is just a number and not a user friendly representation of the language. catalog.db also contains a table for languages.

@AndreasSko
Copy link
Owner Author

This has been implemented for the JWLM app. Still open for the command line though.

@temporarium

This comment was marked as off-topic.

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

No branches or pull requests

3 participants