Closed patbakdev closed 1 year ago
The reason for having the filename structured in the current way is because beancounts automatically picks up files with names in that format to add document
directives to the ledger. Changing the separator between the date and the rest of the name would prevent this mechanism from working.
I'm not opposed to make it configurable (and a space looks better than a dot to me too) but I don't think it should be a command line parameter for two reasons: the users are going to get inconsistent file names if they forgot the option, and as explained above, because it does not mix well with the support for automatic document
directives.
What I suggest to do, is to use a module global variable for the filename template. I'll prepare a PR.
I've just pushed the implementation. The solution is to add
import beangulp
beangulp.archive.FILENAME = '{date:%Y-%m-%d} {name}'
or any other format you like, to your import script.
I prefer to use a space between the date and original filename.