This is a paperless-ngx post-consumption script to extract document data based on the original filename.
It was initially developed by @gulpman and posted in this discussion thread. I've made further changes, detailed below.
The script assumes the following pattern: {Date} - {Correspondent} - {Title}
, and can parse the following cases: