A simple project to automate the creation of reports using the Toggl API.
Project description
TogglReports
TogglReports is a Python library for creating time entry reports from Toggl's detailed report data.
Installation
Use the package manager pip to install TogglReports.
pip install togglreports
Usage
TogglReports comes by default with only one type of report (sgu). To create a sgu report, run the following script:
togglReports build sgu
The first time you run the script, you will be prompted to configure your installation. Follow each step to configure the core application and each report type installed.
To reset and redo the configuration script, run the script:
togglReports config
Arguments
You can specify the start and end times used for a report with the tags -p (-period), -s (--start), and -e (--end).
The --period tag can be used to build reports with common start and end times. Possible values are:
today: entries for todaythisweek: entries from the last sunday to the next saturdaylastweek: entries from past week, from sunday to saturdaythismonth: entries from the first day to the last day of this month
The --start and --end tags can be used to define a specific time frame. Expects YYYY-MM-DD format, e.g. 2023-10-30.
The generated report will contain entries from the specified --start date, to the specified --end date.
The --end tag is optional. If not specified, today's date will be used.
Default: If no argument is specified, the report will contain only this week's time entries (Same behaviour as using -p thisweek).
Report: SGU - Expected Toggl Data Structure
- Time entry: The name and duration of the sgu task;
- Project: The sgu project;
- Tag: The sgu category (if multiple, only one is used);
While configuring the report, you can define a specific tag to indicate that a time entry should be ignored while creating a report.
FAQ
1. How to locate the Toggl API Token?
Your personal Toggl api token can be found following these instructions.
2. How to create other report types?
Included in this repository is an example report type containing the basic files structure and required configuration for a report type.
The src\togglreports\plugins\example.py file is where the report is built: where the data is manipulated from the information extracted from the Toggl API and where the output file is created.
The data\reports_example.json file is where you define the report required configuration parameters.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file togglreports-2.6.0.tar.gz.
File metadata
- Download URL: togglreports-2.6.0.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.15 tqdm/4.65.0 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
721dbc91fd66a5b6db14ecd3a899403fd5960bc064e29ccf4efa1b0182e7d36e
|
|
| MD5 |
53e78432711b67d451165aec595c51e5
|
|
| BLAKE2b-256 |
f8ea86ee3e89dac5e922a983bcb13d3f3a151f76d0fba7595782cf7198aa895b
|
File details
Details for the file togglreports-2.6.0-py3-none-any.whl.
File metadata
- Download URL: togglreports-2.6.0-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.15 tqdm/4.65.0 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30acef70922c4158404ae2f4b75af5cfbacbb2855949e5d0eef08913409b6268
|
|
| MD5 |
ba7f66c1849dcd908a6c927c1c45cfee
|
|
| BLAKE2b-256 |
cd9dab11bd4f20104de6d167aa376dae26bfefcd6957b261bd7a2c282b00d6fb
|