Metadata-Version: 2.1
Name: timedctl
Version: 5.5.0
Summary: CLI for timed
License: AGPL-3.0-only
Author: Arthur Deierlein
Author-email: arthur.deierlein@adfinis.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: click (>=8.1.3,<9.0.0)
Requires-Dist: click-aliases (>=1.0.1,<2.0.0)
Requires-Dist: libtimed (>=0.4.4,<0.6.0)
Requires-Dist: pyfzf (>=0.3.1,<0.4.0)
Requires-Dist: rich (>=13.4.2,<14.0.0)
Requires-Dist: terminaltables (>=3.1.10,<4.0.0)
Requires-Dist: tomlkit (>=0.11.8,<0.13.0)
Description-Content-Type: text/markdown

# timedctl
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)


Click TUI for [Timed](https://github.com/adfinis/timed-frontend) using [libtimed](https://github.com/adfinis/libtimed).

## Installing
There are currently only packages for arch linux available in the [AUR](https://aur.archlinux.org/packages/timedctl/).
```bash
$ yay -S timedctl
```
People on other distributions can use pip to install the package from pypi:
```bash
$ pip install timedctl
```

### Shell completion
`timedctl` support shell completion for the unaliased commands:

**bash**
```bash
_TIMEDCTL_COMPLETE=bash_source timedctl >> ~/.bashrc
```

**zsh**
```bash
_TIMEDCTL_COMPLETE=zsh_source timedctl >> ~/.zshrc
```

**fish**
```bash
_TIMEDCTL_COMPLETE=fish_source timedctl >  ~/.config/fish/completions/timedctl.fish
```

## Local development
Clone the repository and install the dependencies with `poetry install`. You can now run the project with `poetry run timedctl`. For building wheels, you can use `poetry build`.
Run tests with `poetry run pytest --cov --cov-fail-under 100`.

## Known issues
* Make sure to have a polkit-agent running, otherwise the poetry installation during the installation on arch might fail.
* You need a keyring installed in order for timedctl to store the SSO token, for example `gnome-keyring`.

## Feature roadmap
- [x] SSO auth
- [x] Overtime
- [x] Reports
    - [x] Get
    - [x] Add
    - [x] Delete
    - [x] Update
- [x] Activities
    - [x] Start
    - [x] Stop
    - [x] Delete
    - [x] Restart
- [ ] Absences
    - [ ] Get
    - [ ] Add
    - [ ] Delete
    - [ ] Update
- [ ] Holidays
    - [ ] Get
    - [ ] Add
    - [ ] Delete
    - [ ] Update

## Configuration
Your config file should already be created on the first launch under `$XDG_CONFIG_HOME/timedctl/config.toml`.
If this isn't the case you can see the default config options below:
```toml
username = "<your username>"
timed_url = "<timed url>"
sso_url = "<sso url>"
sso_realm = "<sso realm>"
sso_client_id = "<client id>"
```

## License
Code released under the [GNU Affero General Public License v3.0](LICENSE).

