Pull structured values out of any file in ONE command, without reading the file into the conversation: e-mail addresses, phone numbers, web addresses, dates, money amounts, IBANs, Danish CVR numbers, CPR-shaped numbers (masked), invoice numbers, or any custom pattern, from PDF, Word, PowerPoint, Excel, text, Markdown, HTML or a whole folder; unique values with counts as a CSV. Use for: get every e-mail address out of this export, list all the invoice numbers in these PDFs, which phone numbers are in this document, find all amounts in this contract, check a file for CPR numbers before sending it. Triggers: extract, pull out, list all the, find every, e-mails in, phone numbers in, amounts in, invoice numbers, CVR, CPR check, regex.
Say it in your own words; the assistant finds this recipe by itself. Examples:
Pull structured values out of any file in ONE command, without reading the file into the conversation: e-mail addresses, phone numbers, web addresses, dates, money amounts, IBANs, Danish CVR numbers, CPR-shaped numbers (masked), invoice numbers, or any custom pattern, from PDF, Word, PowerPoint, Excel, text, Markdown, HTML or a whole folder; unique values with counts as a CSV. Use for: get every e-mail address out of this export, list all the invoice numbers in these PDFs, which phone numbers are in this document, find all amounts in this contract, check a file for CPR numbers before sending it. Triggers: extract, pull out, list all the, find every, e-mails in, phone numbers in, amounts in, invoice numbers, CVR, CPR check, regex.
python3 /skills/extract-from-text/scripts/extract.py IN OUT.csv --what <kinds> — IN is one file or a
folder in /work/in; OUT gets columns type,value,count,files. The file text never has to pass
through the model: the OK line summarises counts and the CSV holds the values.
| Need | Command |
|---|---|
| E-mail addresses | extract.py /work/in/export.xlsx /work/out/emails.csv --what emails |
| Several kinds at once | extract.py /work/in /work/out/found.csv --what emails,phones,urls |
| Money amounts and dates in a contract | extract.py /work/in/contract.pdf /work/out/amounts.csv --what amounts,dates |
| Invoice numbers across scanned PDFs | extract.py /work/in/invoices /work/out/invoices.csv --what invoices |
| Privacy check before sending | extract.py /work/in/report.docx /work/out/pii.csv --what cpr,emails,phones (CPR values are masked ddmmyy-****) |
| Your own pattern | extract.py /work/in/log.txt /work/out/ids.csv --regex "ORD-\d{6}" --name order |
| Show the first 15 in the OK line | add --show 15 |
Kinds: emails, phones (Danish and international), urls, dates (dd.mm.yyyy, dd/mm/yyyy, yyyy-mm-dd,
"24. oktober 2026", "24 October 2026"), amounts (kr., DKK, €, EUR, $, USD, "1.250,00"), ibans,
cvr (8 digits labelled CVR), cpr (ddmmyy-xxxx), invoices (faktura/invoice no.). Text is taken from
PDF (pdftotext), Word (pandoc), PowerPoint, Excel and plain files; scanned PDFs without a text layer
need OCR first (the pdf-to-markdown skill).
Report the counts per kind from the OK line and give the CSV link; quote a few values only if asked.
SKILL.mdscripts/__pycache__/extract.cpython-311.pycscripts/extract.pyWritten by Percerno, MIT licence.