Giter Club home page Giter Club logo

togglreports's Introduction

TogglReports

Latest Release Python package License, MIT Python, 3.9+


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 today
  • thisweek: entries from the last sunday to the next saturday
  • lastweek: entries from past week, from sunday to saturday
  • thismonth: 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

MIT

togglreports's People

Contributors

ro-56 avatar rodrigo-mendonca-u avatar actions-user avatar grisotto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.