Skip to content

Commit

Permalink
docs: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
josehbez committed Sep 28, 2024
1 parent 2438a8c commit 347386d
Show file tree
Hide file tree
Showing 7 changed files with 198 additions and 265 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,4 @@ Pipfile
bin
lib64
pyvenv.cfg
x-files
79 changes: 28 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,40 @@
</p>

<p align="center">
<a href="https://github.com/gnome-pomodoro/gnome-pomodoro-tracking/actions?query=workflow%3APytest">
<!--a href="https://github.com/gnome-pomodoro/gnome-pomodoro-tracking/actions?query=workflow%3APytest">
<img src="https://github.com/gnome-pomodoro/gnome-pomodoro-tracking/workflows/Pytest/badge.svg">
</a>
</a-->
<a href="LICENSE">
<img src="https://img.shields.io/github/license/gnome-pomodoro/gnome-pomodoro-tracking?style=flat-square" />
</a>
<a href=".pm/version.yml">
<img src="https://img.shields.io/badge/dynamic/yaml?color=green&label=version&query=version.*&url=https://raw.githubusercontent.com/gnome-pomodoro/gnome-pomodoro-tracking/master/.pm/version.yml">
<a>
<img alt="PyPI - Version" src="https://img.shields.io/pypi/v/gnome-pomodoro-tracking">

</a>
</p>

# GNOME Pomodoro Tracking
Lets you track your time with the popular time tracking services.
# Welcome to Gnome Pomodoro Tracking!
Our plugin integrates with Toggl, Clockify, and Odoo to provide accurate time logging for your tasks and projects.

## Contents

* Getting Started
* [Install](#getting-started)
* [GNOME Pomodoro Settings](#gnome-pomodoro-settings)
* [Command Line](#command-line)
* Guides
* [Introducing](docs/introducing.md)
* [Toggl](docs/toggl.md)
* [Clockify](docs/clockify.md)
* [Odoo](docs/odoo.md)
* Contributing
* [Testing](testing.md)

----
## Getting Started

### Requirements
* python3
* [gnomepomodoro.org](https://gnomepomodoro.org)
### 1. Install
To get started, simply install the plugin using pip:

### Install
```bash
pip install -U git+https://github.com/gnome-pomodoro/gnome-pomodoro-tracking.git
```
or
```bash
pip3 install -U gnome-pomodoro-tracking
```
### Uninstall
```bash
pip3 uninstall -y gnome-pomodoro-tracking
```



### GNOME Pomodoro Settings
### 2. Set Up GNOME Pomodoro:

`Preferences / Plugins ... / Custom Actions(Execute shell scripts) / Add `

* Open Gnome Pomodoro Prefences.
* Navigate to "Plugins" > "Custom Actions (Execute shell scripts)".
* Click "Add" and paste the following command:

```bash
gnome-pomodoro-tracking -gps "$(state)" -gpt "$(triggers)" -gpd "$(duration)" -gpe "$(elapsed)"
Expand All @@ -62,26 +46,19 @@ gnome-pomodoro-tracking -gps "$(state)" -gpt "$(triggers)" -gpd "$(duration)" -g
<img src="docs/img/gnome-pomodoro-settings.gif" width="400"/>
</p>

### Command Line
### 3. Choose Your Time Tracking Service

```bash
usage: gnome-pomodoro-tracking [-h] [--plugin {odoo,clockify,toggl}] [-n NAME]
[-g TAG] [-r] [-k] [-s] [-w] [-p]
[--token TOGGL_TOKEN]
optional arguments:
-h, --help show this help message and exit
--plugin {odoo,clockify,toggl}
Time Tracking Service
-n NAME, --name NAME Pomodoro name
-g TAG, --tag TAG Pomodoro tag
-r, --restart Pomodoro restart
-k, --stop Pomodoro stop
-s, --status Pomodoro status
-e, --time-entry Create time entry
-m, --min-trace Time minimal elapsed to track
-d, --debug Enable debug
We support three popular services:
* **Toggl**: [Learn More](docs/toggl.md)
* **Clockify**: [Learn More](docs/clockify.md)
* **Odoo**: [Learn More](docs/odoo.md)



### 4. Command line

For advanced CLI usage and customization, please refer to the guide: [introducing.md](introducing.md)

```



56 changes: 37 additions & 19 deletions docs/clockify.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,47 @@
# Clockify
# Clockify Integration


* Generate API Token at https://clockify.me/user/settings
### Enable plugin

Copy and paste this command in terminal
```bash
gnome-pomodoro-tracking --plugin clockify
```

### Generate Your API Token:
* Head to your Clockify profile: https://clockify.me/user/settings
* In the "API" section, click "Generate New API Token."

![](img/clockify-token.png)

* Add token
Copy this command and replace `TOKEN` with your API token
```bash
gnome-pomodoro-tracking --token TOKEN
```

```bash
gnome-pomodoro-tracking --token TOKEN
```
### Start tracking

* Workspaces
Before you start tracking, you need to set up a workspace and project. It is usually set up once. If don't set up, it will use the first workspace and project.

Workspaces, you can list and set using this command this command.

```bash
# List
gnome-pomodoro-tracking --workspaces
# set
gnome-pomodoro-tracking --workspaces --set ID
```
* Projects
List
```bash
gnome-pomodoro-tracking --workspaces
```
Set
```bash
gnome-pomodoro-tracking --workspaces --set ID
```

```bash
# List
Projects, you can list and set using this command this command.
List
```bash
gnome-pomodoro-tracking --projects
# Set
```
Set
```bash
gnome-pomodoro-tracking --projects --set ID
```
```

For advanced CLI usage and customization, please refer to the guide: [introducing.md](introducing.md)
53 changes: 36 additions & 17 deletions docs/introducing.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,47 @@

# Introducing
# Introducing Gnome Pomodoro Tracking CLI

### Set/Switching between time tracking services
## Command Line
Use the command line to interact with the plugin:


```bash
usage: gnome-pomodoro-tracking [-h] [--plugin {odoo,clockify,toggl}] [-n NAME]
[-g TAG] [-r] [-k] [-s] [-w] [-p]
[--token TOGGL_TOKEN]
optional arguments:
-h, --help show this help message and exit
--plugin {odoo,clockify,toggl}
Time Tracking Service
-n NAME, --name NAME Pomodoro name
-g TAG, --tag TAG Pomodoro tag
-r, --restart Pomodoro restart
-k, --stop Pomodoro stop
-s, --status Pomodoro status
-e, --time-entry Create time entry
-m, --min-trace Time minimal elapsed to track
-d, --debug Enable debug

```
gnome-pomodoro-tracking --plugin toggl
```

```
gnome-pomodoro-tracking --plugin clockify
```

### Try credentials
Review the plugin documentation to configure the token.
If you don't have the plugin configured, here you can see how to configure it:
* [Toggl](toggl.md)
* [Clockify](clockify.md)
* [Odoo](odoo.md)

Finally run this command to create a time entry.

## Usage

### --time-entry

Allow create manually time entry, the time is in minutes.
```
gnome-pomodoro-tracking --time-entry 25
```

### Add name
### --name
A name for the time entry, if you don't set a name, the plugin will use the default 'Pomodoro'.
```
gnome-pomodoro-tracking --name "My Entry Name"
```
Expand All @@ -31,24 +50,24 @@ If you want that remove name, execute:
gnome-pomodoro-tracking -n " "
```

### Add tag
Admit one tag or many tags using `,` . e.g `tag1,tag2,tag3`
### --tag
Add tag to the time entry, if you want add many tags, use `,` . e.g `tag1,tag2,tag3`
```
gnome-pomodoro-tracking --tag "gnome-pomodoro"
```
If you want that remove tag, execute:
```
gnome-pomodoro-tracking -t " "
```
NOTE: Check the plugin documentation if it supports tags.
NOTE:
* Is only supported by Toggl

### Minimal tracking
### --min-trace
Allows you to set the minimum time (minutes) elapsed to be saved in the time tracking service.

```
gnome-pomodoro-tracking --min-trace 2 # 2 minutes elapsed
```
If you want that remove minimal tracking, execute:
if you want that remove minimal tracking, execute:
```
gnome-pomodoro-tracking --min-trace 0
```
87 changes: 58 additions & 29 deletions docs/odoo.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,69 @@
# Odoo
# Odoo Timesheet Integration

## Modules requied
* project
* sale_timesheet

## Test
* ✅ Odoo 16.0 - Community & Enterprise
* ✅ Odoo 13.0 - Community
* ✅ Odoo 13.0 - Enterprise
* ✅ Odoo 12.0 - Community
* ✅ Odoo 12.0 - Enterprise
* ❌ Odoo 11.0 - Community
* ❌ Odoo 11.0 - Enterprise
### Required modules

## CLI
Is importan installed `projects` and `sale_timesheet` modules in your instance odoo.

* Credentials
### Enable plugin

Copy and paste this command in terminal
```bash
gnome-pomodoro-tracking --plugin odoo
```


### Generate Your gRPC Token:

* Visit your odoo instance
* Go to My Profile > Account Security > API Keys > Generate New Token

Copy this command adn paste in terminal replacing PASS with your token

```bash
gnome-pomodoro-tracking --database DB --url URL --username USER --password PASS
```

* Projects

```bash
# List
gnome-pomodoro-tracking --projects
# Set
gnome-pomodoro-tracking --projects --set ID
```
### Start tracking

* Tasks
Before you start tracking, you need to set up a project. It is usually set up once. If don't set up, it will use the first workspace and project.

```bash
# List
gnome-pomodoro-tracking --tasks
# Set
gnome-pomodoro-tracking --tasks --set ID
```

Projects, you can list and set using this command this command.

List
```bash
gnome-pomodoro-tracking --projects
```

Set
```bash
gnome-pomodoro-tracking --projects --set ID
```

Tasks, if you want add time logging in a task, you can list and set using this command. Is optional

List
```bash
gnome-pomodoro-tracking --tasks
```
Set
```bash
gnome-pomodoro-tracking --tasks --set ID
```


For advanced CLI usage and customization, please refer to the guide: [introducing.md](introducing.md)



### Versions Odoo Supported

| Odoo Version | Community | Enterprise |
| - | - | - |
| 16.0 |||
| 15.0 |||
| 14.0 |||
| 13.0 |||
| 12.0 |||
| 11.0 |||
Loading

0 comments on commit 347386d

Please sign in to comment.