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

[Task] Add page number to information in document_sources field on Map #216

Open
mradamcox opened this issue Sep 3, 2024 · 0 comments
Open
Labels
component: backend effort: medium type: maintenance Underlying updates, upgrades, and general upkeep

Comments

@mradamcox
Copy link
Collaborator

Describe the task

The document_sources property on Map objects is essentially just a list of urls pointing to the source image of the document. Currently, as a leftover from the LOC parser, that url is interrogated when the Document objects are created, and a page number is inferred from them, which is then attached to the Document object. It would be better to determine the page number at the time that the document_sources list is created. This would help the underlying issue with slugs that caused #213.

The structure of the document sources list should/could be like this:

[
  {"url": "url for the document", "page_number": "1"},
  {"url": "url for the document", "page_number": "2"}
]

Note that page_number can be non-numbers, as they will ultimately be naturally sorted.

Implementing this will presumably require moving the generation of a document_sources list upstream into the importer's parsing method, which will then pass the list directly into the newly created Map instance.

@mradamcox mradamcox added effort: medium type: maintenance Underlying updates, upgrades, and general upkeep component: backend labels Sep 3, 2024
@mradamcox mradamcox added this to the v0.1.0-beta Release milestone Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: backend effort: medium type: maintenance Underlying updates, upgrades, and general upkeep
Projects
None yet
Development

No branches or pull requests

1 participant