Open laurejt opened 2 days ago
To improve handling of PPA excerpt page ranges, I recommend we use intspan. In ppa-django we use the intspan
package to parse page ranges, and anything in the data exports is guaranteed parsable by intspan
.
Here's where we use it in the ppa-django DigitizedWork model: https://github.com/Princeton-CDH/ppa-django/blob/main/ppa/archive/models.py#L1047-L1053
It returns an object that can be treated as an iterable with all page numbers included in the span.
[ ] Support nonconsecutive PPA works
[ ] Simplify page selection