Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility of adding pomodoro-length entries #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kiinami
Copy link

@kiinami kiinami commented Jan 29, 2025

This pull request introduces new functionality to the main.py file, specifically adding support for creating Pomodoro time entries that end at the moment of entry (thus starting 25 minutes before that). The most important changes include importing necessary modules, adding new methods to handle Pomodoro time entries, and modifying the event handling to support these new features.

Pomodoro Time Entry Support:

  • Module Import:

    • Added timedelta import from the datetime module to handle time calculations.
  • Event Handling:

    • Modified the on_event method to insert new items for creating Pomodoro time entries when the query starts with 'pd'.
    • Added handling for resume_pomodoro and new_pomodoro calls in the on_event method.
  • New Methods:

    • Added get_time_minus_offset method to calculate the time minus a specified offset in minutes.
    • Added add_pomodoro_time_entry method to create a new Pomodoro time entry, either resuming the last entry or creating a new one with a specified message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant