Awesome
LogseqPDFImporter
Import PDF into logseq but also import annotations made from other software.
Status
- Not feature complete but I've used it successfuly several times
- The text highlights are correctly parsed.
- Other type of annotation (lines, shapes, rectangles, etc) are parsed as "area highlight" (open an issue if something goes wrong). The area is currently only one rectangle that surrounds the whole area, I have yet to code the exact rectangle geometry extractions (help welcome!)
- Colors are correctly matched to logseq's available colors.
- Creates both the .md and .edn files, as well as images of area highlights.
PDF reader compatibility
- I use Okular from KDE software on my computers and Xodo on android. Both use annotations that are fully compatible by the way!
- I assume it works out of the box with other readers minus some quirks. Notably related to freehand movement I'm sure.
- Tell me if you tested it on other software!
TODO (please help)
- Put it on pypi and detail in the README how to use it as a uv tool
- fix the text annotation by using small rectangles that cover exactly the text instead of one large overlapping area over the whole text
Usage
python -m pip install -r requirements.txt
python LogseqPDFImporter.py path_to_pdf --md_path path_to_md --edn_path path_to_edn
Example
1
<img src="https://github.com/thiswillbeyourgithub/LogseqPDFImporter/blob/main/docs/normal_1.png" width=300/> <img src="https://github.com/thiswillbeyourgithub/LogseqPDFImporter/blob/main/docs/logseq_1.png" width=300/>
2
<img src="https://github.com/thiswillbeyourgithub/LogseqPDFImporter/blob/main/docs/normal_2.png" width=300/> <img src="https://github.com/thiswillbeyourgithub/LogseqPDFImporter/blob/main/docs/logseq_2.png" width=300/>