docspell icon indicating copy to clipboard operation
docspell copied to clipboard

Date from Filename

Open mirisbowring opened this issue 3 years ago • 2 comments

Hi,

sometimes I am getting a document without a Date on it, or a document, i know that Docspell will have problems to detect it. Therefore I scan the Document with Genius Scan App, name it e.x. 2022-03-01 My crazy document and share it with docspell-share app.

Unfortunately, Docspell is not proposing this date.

It would be cool to have a "module" to parse the filename and add the date as primary proposal since it has been "manually approved" by naming the file accordingly.

mirisbowring avatar Mar 01 '22 09:03 mirisbowring

I like the idea. There is no filename specific processing going on at all currently. I think a quick approach is to prepend the filename to the extracted text, that should then at least propose the date (actually I thought I did this, but obviously that's not the case). On a second step, a more file specific processing could be implemented (treating everything that comes out of it as "confirmed" perhaps)

eikek avatar Mar 01 '22 20:03 eikek

One way to consider would be a hook that gets fed the filename, and can output a new filename, and a JSON dictionary with metadata it was able to extract.

madduck avatar Sep 08 '23 21:09 madduck