Skip to content
Gerald Jansen edited this page Sep 12, 2019 · 19 revisions

Merging two hamster.db files

See https://github.com/projecthamster/hamster/issues/340#issuecomment-324387786

You may also like to try htool from https://github.com/GeraldJansen/hamster-tool/.

Creating a dummy hamster.db for demo/testing

Original request here. Taking advantage of the fact that the hamster DB can be swapped "live", you can easily create one as follows:

# make a backup copy of your current DB and replace it with the empty
cp ~/.local/share/hamster-applet/hamster.db ~/bu-hamster.db

# download empty temple hamster.db and replace your live DB
wget https://github.com/projecthamster/hamster/tree/master/data/hamster.db
mv hamster.db ~/.local/share/hamster-applet/hamster.db

# add activities, test, etc.

# save the dummy DB and restore your backup copy
cp ~/.local/share/hamster-applet/hamster.db ~/dummy-hamster.db
cp ~/bu-hamster.db ~/.local/share/hamster-applet/hamster.db

Of course, to do more testing/demonstration, you'd need to put the dummy-hamster.db back as ~/.local/share/hamster-applet/hamster.db, which is a real bother. You could automate this with scripts,  softlinks etc.. However, it would probably be best to have a separate environment for testing/demo, say a dedicated userid or a separate virtual environment. 

Getting/setting preferences from the command line

$ gconftool-2 -a /apps/hamster-time-tracker
 stop_on_shutdown = false
 day_start_minutes = 240
 ...
$ gconftool-2 --set /apps/hamster-time-tracker/day_start_minutes --type=int 240 # 04:00
Clone this wiki locally