SkillsGrove
SkillsGrove/Documents bureautiques/notoriouslab/doc-cleaner/doc-cleaner

doc-cleaner

Installation

$npx skills add https://github.com/notoriouslab/doc-cleaner --skill doc-cleaner
$git clone --depth 1 https://github.com/notoriouslab/doc-cleaner.git /tmp/doc-cleaner && mkdir -p ~/.claude/skills && cp -r /tmp/doc-cleaner/. ~/.claude/skills/doc-cleaner
Installe pour moi cette Agent Skill : https://github.com/notoriouslab/doc-cleaner/tree/55e3c472ac4875c3bb923b2d82821fec15444cc0/ — lis d’abord son SKILL.md et ses scripts, et ne l’installe dans mon dossier de compétences qu’après avoir vérifié qu’elle est sûre.

Résumé

Description d’origine · MITConvert PDF, DOCX, XLSX, and text files to clean, structured Markdown. CJK-friendly, table-friendly, privacy-first.
Le SKILL.md ci-dessous est reproduit depuis notoriouslab/doc-cleaner (commit 55e3c47) sous licence MIT. Le texte est inchangé ; seules les métadonnées d’en-tête du fichier sont omises, les images sont affichées sous forme de liens et les fichiers très longs sont tronqués. Copyright 2026 notoriouslab. Licence : LICENSE. Seul le fichier d’instructions est affiché ; consultez le dépôt d’origine pour les éventuels scripts.

doc-cleaner

Convert documents (PDF, DOCX, XLSX, TXT) to clean, structured Markdown.

When to use

  • User asks to convert a document to Markdown
  • User wants to extract text or tables from PDF/DOCX/XLSX files
  • User wants to clean up bank statements or financial documents
  • User asks to process a batch of documents in a directory

Commands

Convert a single file (no AI, fastest)

python3 {baseDir}/cleaner.py --input "{{file_path}}" --ai none

Convert a single file with AI structuring

python3 {baseDir}/cleaner.py --input "{{file_path}}" --ai gemini

Convert a single file with Groq structuring

python3 {baseDir}/cleaner.py --input "{{file_path}}" --ai groq

Convert all files in a directory

python3 {baseDir}/cleaner.py --input "{{directory}}" --ai none --output-dir "{{output_dir}}"

Preview without writing (dry run)

python3 {baseDir}/cleaner.py --input "{{file_path}}" --dry-run --verbose

Get machine-readable result summary

python3 {baseDir}/cleaner.py --input "{{file_path}}" --ai none --summary

The --summary flag prints a JSON summary to stdout after processing:

{"version":"1.0.0","total":3,"success":2,"failed":1,"files":[{"file":"report.pdf","output":"./output/report.md","status":"ok"},{"file":"scan.pdf","output":null,"status":"no_content"},{"file":"data.xlsx","output":"./output/data.md","status":"ok"}]}

Options

Flag Description
--input, -i File or directory to process (required, non-recursive)
--output-dir, -o Output directory (default: ./output)
--ai gemini, groq, ollama, or none (default: from config or gemini)
--password PDF decryption password
--config Path to config JSON
--summary Print JSON summary to stdout after processing
--dry-run Preview without writing files
--verbose Enable debug logging

Supported formats

PDF (native, scanned, encrypted), DOCX, XLSX, XLS, CSV, TXT, MD

Exit codes

Code Meaning
0 All files processed successfully
1 Some files failed (partial success)
2 No processable files found or config error

Notes

  • Output defaults to ./output/ relative to current directory
  • For scanned PDFs, AI mode (gemini, groq, or ollama) gives much better results
  • --ai none requires zero API keys and zero network access
  • CJK encoding (Big5, CP950, UTF-16) is auto-detected
  • Tables in DOCX and XLSX are preserved as Markdown pipe tables
Voir le texte intégral de la licence (MIT)
MIT License

Copyright (c) 2026 notoriouslab

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.