[wishlist]: annotate PDFs
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Start by reading the codespell project entry points and tests to understand how files are currently checked; this issue names no specific files or tests. Then evaluate the proposed PDF text-extraction and annotation libraries against the desired workflow. Done would require a defined, tested way to check PDF text and annotate identified misspellings, but the issue does not specify expected behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
codespell is so great, would have been nice if we could get it to check and annotate text in other media, in particular in PDFs. Here is some background information from chatting with ChatGPT (adding references):
Yes, some of these libraries can be used to extract text along with their locations from a PDF, which would allow you to add annotations on mistyped words or similar tasks. The two most suitable libraries for this purpose are:
-
PDFMiner: PDFMiner (dead, community fork: https://github.com/pdfminer/pdfminer.six) is especially powerful for this task. It allows you to extract not just the text but also detailed information about the text layout, including the position of each character. This can be very useful if you want to find specific words and their locations for annotation purposes.
-
PyMuPDF (https://github.com/pymupdf/PyMuPDF) (Fitz): This is another library that's highly effective for extracting text with layout information. PyMuPDF provides detailed information about each text block, line, and even individual characters, including their positions on the page.
Both of these libraries will let you extract text in a way that retains information about where each piece of text is located on the page. You can then use this information to target specific words or phrases for annotation.
After extracting the text and its location, you can use a library like PyPDF2 or ReportLab to add annotations or highlight the text at the identified locations. This two-step process (text extraction with PDFMiner or PyMuPDF and annotation with PyPDF2 or ReportLab) can be quite effective for tasks like marking typos or adding notes to specific sections of text in a PDF document.
- Lingua principale
- Python
- Stelle
- 2.4k
- Fork
- 531
- Merge medio
- 15h 5m
- PR unite (30g)
- 18
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di codespell-project/codespell
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
codespell-project/codespell#3997 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
codespell-project/codespell#3965 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Add "marcos"Forse già presa @ekanshul l’ha presa 19 giorni fa. Apertadictionary
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
codespell-project/codespell#3920 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
question
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
codespell-project/codespell#4005 ·
I maintainer di solito rispondono entro 1 giorno
-
duplicate question
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
codespell-project/codespell#3998 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di codespell-project/codespell
Issue simili
-
app: scripts status: backlog type: documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
netbox-community/netbox-scripts#68 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 91/100
marin-community/marin#10765 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
flathub/com.unity.UnityHub#230 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
namespace operations
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 63/100
EclipseFdn/open-vsx.org#14910 ·
I maintainer di solito rispondono entro 1 giorno