Giter Club home page Giter Club logo

pyclocker's Introduction

pyClocker

A Cli app that keeps track of time spent on hobbies. This app can track time for multiple hobbies over a period of time. I wanted to measure how much time I actually spend on programming daily.

Database Model:

The application's database model consists of a single entity called "worksessions" with the following attributes:

  • id: Primary key
  • date: Date when a work session started
  • activity: Name of the activity being tracked
  • start_time: Timestamp when a work session started
  • stop_time: Timestamp when the current work session stopped

Commands

pyClocker offers the following commands.

  • start: This creates a new record in a database with date as current date and start_time as current timestamp. If there already exists an on going worksession(a record with date as current date and stop_time as null), the app notifies the user to end the current worksession first. Optionally, one can specify the name of the activity with the flag --activity <activity name> default activity is programming.

  • stop: Ends the current work session by updating the stop_time to the current timestamp. This updates the stop_time of the record in a database that has date as current date, start_time as the timestamp with the latest value and stop_time as null, with the current timestamp. If such a record does not exist in the database, the app notifies the user to start a new worksession first.

  • today: Displays the total hours spent on each activity for the current day in a tabular format.

  • daily: Generates a graph showing the hours invested in various hobbies each day. daily activity report

To run

  1. To install the CLI, after activating a virtual environment run pip install .

  2. run pyClocker init to set the sqlite database file location.

  3. Optionally, generate fake data for visualization purposes by navigating to the fakedatagen directory and running python3 datagen.py.

  4. Move the generated SQLite database file (worksessions.db) to the location set in step 2.

  5. Run pyClocker daily to visualize the time spent on various activities each day.

TODO

  • Add the ability to track time for multiple activities.
  • Create a plot to visualize time spent in each activity each day over time.

Credits

pyClocker relies on the following amazing projects

pyclocker's People

Contributors

brianpzaide avatar

Watchers

 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.