Git Product home page Git Product logo

toggl's Introduction

Build Status

# Toggl API Raw Data Export

The problem:

  • The free tier toggl reports look as follows:

  • This is fine and dandy, but the task level items don't get exported when you click on export -> csv. Instead, they're grouped by and contain none of the detail:

  • We need a way to get the task-level information! Fo' free!

The solution:

  • It looks like the toggl API has a small loophole in the /time_entries endpoint which allows you to get task-level info from an API response.
  • This script calls this API, using your API token (see the bottom of the page), returning all the task information (and more!) between two user-specified dates.
  • The file type returned is a simple .csv, which can be easily uploaded into excel, python, or other utility. Here's an example of the chart you can make with the output which fits a common use case of 'total time between two dates, grouped by tag' - something you can't do without paying for a subscription via the UI:

Dependencies:

  • python3 (tested on 3.6.6)
  • pandas
  • requests
  • json

How to use:

  • Clone this repository to your machine
  • Enter directory
  • Format of command is:

python get_tasks.py <api_key> <start_date> <end_date>

  • Here's an example with a fake API key.

python get_tasks.py 894e66455860a4ea3fde5dd0cf35f566 2018-08-29T15:42:46+02:00 2018-09-24T15:42:46+02:00

  • Note that the timezone is the +02:00 you see in the above example.
  • Also note that a maximum of 1,000 entries can be returned per the toggl API docs.
  • The script will prompt you for a location to place the output file. If you hit enter, it will place it in ./out.csv.

toggl's People

Contributors

ggodreau avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  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.