Skip to content

Commit

Permalink
ability to create sessions when starting the cli
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonak-Adipta-Kalita committed Jul 5, 2024
1 parent 8c31298 commit e4341b4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion flomo/cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import click
import click_aliases
import datetime

import flomo.ui as ui
import flomo.tracker as tracker
Expand Down Expand Up @@ -30,7 +31,11 @@ def start(tag: str, name: str):
"""
Start a Flowmodoro session.
"""
ui.main(tag.lower(), name)
db = tracker.Tracker()
db.create_table()
session_id = db.create_session(tag, name, datetime.datetime.now())
db.conn.close()
ui.main(tag.lower(), name, session_id)


if __name__ == "__main__":
Expand Down

0 comments on commit e4341b4

Please sign in to comment.