Currently, there’s only one way of adding tags to filenames: in brackets and tags separated by spaces.
Example:
filename_[tag1 tag2 tag3].jpg
I see that in the settings, under “Advanced”, we already have a setting for the tag container prefix (the character that separates the tag brackets with the rest of the filename).
I wish we could also specify the other delimiters. For example, I would be happy to set all delimiters as underscores. So that the newly tagged filename could look like:
filename_tag1_tag2_tag3.jpg
I’m also very open to modifying my own installation of Tagspaces, so if you could point me in the direction of which files I need to modify to make this happen at least, I would endlessly appreciate it.
Thanks for making and maintaining such a cool program!
Update:
I managed to do this, however with a small flaw, in my own build.
Made the following changes:
- In the file,
src/renderer/reducers/settings-default.ts
Changed this line:
tagDelimiter: ’ ',
Into this:
tagDelimiter: ’-',
- Then, in:
src/renderer/AppConfig.ts
Just BEFORE the final line:
export default AppConfig;
I added the following:
AppConfig.beginTagContainer = ‘
';
AppConfig.endTagContainer = '
’;
So the final few lines of the file looks like this:
AppConfig.showTSVersion =typeof window !== ‘undefined’ && window.ExtShowTSVersion !== undefined? window.ExtShowTSVersion: true;
AppConfig.beginTagContainer = ‘';
AppConfig.endTagContainer = '’;
export default AppConfig;
And then compiled.
The result?
-
The brackets have been replaced by underscores, check.
-
Tags are NOT separated by dashes, but by underscores yet again. Not sure why yet.
-
And there are repeating underscores. So for example, when you add two tags, in between them they have two underscores
- Finally, after the last tag there’s no check to remove the final underscore. So filenames can end with underscores, which is a bit unsightly.
Example filename after renaming:
testfile_tag1__tag2__tag3_.jpg
Will work on it some more later. If anyone’s got ideas, happy to hear them!