You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation.md
+53-92Lines changed: 53 additions & 92 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,20 +20,21 @@
20
20
*[support further development 🍺](#support-further-development)
21
21
*[license](#license)
22
22
23
-
## requirements
24
23
25
-
*[node.js](https://nodejs.org/en/download) version >= 22
26
-
*[npm](https://github.com/npm/npm) or [yarn](https://yarnpkg.com/en/docs/install)
24
+
## features
27
25
28
-
## installation
26
+
* command line
27
+
* create reports in various formats from time tracking data stored on GitLab
28
+
* monitor the time you spent on an issue or merge request locally and syncs the data to GitLab
29
29
30
-
Install the gtt command line interface using yarn:
31
30
32
-
```shell
33
-
yarn global add gitlab-time-tracker --prefix /usr/local
34
-
```
31
+
## requirements
35
32
36
-
... or download a compiled binary from [here](https://github.com/kriskbx/gitlab-time-tracker/releases) and put it into your `PATH`.
33
+
* GitLab instance
34
+
35
+
## installation
36
+
37
+
Download a compiled binary from [here](https://github.com/ndu2/gitlab-time-tracker/releases) and put it into your `PATH`.
37
38
38
39
Run the config command to create a config file and open it in your default editor.
39
40
In linux terminal, you must set your preferred editor in the environment. For example, use `export EDITOR=vim` to edit the files with vim (put this in `.bashrc` or similar to have it always configured).
@@ -55,56 +56,57 @@ token: 01234567891011
55
56
56
57
**Updating from version <= 1.5? Please [click here](https://github.com/kriskbx/gitlab-time-tracker/blob/master/upgrade.md)!**
57
58
58
-
Update gtt via yarn:
59
+
60
+
## build tools
61
+
62
+
You will need node and npm to build the project
63
+
64
+
* [node.js](https://nodejs.org/en/download) version >= 22
65
+
* [npm](https://github.com/npm/npm)
66
+
67
+
68
+
Download the source code, and compile everything with
59
69
60
70
```shell
61
-
yarn global upgrade gitlab-time-tracker
71
+
npm install
72
+
npm run-script buildAll
62
73
```
63
74
64
75
## docker
65
76
66
-
You don't need to have node and gtt installed on your system in order to use gtt,
67
-
you can use the official [Docker image](https://hub.docker.com/r/kriskbx/gitlab-time-tracker) as well:
77
+
Build scripts including Dockerfile running the CommonJS build are provided. `npm run-script buildAll` will create a docker image (gitlab-time-tracker:latest).
`--rm` removes the container after running, `-it` makes it interactive, `-v ~/.local/share/.gtt/:/home/gtt/.local/share/.gtt ` mounts your gtt configuration directory in the gtt user home directory inside the container. For example, to run a report for a particular user with a date range:
I highly recommend creating an alias and adding it to your `bashrc`:
99
101
100
102
```shell
101
-
echo"alias gtt='docker run --rm -it -v -v ~/.local/share/.gtt/:/home/gtt/.local/share/.gtt kriskbx/gitlab-time-tracker'">>~/.bashrc
103
+
echo"alias gtt='docker run --rm -it -v -v ~/.local/share/.gtt/:/home/gtt/.local/share/.gtt gitlab-time-tracker:latest'">>~/.bashrc
102
104
```
103
105
104
106
Now you can simply write `gtt` instead of the bulky Docker command before. Try it out: `gtt --help`
105
107
106
108
**Note:** If you want to save reports via the `--file` parameter, make sure to save them in `/root` or another
107
-
mounted directory that you have access to on your host machine. Take a look at the [Docker documentation](https://docs.docker.com/engine/tutorials/dockervolumes/) about how Dopcker handles data and volumes.
109
+
mounted directory that you have access to on your host machine. Take a look at the [Docker documentation](https://docs.docker.com/engine/tutorials/dockervolumes/) about how Docker handles data and volumes.
108
110
109
111
## commands
110
112
@@ -196,7 +198,7 @@ gtt edit 2XZkV5LNM
196
198
gtt edit
197
199
```
198
200
199
-
You can omit the id to edit the last added time record.
201
+
You can omit the id to edit to bring up a list of the latest records to choose from.
200
202
201
203
**Delete a local time record by the given id:**
202
204
@@ -207,6 +209,17 @@ gtt delete
207
209
208
210
You can omit the id to delete the last added time record.
209
211
212
+
213
+
**Resume previous activity:**
214
+
215
+
```shell
216
+
gtt resume
217
+
gtt resume --ask
218
+
```
219
+
220
+
Resume the last activity (--ask let you choose the activity to resume)
221
+
222
+
210
223
**Sync local time records with time tracking data on Gitlab:**
Starting with 1.7.4 gtt can dump the results of all API requests within a report and use it on another machine without access to the GitLab instance itself. This is very useful for debugging purposes. If you stumble upon a bug which could be unique to your set of data, please rerun the report with these options to save a dump to the given file: `--output=dump --file=/path/dump.json`Check your dump for sensitive information and provide it when asked.
@@ -857,22 +817,23 @@ is the total amount of time spent in the given time frame.
857
817
858
818
## contributing
859
819
860
-
I would love to integrate unit testing in this project, but unfortunately my knowledge of
861
-
testing in the JavaScript/Node.js world is very limited. (I'm actually a PHP dev)
862
-
So this would be a very helpful thing to contribute but of course all contributions are very welcome.
820
+
If you would like to contribute and provide bug fixes:
863
821
864
822
* Please work in your own branch, e.g. `integrate-awesome-feature`, `fix-awful-bug`, `improve-this-crappy-docs`
865
-
* Create a pull request to the `dev` branch
823
+
* Create a pull request to the `main` branch
824
+
866
825
867
826
## support further development
868
827
869
-
gtt is an open source project, developed and maintained completely in my free time.
828
+
gtt is an open source project.
870
829
871
830
If you enjoy using gtt you can support the project by [contributing](#contributing) to the code base,
872
-
sharing it to your colleagues and co-workers or monetarily by [donating via PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DN9YVDKFGC6V6).
831
+
sharing it to your colleagues and co-workers or monetarily by [donating via PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DN9YVDKFGC6V6) to the original author.
873
832
Every type of support is helpful and thank you very much if you consider supporting the project
874
833
or already have done so. 💜
875
834
835
+
Commercial support is available via my employer (see my github profile).
0 commit comments