fava icon indicating copy to clipboard operation
fava copied to clipboard

Configurable New Filename Format

Open gary-roach opened this issue 1 year ago • 1 comments

When filing documents with Fava, the date is prepended to the filename. This is similar to the functionality of beancounts bean-file tool, but the format is not the same.

When using bean-file the file is renamed like this: Original File Name: My File.csv New File Name: YYYY-MM-DD.My_File_Name.csv

Fava renames files like this: Original File Name: My File.csv New File Name: YYYY-MM-DD My File Name.csv

I personally prefer the beancount way as I don't like spaces in my filenames. I know Fava lets me rename them manually, but would you be open to the default file rename pattern being configurable? As far as I can tell, it would require changes to frontend/src/reports/import/index.ts and frontend/src/document-upload.ts.

gary-roach avatar Dec 01 '24 01:12 gary-roach

Fava does not change the filename the importer returns and it only prepends a date if there is no date yet. So if you want your file to be renamed to YYYY-MM-DD.My_File_Name.csv, you should be able to simply return that filename in your importer. So AFAICT it does not need to be configurable in Fava but you can already configure that in your importer.

yagebu avatar May 23 '25 09:05 yagebu