blob: 3cfd3117703bd6c997fd5a00df58657065bf5612 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# Python 3 Self Hosted Active Collab 5 CLI application.
Python 3 only Cli app for working with the self hosted collab api. Very
unstable and prone to breaking.
https://developers.activecollab.com/api-documentation/v1/people/users/all.html
# Getting Started
Install requirements:
```
pip install -r requirements.txt
```
Create a config file:
```
cp example-config.json config.json
```
Edit config settings. Leave password empty if you want to be asked for it every
time you launch the cli. I'm not sure what client_name is for but it needs to
be set to authenticate against the api. The client_vendor is probably the name
of your company. Url is the full url of your active collab instance plus the
endpoint of the api e.g `https://activecollab.example.com/api/v1`.
Run the cli
```
chmod +x cli.py
./cli.py
```
# Features
- Tab complete on almost every single field.
- Fuzzy completion on almost every field.
## Create a time Record
- Value can accept standard '0:30' or '0.5' but also accepts an int of minutes.
E.g '15' or '120'
- Summary can user Ctrl+x Ctrl+e to launch $EDITOR for editing the message
## List daily records
- Compute the daily total as well as billable/non billable hours
## List weekly records
- Compute the weekly total as well as billable/non billable hours
# Using pyactivecollab.py for connecting to api
Sample Script:
```
from pyactivecollab import Config, ActiveCollab
import getpass
# Load config, ensure password
config = Config()
config.load()
if not config.password:
config.password = getpass.getpass()
ac = ActiveCollab(config)
ac.authenticate()
print(ac.get_info())
```
|