Skip to content

ayankhanakaak/Time-and-Progress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

⏳ Time and Progress

A simple yet powerful Python program that calculates the time left for a task to be completed based on either current speed or average speed.

Users manually enter:

  • Max/target progress
  • Current/finished progress (updated over time)

The program then:

  • Calculates time left dynamically
  • Displays progress bar with percentage
  • Shows speed in seconds/minutes/hours depending on pace
  • Handles both current and average speed calculation methods

📌 Features

  • Two Calculation Methods:
    1. Average Speed Method – Calculates based on total average speed since start.
    2. Current Speed Method – Calculates based on the most recent progress speed.
  • Real-time Progress Updates
  • Automatic Time Formatting (seconds, minutes, hours)
  • Colored Console Output (requires colored module)
  • A no-color version (not requiring colored) is also available: Time_and_Progress_no-color.py
  • Handles No-Progress Cases
  • Completion Detection – Displays time taken when task finishes.

📦 Installation

  1. Clone this repository

    git clone https://github.com/ayankhanakaak/Time-and-Progress.git
    cd Time-and-Progress-main
  2. Install dependency (for colors)

    pip install colored
  3. Run the program

    python "Time_and_Progress.py"

    or, if don't want colors or colored module:

    python "Time_and_Progress_no-color.py"

🖥️ Usage

When you run the program, it will:

  1. Ask you to choose a calculation method:
    1. Average Speed Method
    2. Current Speed Method
    
  2. Ask for max range (target value)
  3. Ask for initial progress
  4. Continuously ask for updated progress until max is reached
  5. Show:
    • Progress bar
    • Percentage complete
    • Time left (or time taken if complete)
    • Speed in appropriate unit

💡 Example

User Input

Choose method:
1. Average Speed Method
2. Current Speed Method
---> 2
Enter max range: 100
Enter progress: 10
Enter new progress: 30
Enter new progress: 55
Enter new progress: 100

Output

20%
[████████████                    ]
Time Left: 3 Minutes 45 Seconds
Speed: 6.5/sec

55%
[███████████████████████          ]
Time Left: 1 Minute 15 Seconds
Speed: 4.8/sec

[████████████████████████████████]
Finished!
Time Taken: 5 Minutes 3 Seconds

⚖ License

This project is licensed under the GNU General Public License v3.0 – see the LICENSE file for details.


🤝 Contributing

Feel free to fork this repository and submit pull requests to improve features, fix bugs, or enhance performance.


📧 Contact

Author: Ayan Khan
GitHub: ayankhanakaak
Email: [email protected]


About

A Python program that calculates the time left for a task to be completed. User manually enters max/target progress, then keeps updating by entering the current/finished progress, the script calculates time left by noticing the speed of progress (either current or average).

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages