Idea: convert/import from TagSpaces
https://www.tagspaces.org/ uses the filename to store the tag. "file_name [a_tag, another_tag].txt". It would be great to have a way to convert existing TagSpaces tagged files to Tagsistant directories.
Tagsistant has a pluggable architecture for autotagging. A regular expression plugin is already available as src/plugins/tp_filename_rx.c. It contains an extensive documentation as a comment. Otherwise, writing a custom, dedicated plugin (let's call it tp_tagspaces.c) should not be difficult at all. Let me know if some of the previous would fit.
Here is a quick & dirty config to add to the repository.ini to auto-tag TagSpaces files with up to 9 tags
[filename_rx]
split=no
filter=.*\[([^\s\[\]]+)\](\.[^.]+)?$ => S:$1; .*\[([^\s\[\]]+)\s+([^\s\[\]]+)\](\.[^.]+)?$ => S:$1, S:$2; .*\[([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\](\.[^.]+)?$ => S:$1, S:$2, S:$3; .*\[([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\](\.[^.]+)?$ => S:$1, S:$2, S:$3, S:$4; .*\[([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\](\.[^.]+)?$ => S:$1, S:$2, S:$3, S:$4, S:$5; .*\[([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\](\.[^.]+)?$ => S:$1, S:$2, S:$3, S:$4, S:$5, S:$6; .*\[([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\](\.[^.]+)?$ => S:$1, S:$2, S:$3, S:$4, S:$5, S:$6, S:$7; .*\[([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\](\.[^.]+)?$ => S:$1, S:$2, S:$3, S:$4, S:$5, S:$6, S:$7, S:$8; .*\[([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\s+([^\s\[\]]+)\](\.[^.]+)?$ => S:$1, S:$2, S:$3, S:$4, S:$5, S:$6, S:$7, S:$8, S:$9; .*\[([^\s\[\]]+)(\s+([^\s\[\]]+)){9,}\](\.[^.]+)?$ => S:more_than_9_tagspaces_tags;
On one of my file collections I intend to keep using TagSpaces to manage tags and just use tagsistant to provide a read-only VFS view of them. For this I need to reinitialize tagsistant each time I want to update the view. Here is a script for this:
#! /bin/bash
set -eux
rm .tagsistant/archive .tagsistant/tags.sql -rf
tagsistant .tagsistant $tagsistant_mnt | grep -v 'no tables in statement !'
sleep 2s
# Note: relations break with relative symlinks
find $tagspaces_files -not -path '*/.*' -type f -print -exec ln -s "$(realpath {})" $tagsistant_mnt/store/ALL/@ \;
echo 'Done!'
The reason I want to do this is that there are a few bugs that prevent me from using tagsistant alone to manage tags, in particular removing a file from a tag often doesn't work. @StrumentiResistenti if you ever find time work on tagsistant again, I would be happy to report specific bugs. In the meantime, thank you for making this.