Skip to content

Instantly share code, notes, and snippets.

@LuisCusihuaman
Created July 14, 2020 03:01
Show Gist options
  • Save LuisCusihuaman/33b5d767a77e0c95942c18d532017184 to your computer and use it in GitHub Desktop.
Save LuisCusihuaman/33b5d767a77e0c95942c18d532017184 to your computer and use it in GitHub Desktop.
Time to Pomodoros
import sys
from datetime import timedelta
total_time = sys.argv[1].split('.') # 2.35 is 2hr 35min
delta = timedelta(hours=int(total_time[0]), minutes=int(total_time[1]))
minutes = delta.total_seconds() / 60
total_pomodoros = round(minutes / 25)
print(f'🕒{total_pomodoros} Pomodoros')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment