Git Product home page Git Product logo

toggl-journal's Introduction

toggl-journal

toggl-journal is a python script that can easily create human readable journals by automatically synthesizing Toggl Track time entries using a very simple notation.

The user can filter the report by project and by a time window (since date - until date). The report is being exported in .html and .pdf formats in order to be easily shareable (copy-paste) via an e-mail or slack or be attached / send as a file.

This is a proof of concept project tarted in order for me to get familiar with the Toggl API and, at the same time, automate my every-day professional (and personal) journalling process with the use of Toggl Track.

Features

  • Works in Windows and Linux operating systems.
  • Automatically creates reports from Toggl Time Entries based on project and time windows (since - until dates).
  • If the user puts 'ALL' instead of a project name, the script generates a report for all projects within the since - until timeframe.
  • If the user define the name of the project as PERSONAL_JOURNAL in input, then a special JOURNAL section is created to the report using the time entries of this project.
  • Generates report in .html format.
  • Generates report in .pdf format.
  • Handles pagination for time entries > 50, respecting the API limitations.
  • Handles UTF-8 special characters (i.e. Greek / Cyrillic alphabet).

NOTES:

  • For the time being it works only for a single workspace / the default workspace of the user.

Dependencies

In order for the script to run you need to install the following dependencies:

TogglPy

pip install -U TogglPy

more information here

PDFKit

pip install pdfkit

WkHtmlToPdf

Ubuntu setup:

sudo apt-get install wkhtmltopdf

Windows setup (and other information)

Run the script

python toggljournal.py <TOGGL_API_KEY> <START_DATE> <END_DATE> <PROJECT_NAME> <PERSONAL_JOURNAL*>
  • <TOGGL_API_KEY> (string): The unique user's API Key. You can find it by following this official guide.

  • <START_DATE> (string): The start date in YYYY-MM-DD format (i.e. 2022-02-22).

  • <END_DATE> (string): The end date in YYYY-MM-DD format (i.e. 2022-02-22). You can also use the keyword "TODAY" to get the current date.

  • <PROJECT_NAME> (string): The project name for which we want to create a report or "ALL" if we want a report for all available projects between the time period defined by START_ DATE and END_DATE.

  • <PERSONAL_JOURNAL*> (string): The name of the project you want to be used as a Personal Journal. IMPORTANT: You can ommit this parameter as it is not mandatory. In this case none of the projects will be treated as a Personal Journal.

Annotation in the Toggl Environment

It is really simple! Everytime we make a new Toggl Entry we are following the following annotation in our description:

<ACTION_TITLE> [N] - <NOTE #1> - <NOTE #2> - <NOTE #3> ...

for example:

Meeting w/ John [N] - Refactor library X - We need another awesome Senior Dev

screenshot

Logging

The script comes with a log (app.log) in which you will find notes during the runtime of the project.

  • [ INFO ] entries: Are notes recorded by the app (mainly for correct runtime verification).
  • [ WARNING ] entries: Are notes recorded by the app in case something goes wrong / or to clarify specific functionality of the script.

Future work

  • Select specific projects (comma separated) when calling the script
  • For projects with TEs that contain tags, provide a time / tag summary (table + chart)
  • Send the report directly by e-mail
  • Support .odt format
  • Support .doc format
  • Support .rtf format

Disclaimer

This open source software project is not related in any way with the official Toggl Track tool or the Toggl company.

License

MIT License

Copyright (c) 2022 Apostolos Kritikos <akritiko [at] gmail [dot] com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

toggl-journal's People

Contributors

akritiko avatar

Stargazers

 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.