Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

[wishlist]: annotate PDFs

Aberta
#3,243 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
25/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
python
Domínio
tooling

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

enhancement

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.

Linguagem predominante
Python
Estrelas
2.4k
Forks
531
Merge médio
15h 5min
PRs com merge (30d)
18

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

  • Sem Dockerfile nem arquivo Docker Compose
  • Sem modelo de pull request
  • Sem guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de codespell-project/codespell

Todas as issues de codespell-project/codespell

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.