Coder Social home page Coder Social logo

otanadzetsotne / time_bug Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 11 KB

Time Bug offers Python scripts for efficient project time tracking. app.py logs work sessions and manages AFK periods, while time_calculator.py calculates total time spent on each project. Features include dynamic time calculation and AFK handling. Compatible with Python 3.6+.

License: MIT License

Python 100.00%
productivity time time-tracker time-tracker-app time-tracking time-tracking-app time-tracking-tools

time_bug's Introduction

Time Bug

This repository contains a set of Python scripts designed to help track work time on various projects efficiently. The app.py script logs the start and end times of work sessions, manages AFK periods effectively, and the time_calculator.py script calculates the total time spent on each project.

Features

  • Project Tracking: The app.py script logs work sessions for different projects, allowing for easy tracking of time spent on individual tasks.
  • AFK Handling: It detects and logs times when the user is away from the keyboard (AFK), ensuring these periods do not count towards the total work time.
  • Dynamic Time Calculation: The time_calculator.py script provides functionality to calculate and display the total work time for each project, with options to specify the time calculation starting point (--since parameter).

Requirements

  • Python 3.6 or higher
  • Compatible with any operating system that supports Python and basic file operations.

Setup

Ensure Python is installed on your system. If not, download and install it from python.org.

Usage

app.py

  1. Clone this repository or download app.py and any related files to your local machine.

  2. Open a terminal or command prompt.

  3. Navigate to the directory containing app.py.

  4. Run the script using the following command:

    python app.py
  5. Follow the on-screen prompts to enter project names and tasks. Use the command stop to end the current project session or change project to switch to another project.

time_calculator.py

  1. To run the time calculation independently, use the following command in the terminal where time_calculator.py is located:

    python time_calculator.py --since [day|midnight|YYYY-MM-DD HH:MM:SS]

    Replace [day|midnight|YYYY-MM-DD HH:MM:SS] with your desired starting point for time calculation. If omitted, the script calculates time for the entire recorded period.

How it Works

  • app.py uses the Python logging library to create detailed logs of each work session in the time_tracking.logs file.
  • time_calculator.py reads these logs and processes them based on the specified --since parameter to compute the total effective work time, excluding any AFK periods.

Contributing

Contributions are welcome! Please fork this repository, make your changes, and submit a pull request. If you encounter any issues or have suggestions for improvements, feel free to open an issue.

License

This project is open source and available under the MIT License.

time_bug's People

Contributors

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