karlicoss/HPI

my.pdfs error; updates from pdfannots

purarue opened this issue · 0 comments

pdfannots has made quite a lot of updates in the past few months, including Annotation and Document classes which replace the typical return values for the process_file, and some of the kwargs.

Currently just throws an error since the kwargs dont match the previous interface, but it also returns different data now

$ hpi query my.pdfs.annotations | jq '.[0]'
{
  "error": "Exception: process_file() got an unexpected keyword argument 'emit_progress'\n"
}

I would try and update this myself but not very used to working with annotations/pdfs and don't want to remove something which may be useful.

Also, even though there is a annotation class there, I think we should keep to a NT/Dataclass based one for cachew reasons. In addition, the fields there are nullable, which makes things a bit annoying.

This is why #179 is currently failing (also reminder that 3.6 macos CI is still broken here, I fixed it in that PR, but you'd probably have to do it again before thats merged in; will merge on top of it to get the changes)