I’m trying to keep a log of the time that I spend doing specific tasks throughout the day. Currently, the way that I am doing this is by constantly running a stopwatch and filling out a spreadsheet for the day — when a task is completed, I lap the stopwatch and add the task and the time spent on that task in a row in the spreadsheet. It does the job, but it is very tedious. Does anyone have a recommendation for an app that can do this for me? I would like it to:

  • Log the time constantly (when a task is completed, immedately start a new task)
  • Time a task
  • Allow naming of tasks
  • (optional) Allow categorizing of tasks with tags
  • (optional) Show graphics for how time is spent each day, and statistics on how much time is spent
  • The ability to export the data (e.g. CSV)

It would probably be the most convenient for this to be an Android app, but I am also open to suggestions for a Desktop (Linux) app.

  • invisiblegorilla@sh.itjust.works
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    8 months ago

    How’s your python. Its a pretty simple thing to make in python… It won’t care about the platform you choose to run it on.

    I’m at the pub right now, but for a quick solution… I made this. It’ll save as a CSV as it goes.

    Just tested on android ide so doesn’t look pretty but I can make up a slicker interface if you want?? I can also package it as a binary and publish on github if you didn’t find something suitable.

    Enter the task name, hit start to trigger stopwatch, and stop when you’re done.

    Not sure how to codeblock on this app and I cant get it to display right. Im blaming the beer

    import tkinter as tk from datetime import datetime

    class TaskLoggerApp: def init(self, master): self.master = master master.title(“Task Logger”)

        self.task_label = tk.Label(master, text="Task:")
        self.task_label.pack()
    
        self.task_entry = tk.Entry(master)
        self.task_entry.pack()
    
        self.timer_button = tk.Button(master, text="Start Timer", command=self.start_timer)
        self.timer_button.pack()
    
        self.log_label = tk.Label(master, text="")
        self.log_label.pack()
    
        self.log_text = ""
    
        self.timer_running = False
        self.start_time = None
    
    def start_timer(self):
        if not self.timer_running:
            self.start_time = datetime.now()
            self.timer_button.config(text="Stop Timer")
            self.timer_running = True
        else:
            end_time = datetime.now()
            time_spent = end_time - self.start_time
            task_name = self.task_entry.get()
            self.log_task(task_name, time_spent)
            self.timer_button.config(text="Start Timer")
            self.timer_running = False
    
    def log_task(self, task_name, time_spent):
        time_spent_str = "{:.2f}".format(time_spent.total_seconds() / 60)
        with open("task_log.csv", "a") as file:
            file.write(f"{task_name},{time_spent_str}\n")
        log_text = f"Task '{task_name}' logged. Time spent: {time_spent_str} minutes\n"
        self.log_text += log_text
        self.log_label.config(text=self.log_text)
        print(log_text)
    

    def main(): root = tk.Tk() app = TaskLoggerApp(root) root.mainloop()

    if name == “main”: main()