martinKindall / pomodoro_timer_console

Simple pomodoro timer commanded by console. Project that puts into practice the Dependency Rule from Clean Architecture.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pomodoro Timer

The goals of this project are:

  • Take care of the back spine, by standing and streching the body from time to time using the pomodoro technique.
  • Put into practice the Dependency Rule from Clean Architecture.

Usage

Just run the main function, located in MainComponent.java. You have to pass a single arg containing the path to the following python script AudioPlayer.py (you can locate it anywhere in your system) :

from playsound import playsound

import sys

if len(sys.argv) != 2:
    raise ValueError("One argument needed")

wavFile = sys.argv[1]

playsound(wavFile)

In the same path of the python script, there must be two .wav files (sound files), called break.wav and work.wav. Each one will play when the pomodoro break starts and finishes.

Important: The python script must be called AudioPlayer.py, the same goes for the name of the .wav files.

Example

After building the fat-jar file, you can run the program like this:

java -jar pomodoro_with_dependencies.jar /path/to/python/script/and/wav

Afterwards, there will appear a prompt that asks for work time in minutes:

Enter work time in minutes: 

And a similar prompt for break time in minutes. Then, the work time will immediately start running. Happy Work!

About

Simple pomodoro timer commanded by console. Project that puts into practice the Dependency Rule from Clean Architecture.


Languages

Language:Java 100.0%