ENH: Add command to export annotations as JSON
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 571
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
This was originally asked in https://github.com/py-pdf/pypdf/issues/2291
Proposed syntax:
$ pdfly annotations export
[
{"page_index": 0, "/Subtype": }
]
So essentially the idea is to export the same as defined in 12.5 Annotations (PDF 1.7 specifications), but add the "page_index" to the dictionary.
For the moment, we would only support the JSON export. If we want to add more export formats, we can add --format with a default value of JSON.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the existing pdfly CLI annotation commands and the PDF 1.7 specification’s section 12.5, since no implementation files or tests are named. Define the export result as a JSON array of annotation dictionaries with page_index; done when pdfly annotations export emits that structure for supported annotations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100