Is there a possibility to delete a tag in Hamster Time Tracking?
I went through all graphical menus but couldn't find any option.
The closest one is the following but it doesn't list my own tags:
Is there a possibility to delete a tag in Hamster Time Tracking?
I went through all graphical menus but couldn't find any option.
The closest one is the following but it doesn't list my own tags:
You can edit the database file of hamster in ~/.local/share/hamster-applet/hamster.db to delete tags.
We'll use sqlite3 program to do editing from command line.
Install it using this command
sudo apt-get install sqlite3
Then open the database file
sqlite3 ~/.local/share/hamster-applet/hamster.db
See all the tags defined (Optional)
select * from tags;
This may return something like this.
3|au|true
Here, The first column is ID, second one is name and third one controls whether or not this tag should be shown for autocompletion.
Now, To remove a tag named au (for example)
delete from tags where name = 'au';
This will delete the tag with au name. You can check using select * from tags;.
Now, save the database (otherwise the save will not persist)
.save ~/.local/share/hamster-applet/hamster.db
Quit the sqlite3 prompt using command
.quit;
Install any sqlite3 database editor. Such as sqliteman.
sudo apt-get install sqliteman
Open the database file in ~/.local/share/hamster-applet/hamster.db.
Navigate to Schema tab, main -> Tables. Double click tags to see it's data on the right-hand side panel.
Select the row for the tab you want to remove and click on Remove Row button above.
Then click on Commit Current Transaction to save the changes.
Exit Sqliteman.
Here is a simple screenshot indicating the buttons in SQLiteman
Thanks to SteveK's hint on Editing the database file.
I was wondering about the same, since I want to get rid of some the suggested tags.
To me it seems like that all the tags are stored in the database file: ~/.local/share/hamster-applet/hamster.db. I tried to edit this file by deleting tags, but without success. The problem is that there are a number of additional characters around the tag you might or might not have to delete but to me it is not clear where to start and stop deleting.
After editing the file hamster did not respond and the only solution to this is to restore the file. So better make a backup before trying yourself (cp ~/.local/share/hamster-applet/hamster.db ~/.local/share/hamster-applet/hamster.db.bak)