[wishlist]: annotate PDFs
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 25/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Python
- Étoiles
- 2.4k
- Forks
- 531
- Merge moyen
- 15 h 55 min
- PR mergées (30 j)
- 17
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Aucun guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de codespell-project/codespell
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
codespell-project/codespell#3997 ·
Les mainteneurs répondent en général sous 1 jour
-
No error when beginning with 'Ouverteenhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 63/100
codespell-project/codespell#3965 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Add "marcos"Peut-être pris @ekanshul l’a pris il y a 20 jours. Ouvertedictionary
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
codespell-project/codespell#3920 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
question
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
codespell-project/codespell#4005 ·
Les mainteneurs répondent en général sous 1 jour
-
duplicate question
Difficulté 2/5 1-3 heures Accessibilité débutants 35/100
codespell-project/codespell#3998 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de codespell-project/codespell
Issues similaires
-
Admin member of a research group cannot see the HX2 allocation until they've been added to itOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 2 jours
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
developmentseed/titiler-cmr#278 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 2 jours