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

Export annotation color as hex RGB code in JSON output #78

Merged
merged 5 commits into from
Jul 30, 2023

Conversation

charlesneimog
Copy link
Contributor

Hi, again, thanks for all the work, it is great!!!

I added very simple piece of code to try to get color of the note. If it fails, nothing changes in the output.

Copy link
Owner

@0xabu 0xabu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the submission! This makes sense. I have a couple of minor suggestions and one big one: I'd prefer to keep the colour strongly typed. (This will also make the type annotations easier to wrangle.) However, if you just want to make the minor fixes, I'll handle it myself later.

pdfannots/__init__.py Outdated Show resolved Hide resolved
pdfannots/types.py Outdated Show resolved Hide resolved
@charlesneimog charlesneimog force-pushed the json-color branch 2 times, most recently from f666802 to 183f574 Compare July 30, 2023 10:43
@0xabu 0xabu linked an issue Jul 30, 2023 that may be closed by this pull request
Copy link
Owner

@0xabu 0xabu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, almost there. Thank you again!

I'm trying to figure out how to get github to run the tests, but I suspect one of the linters may add a little more busy-work for you when I do.

Edit: if you merge or rebase to my last changes on main branch, github should prompt us to run the tests.

pdfannots/printer/json.py Outdated Show resolved Hide resolved
pdfannots/__init__.py Outdated Show resolved Hide resolved
pdfannots/types.py Outdated Show resolved Hide resolved
pdfannots/__init__.py Show resolved Hide resolved
@0xabu 0xabu changed the title add color of note in json files Export annotation color as hex RGB code in JSON output Jul 30, 2023
@charlesneimog
Copy link
Contributor Author

I believe that everything is ok now! Let me know!

@0xabu
Copy link
Owner

0xabu commented Jul 30, 2023

I believe that everything is ok now! Let me know!

Just a few nits but I can take care of them.

@0xabu 0xabu merged commit 81ae77f into 0xabu:main Jul 30, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Differentiate Extracted Highlights by color
2 participants