Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,39 @@ Hours to do: 176.00h (22.00 days)
Hours worked: 186.65h (23.33 days)
Difference: 10.65h (1.33 days)
```

# HowTo for Win10, WSLv2, AlpineWSL, Python3.9.5
```
apk update
apk upgrade
apk add python3 git
cat .togglore > ~/.togglore
cd
git clone https://github.com/ynop/togglore.git
cd togglore/
python3 run.py
time python3 run.py since 2021.11.01
```
E-mail notification
```
apk add msmtp mailx
cat /mnt/d/WSL/Alpine/msmtprc > /etc/msmtprc
ln -sf /usr/bin/msmtp /usr/sbin/sendmail
cd ~/togglore/
python3 run.py since 2021.10.1 | mail -s "Toggl" e-mail_user@Your_domain.tld
```

## or Thanks to christiandt we can use Python2
```
apk update
apk upgrade
apk add python2 git
python -m ensurepip --upgrade
mkdir ~/Dropbox
cat .togglore > ~/Dropbox/toggl.txt
cd
git clone https://github.com/christiandt/togglore.git
cd togglore/
pip install -r requirements.txt
time python run.py since 2021.11.01
```
2 changes: 1 addition & 1 deletion togglore/toggl.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def time_entries(self, date_range):
while current_page * per_page < total:
current_page += 1
response = self.request(
'https://toggl.com/reports/api/v2/details?workspace_id={}&since={}&until={}&user_agent=togglore&page={}'.format(
'https://api.track.toggl.com/reports/api/v2/details?workspace_id={}&since={}&until={}&user_agent=togglore&page={}'.format(
self.workspace, date_range.start.isoformat(), date_range.end.isoformat(), current_page))
total = response['total_count']
per_page = response['per_page']
Expand Down