Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into pr/483
Browse files Browse the repository at this point in the history
  • Loading branch information
ederag committed Jan 28, 2020
2 parents 7cc58ae + 339a8e1 commit 9a0f0ba
Show file tree
Hide file tree
Showing 51 changed files with 2,886 additions and 2,529 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ intltool-merge.in
intltool-update.in
libtool
ltmain.sh
messages
missing
mkinstalldirs
py-compile
Expand Down
133 changes: 96 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,58 @@
Hamster is time tracking for individuals. It helps you to keep track of how
much time you have spent during the day on activities you choose to track.

This is the main repo. It is standalone (single module).
All other repositories -`hamster-lib/dbus/cli/gtk`- are part of the separate rewrite effort.
More context is given in the history section below.

Some additional information is available in the
[wiki](https://github.com/projecthamster/hamster/wiki)
and a static copy of the user documentation is online
[here](https://geraldjansen.github.io/hamster-doc/).

During the period 2015-2017 there was a major effort to
[rewrite hamster](https://github.com/projecthamster/hamster-gtk)
(repositories: `hamster-lib/dbus/cli/gtk`).
Unfortunately, after considerable initial progress the work has remained in alpha state
for some time now. Hopefully the effort will be renewed in the future.

In the meantime, this sub-project aims to revive development of the "legacy" Hamster
code base, maintaining database compatibility with the widely installed
[v1.04](https://github.com/projecthamster/hamster/releases/tag/hamster-time-tracker-1.04),
but migrating to `Gtk3` and `python3`. This will allow package maintainers to provide
new packages for recent releases of mainstream Linux distributions for which the old
1.04-based versions are no longer provided.
## Installation

With respect to 1.04, some of the GUI ease of use has been lost, especially for handling
tags, and the stats display is minimal now. So if you are happy with your hamster
application and it is still available for your distribution, upgrade is not recommended
yet.
### Backup database

In the meantime recent (v2.2+) releases have good backward data compatibility and are
reasonably usable. The aim is to provide a new stable v3.0 release in the coming
months (i.e. late 2019).
This legacy hamster should be stable, and keep database compatibility with previous versions.
It should be possible to try a new version and smoothly roll back to the previous version if preferred.
Nevertheless, things can always go wrong. It is strongly advised to backup the database before any version change !

##### Locate the latest db

```bash
ls --reverse -clt ~/.local/share/hamster*/*.db
```
Backup the last file in the list.

## Installation

You can use the usually stable `master` or [download stable releases](https://github.com/projecthamster/hamster/releases).
### Kill hamster daemons

If you upgraded from an existing installation make sure to kill the running
daemons:
When trying a different version, make sure to kill the running daemons:

```bash
# either step-by-step, totally safe
pkill -f hamster-service
pkill -f hamster-windows-service
# check (should be empty)
pgrep -af hamster

# or be bold and kill them all at once:
pkill -ef hamster
```

### Install from packages

##### OpenSUSE
https://software.opensuse.org/package/hamster-time-tracker

##### Snap
Easy installation on any distribution supporting snap:
https://snapcraft.io/hamster-snap

### Install from sources

#### Dependencies


Expand All @@ -53,7 +63,7 @@ pgrep -af hamster
###### Ubuntu (tested in 19.04 and 18.04)

```bash
sudo apt install gettext intltool gconf2 gir1.2-gconf-2.0 python3-gi-cairo python3-distutils python3-dbus python3-xdg
sudo apt install gettext intltool python3-gi-cairo python3-distutils python3-dbus python3-xdg
# and for documentation
sudo apt install gnome-doc-utils yelp
```
Expand All @@ -70,29 +80,34 @@ sudo zypper install gnome-doc-utils xml2po yelp

*RPM-based instructions below should be updated for python3 (issue [#369](https://github.com/projecthamster/hamster/issues/369)).*

`yum install gettext intltool gnome-python2-gconf dbus-python`
`yum install gettext intltool dbus-python`

##### Help reader
If the hamster help pages are not accessible ("unable to open `help:hamster-time-tracker`"),
then a [Mallard](https://en.wikipedia.org/wiki/Mallard_(documentation))-capable help reader is required,
such as [yelp](https://wiki.gnome.org/Apps/Yelp/).

#### Download source

##### Git clone

If familiar with github, just clone the repo and `cd` into it.

#### Trying the development version
##### Download

To use the development version (backup `hamster.db` first !):
Otherwise, to get the `master` development branch (intended to be quite stable):
```bash
wget https://github.com/projecthamster/hamster/archive/master.zip
cd hamster
```
# either
pgrep -af hamster
# and kill them one by one
# or be bold and kill all process with "hamster" in their command line
pkill -ef hamster
src/hamster-service &
src/hamster-windows-service &
src/hamster-cli
or a specific [release](https://github.com/projecthamster/hamster/releases):
```bash
# replace 2.2.2 by the release version
wget https://github.com/projecthamster/hamster/archive/v2.2.2.zip
cd hamster-2.2.2
```


#### Building and installing
#### Build and install

```bash
./waf configure build
Expand All @@ -113,11 +128,29 @@ sudo ./waf uninstall
```


#### Development

During development (As explained above, backup `hamster.db` first !),
if only python files are changed
(*deeper changes such as the migration to gsettings require a new install*)
the changes can be quickly tested by
```
# either
pgrep -af hamster
# and kill them one by one
# or be bold and kill all processes with "hamster" in their command line
pkill -ef hamster
python3 src/hamster-service.py &
python3 src/hamster-cli.py
```
Advantage: running uninstalled is detected, and windows are *not* called via
D-Bus, so that all the traces are visible.

#### Migrating from hamster-applet

Previously Hamster was installed everywhere under `hamster-applet`. As
the applet is long gone, the paths and file names have changed to
`hamster-time-tracker`. To clean up previous installs follow these steps:
`hamster`. To clean up previous installs follow these steps:

```bash
git checkout d140d45f105d4ca07d4e33bcec1fae30143959fe
Expand All @@ -134,3 +167,29 @@ sudo ./waf uninstall
5. That's it!

See [How to contribute](https://github.com/projecthamster/hamster/wiki/How-to-contribute) for more information.


## History

During the period 2015-2017 there was a major effort to
[rewrite hamster](https://github.com/projecthamster/hamster-gtk)
(repositories: `hamster-lib/dbus/cli/gtk`).
Unfortunately, after considerable initial progress the work has remained in alpha state
for some time now. Hopefully the effort will be renewed in the future.

In the meantime, this sub-project aims to pursue development of the "legacy" Hamster
code base, maintaining database compatibility with the widely installed
[v1.04](https://github.com/projecthamster/hamster/releases/tag/hamster-time-tracker-1.04),
but migrating to `Gtk3` and `python3`.
This will allow package maintainers to provide
new packages for recent releases of mainstream Linux distributions for which the old
1.04-based versions are no longer provided.

With respect to 1.04, some of the GUI ease of use has been lost, especially for handling
tags, and the stats display is minimal now. So if you are happy with your hamster
application and it is still available for your distribution, upgrade is not recommended
yet.

In the meantime recent (v2.2+) releases have good backward data compatibility and are
reasonably usable. The aim is to provide a new stable v3.0 release in the coming
months (i.e. early 2020).
1 change: 1 addition & 0 deletions data/edit_activity.ui
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="primary_icon_name">edit-clear-all-symbolic</property>
<property name="placeholder_text" translatable="yes">Unsorted</property>
<property name="completion">activity completion</property>
</object>
<packing>
Expand Down
4 changes: 2 additions & 2 deletions data/hamster.desktop.in.in → data/hamster.desktop.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Version=1.0
Type=Application
Terminal=false
_Name=Hamster Time Tracker
_Comment=Your personal time keeping tool
Name=Hamster
Comment=Your personal time keeping tool
Icon=hamster
Exec=@BINDIR@/hamster
Categories=GNOME;GTK;Utility;
3 changes: 2 additions & 1 deletion data/hamster.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<id>hamster</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0+ and CC-BY-SA-3.0</project_license>
<name>Hamster Time Tracker</name>
<name>Hamster</name>
<summary>Your personal time keeping tool</summary>

<description>
Expand Down Expand Up @@ -39,6 +39,7 @@
<image>https://github.com/projecthamster/hamster/blob/master/data/screenshots/overview2.png</image>
</screenshot>
</screenshots>
​<translation type="gettext">hamster</translation>
<url type="homepage">https://github.com/projecthamster/hamster/wiki</url>
<provides>
<binary>hamster</binary>
Expand Down
143 changes: 0 additions & 143 deletions data/hamster.schemas.in

This file was deleted.

Loading

0 comments on commit 9a0f0ba

Please sign in to comment.