invoice-x / invoice2data

Extract structured data from PDF invoices
MIT License
1.83k stars 479 forks source link

--move will fail when any parsed field contains illegal filesystem characters #544

Open nomandera opened 10 months ago

nomandera commented 10 months ago

The default move will rename invoices to {date} {Invoice Number} {Description} however when any parsed field contains illegal filesystem characters the move will fail with:

Error message: [Errno 2] No such file or directory: '

An example of this would be an invoice number of the form 123/001/2023 with the / character being illegal on most filesystems although there are many more examples.

Is there correct way to sanitize or work around this natively?

bosd commented 10 months ago

Hi, Thanks for the feedback. It makes sense to preform some kind of sanitization to filter out illegal characters on the filename. Can you make a PR for this?