Convert inputs
Template for yearly bookkeeping for small holding companies. Country-agnostic (DK example), ERP-agnostic (Ofinda example).
npx -y skills add NOGIT007/holding-accounting --skill convert-inputsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Convert every source file in regnskab{YYYY}/input/ to markdown so downstream skills can read it. Trigger when the user asks to "convert inputs", "konverter input", "make markdown", "process the year's inputs", or when new files appear in regnskab{YYYY}/input/. Uses Microsoft markitdown with an OCR fallback for scanned PDFs.
SKILL.md
3.6 KB, 855 tokens by cl100k_base, as published. Nobody here has run it
Convert inputs to markdown
Source documents (bank statements, broker statements, receipts) come in mixed formats — PDF, xlsx, mhtml, html, sometimes plain text. Downstream skills work best on markdown: line-addressable, diff-friendly, easy to extract tables from.
This skill converts every file in regnskab{YYYY}/input/ (excluding the markdown/ subfolder) to a markdown file in regnskab{YYYY}/input/markdown/.
When to run
- After the user drops new files in
input/. - Before invoking
build-workbookfor the first time. - When the user re-uploads a corrected statement (delete the old markdown first).
Tool
Microsoft markitdown is the converter. Install once:
pip install 'markitdown[all]' --break-system-packages
Naming pattern
The markdown filename keeps the original extension as a suffix. This avoids collisions when the same stem exists as both .pdf and .xlsx (a common case for broker statements):
broker2025.pdf → input/markdown/broker2025__pdf.md
broker2025.xlsx → input/markdown/broker2025__xlsx.md
Use __{ext} (double underscore + extension) as the separator.
Per-file conversion
markitdown "regnskab{YYYY}/input/{filename}.pdf" -o "regnskab{YYYY}/input/markdown/{filename}__pdf.md"
markitdown "regnskab{YYYY}/input/{filename}.xlsx" -o "regnskab{YYYY}/input/markdown/{filename}__xlsx.md"
PDF files become text. xlsx files become tables. mhtml / html become structured markdown. From this point on, downstream skills always read the markdown version — never the original.
OCR fallback
Plain markitdown extracts text but not text inside embedded images. Some broker statements render as scanned tables (the original PDF was a scanned document, not a born-digital one).
Trigger condition: a PDF input produces < 50 lines of markdown but the file is > 50 KB.
When triggered, enable the markitdown-ocr plugin with Mistral OCR v3 as the LLM client:
pip install markitdown-ocr --break-system-packages
markitdown-ocr "regnskab{YYYY}/input/{filename}.pdf" -o "regnskab{YYYY}/input/markdown/{filename}__pdf.md"
If Mistral isn't available, document the file as needing manual transcription in note{YYYY}.md.
Idempotency
Re-running this skill should be safe. The script:
- Lists every file in
input/(top-level only — not themarkdown/subfolder). - Skips files that already have an up-to-date markdown counterpart (
mtime(markdown) >= mtime(input)). - Re-converts files that are newer than their markdown counterpart.
Verification
After running, the user should see:
- One markdown file per source file.
- Each markdown file with > 5 non-empty lines (otherwise the conversion likely failed silently — flag it).
A simple check:
for f in regnskab{YYYY}/input/markdown/*.md; do
lines=$(wc -l < "$f")
if [ "$lines" -lt 5 ]; then
echo "WARNING: $f has $lines lines"
fi
done
What this skill does NOT do
- It does not interpret the content. That happens in
build-workbook. - It does not move or delete originals. The PDFs/xlsx stay in
input/for audit trail. - It does not deduplicate. If two inputs have identical content but different names, both get converted.