Giter VIP home page Giter VIP logo

obsidiansimpletimetracker's Introduction

Super Simple Time Tracker

Multi-purpose time trackers for your notes!

A screenshot of the plugin in action, where you can see an active time tracker for a project

πŸ€” Usage

To get started tracking your time with Super Simple Time Tracker, open up the note that you want to track your time in. Move the cursor to the area you want the tracker to reside in, and then open your command palette and execute the Super Simple Time Tracker: Insert Time Tracker command.

When switching to live preview or reading mode, you will now see the time tracker you just inserted! Now, simply name the first segment (or leave the box empty if you don't want to name it) and press the Start button. Once you're done with the thing you were doing, simply press the End button and the time you spent will be saved and displayed to you in the table.

πŸ‘€ What it does

A time tracker is really just a special code block that stores information about the times you pressed the Start and End buttons on. Since time is tracked solely through timestamps, you can switch notes, close Obsidian or even shut down your device completely while the tracker is running! Once you come back, your time tracker will still be running.

The tracker's information is stored in the code block as JSON data. The names, start times and end times of each segment are stored. They're displayed neatly in the code block in preview or reading mode.

πŸ™ Acknowledgements

If you like this plugin and want to support its development, you can do so through my website by clicking this fancy image!

Support me (if you want), via Patreon, Ko-fi or GitHub Sponsors

obsidiansimpletimetracker's People

Contributors

bagaag avatar ellpeck avatar graf-gopher avatar jacobtread avatar prubiodev avatar sudokyle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

obsidiansimpletimetracker's Issues

πŸ€³πŸ“± Working on smartphone

Hello,

Will be this plugin available for mobile?

Right now all we can see is the JSON that is used by the plugin with all the timestamps.

Thanks in advanced.

Best regards,
Pedro Reyes.

Add a dropdown arrow to hide nested segments

The timer component gets long quickly when working with nested segments. We can add a dropdown arrow similar to the one used by Obsidian for bullet point lists to hide or show sub-segments.

Here's a demo of how that might look like.
Demo

I would also like to hide an entire list of segments to make notes less cluttered, but I think that might be a separate issue since there needs to be a change in the overall layout of the component. What do you think?

[Feature request] Way to edit Start and End times when in edit mode

Problem

Sometimes I forget to start/stop the timer so I just edit the block and change the unix time entries to the time I want. I also change some timings to exact timing like (15:59 becomes 16:00).

Feature

It would be faster if while in edit mode, there was an option to change the start/end time.


I also can look into this and implement it if @Ellpeck or other maintainers approve this.

Total only accumulates up to 24 hours (i.e. a single day)

The total accumulation only tracks up to a day. Would be pretty could if this could track for any amount of time. Might try and play around with this plugin code after work to see if I can find a solution to go with this issue.

Read Mode
Screen Shot 2022-11-23 at 8 54 26 AM

Note: that since this uses a 12hr format with no am/pm, it looks the same, but the timestamps are different, I set it to be a full 24 hour day. Though the day does show as the next which helps

Code Block showing timestamps:
Screen Shot 2022-11-23 at 8 58 21 AM

Does not render in reading view

In reading view once a timer is started it no longer renders, it shows up as a block of code.

Everything works as it should in live preview.

This is what I am seeing in reading view:
ReadingView

And this is what I see in Live Preview:
LivePreview

Total readout hh:mm:ss format?

Would it be possible to have the total to read in hh:mm:ss. This would make it easier to cop the total duration into a spreadsheet for tracking client fees. At the moment I have to type it manually.

Thanks.

Time Tracker on canvas

Hello there,

while experimenting with different things, I noticed errors and non-working behaviour of your plugin when using it on a canvas.

Console shows:

image

Not very helpful... To reproduce this, include a page with a tracker in a canvas and try to start and stop the timer from there.

Copy as table does not maintain indent

When timers are nested, they are indented in the main display. When copied as a table, sub-entries are not indented.

Since Markdown tables don't support indenting in table cells, non-breaking space HTML entities could be used, or a character like a dash could be used. I tried both and think dashes better communicate the indent level.

I would be happy to implement this as a PR.

Editing time entries

Hi @Ellpeck

first of all, thank you very much for this plugin. I use it almost daily and have been loving it so far.

I often find myself forgetting to start a timer when I start working. So what I usually do is to start it when I notice and edit the start date later on. However, this is somewhat inconvenient, as the times are stored as unix epoch timestamps, which means I have to use a different tool to calculate the timestamp and paste the result over.

To improve on this, I could imagine two ways:

  1. Store the times in a ISO-8601 (i.e. like 2023-10-16T14:10:10+00:00) or similar encoding, that is human readable. This way the time could be edited through the source view.
  2. Allow to edit the times through the user interface. There already is an edit button for the entry name. A click on that button could make the times editable as well and save them as unix epoch timestamps on confirmation.

From a usability standpoint, the second would probably be better, but the first one should be easier to implement.

If you want to, I could look into that. I just did not want to start anything before consulting you on this.

Cheers,
Luc

Store Timecode in Human Legible format

Currently, the time code is stored as an integer. When I am reading my daily note or the CSV my brain has difficulty in determining date and time as we know it. Besides, using the integer timestamp might introduce problems if the time parsing library happens to use a different epoch. Like, excel and matlab use different epochs.

I know it puts more load on the parsing process when the simple time tracker is loaded, but as I want to use my MarkDown notes also outside Obsidian and Simple Time Tracker I would be very happy if date time is stored in a neutral, globally known format. In something like ISO8601.
This would also save me a lot of trouble correcting date and time when I started the tracker too late or want to add extra entries manually.

Time-Display options?

I was wondering if there was any way that I can have the time display go from days, hours, seconds to just hours and mins and seconds? Since I use it mostly as a hour tracker for how long I worked for a specific task so I feel that having hours is just a better visual read. Something akin to steam

Prevent note from sliding down when clicking on the tracker in edit mode

Hey there !

I noticed that currently, if you use that plugin while in Live preview mode from Obsidian, you end up with a page that goes down each time you click on a button of the timer. It doesn't happen in Reading View mode, fortunately.

I don't know if there's much to do, but as it is quite easy to reproduce, I hope something can be done !

# test

this is a note

```simple-time-tracker
{"entries":[{"name":"test","startTime":"2023-12-11T17:15:41.613Z","endTime":"2023-12-11T17:15:51.088Z","subEntries":null}]}
```


 zqdqz dzq
 qz dq
 zdzq
  dqz
   dqz
   d qz
   d 
   qz
   d qz
   d qz
   d qz
 dqz
d
qz
dqz
d
qz
d
qz

d
qz
d
qz
d
qz

d
qz
d
qz
d

qz
d
qz

d

FR: Enter New Segment While Timer Runs

Thanks for this plugin! It works great and is really valuable for time tracking at work (I'm a lawyer and have to track time in 6 min increments for billing).

Is it possible that the plugin could be made to allow entry of a new time tracking item while another item is running? Right now the segment name box, where you enter the task details, can't be edited while another task is running.

To accurately capture time, it would be terrific if I could enter a new segment name while another entry is currently running, hit the start/stop button, and have that button: (1) stop the currently running entry; (2) start the entry that I just named. Right now, I have to stop the currently running task before I can enter a new task name and start the timer on that, meaning there are (admittedly small) time gaps between entries while no timer is running.

I don't know how hard this would be to code, and it's really more of a small quality of life request, so no worries if it would be too much of a pain. But I do think it would be a nice little enhancement to the timer's function if it wouldn't be too much of a timesink.

Again, thanks for making this plugin. It has already proved really valuable!

Trigger with hotkeys

Great start to the plugin!

For the future, please consider adding the ability to trigger the timers with hotkeys.

Currently I just run 1 timer at a time, so a "start" trigger should prompt for the "Segment name", and a "stop" trigger should just stop the running timer.

If other people run multiple timers, I could see a need to prompt for the segment to affect with the start/stop trigger.

Thanks!

Continuing a previous timer

Hi,
really loving this plugin, finding a lot of uses for it already.

The one thing I'd love to see added is the ability to continue tracking from a previous timer, because this way, if they're all chunked up during the chaos of the day, I have to calculate the total time per task at the end of the day.

Thanks and once again, great work with the plugin.

Table Export as Indents

Hi, great extension you've created!
I'm trying to get export to work where it automatically creates additional columns for sub-tasks:

image

Basically, I think that the "part 1" and "part 2", as sub-tasks underneath "thing 4", should have their own empty csv column, and start being listed in the second column. You'd have to have a variable number of columns before the "start" and "end" time columns, in order to represent sub-task levels in this way. But I think it would be better / more intuitive.

Also, I tried coding up a solution that would simply detect the blank spaces in the timestamps, to auto-indent the stuff below. But in fact, it's not possible to do this, because there's no way to recognize when we've hit the last item in a sub-hierarchy! Eg. After Part 1, the task "Thing 5" is not recognizable as its own top-level task. This means no program analyzing it (or really, any person who didn't know about the tasks) would be able to recognize where a sub-task list ends and a new top-level task begins, as far as I can tell.

[Bug] Tracker Doesn't Work Inside Callout

I've noticed that trackers contained inside a callout don't behave as expected. In Live Preview mode, the tracker won't start at all. In Reading mode, the tracker starts and instantly stops, generating an entry something like this:

Note

{"entries":[{"name":"Segment 1","startTime":"2023-12-29T20:40:29.852Z","endTime":null,"subEntries":null}]}

Not sure if there's a way to code around this, but it would amazing if the trackers could be run from inside a callout. I'm thinking particularly of the aside and/or column callouts that various creators have made, which would allow the tracker to be placed alongside other text, such as a checklist.

A way to toggle/see timers in the Mac Menu bar

I would love a way to have my current timer in the Mac toolbar and be able to see the current running time there as well being able to start stop the timer there.
I really don't know if and how it is possible to interact with obsidian plugins at this place but maybe a first step would be to have the possibility to trigger the last used (current) timer with a hotkey or obsidian command. I think then I could find a way to trigger this from my Mac using automator or something like that (maybe someone has an idea?) :D

This would make my freelancing work so much nicer!

Make Timecode editable in readable format

Sometimes I forget to switch the timer off. I then usually have a rough idea of how much time I spent on this particular chunk of work. So I then edit the codeblock to something close to this.

The problem I have: The code looks like this:
"startTime":1666021639,"endTime":1666027580}

This makes it very hard to adjust the time, It would be fantastic if the time parameters could be made editable like the segment name. Switching fields could easily be done by using the tab key.

List of segments

Future suggestion: provide a list of segments to choose from when starting a timer.

Perhaps based on existing segments in the current timer block, with an option to type in a new one.

Or, based on a pre-defined list.

When switching between the same named segments during the work day, having to type them in can lead to errors.

Thanks!

Allow using Obsidian markdown in segment names

Hello,
Thanks a lot for your plugin in obsidian.

Could you please add more segment or more column ?
In my way of working and time tracking, I add some #keyword and some information or link to note πŸ“§ mail to test [test](test.md)

With the "segment" I cannot easly add this informations while I start the counter

This an example of manual time-tracking

dateπŸ“… heure ⏲ timespent βŒ› what whoπŸ§β€β™‚ subject πŸ“”
20230726 11:43 00:10 #test #test2 - πŸ“§ mail to test [test](test.md)

This an example with your time-tracking
image

Thanks a lot

Display incomplete on mobile

First of all: This is such a cool plugin. I use it A LOT to track the time spent on writing projects and divide time into tasks like research, drafting, writing and so forth.

There is one glitch:
I am using the Android client on my smartphone and tablet. On the smaller display, I cannot get to the edit handles on the right side as they are cut off. For some reason, I cannot even scroll there. the only solution is to enable rotation and go into widescreen mode.

EDIT:
I just checked: The same happens on desktop once the note width is narrow enough. At first, the fields reflow nicely (GREAT!!!) but once they are still too wide, the block gets cut off:

Maybe the fields could vanish one by one. If I may, I would suggest this order of dissappearing:

  1. End time
  2. Start time
  3. Duration

This way, the timer could always be read and edited.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.