aardappel / procrastitracker

a Windows time tracking application
http://strlen.com/procrastitracker/
483 stars 53 forks source link

Open the database files #77

Open justanothernoob4648 opened 3 years ago

justanothernoob4648 commented 3 years ago

Where are the db files that procrastitracker uses and how can I open them?

aardappel commented 3 years ago

There's a link to them in the start menu..

Or just go to C:\Users\YOURUSERNAMEHERE\AppData\Roaming\procrastitrackerdbs

You can normally only open them with Procrastitracker.

There's an Export Html in the taskbar menu that is probably the easiest option to convert it to another format.

There's also the file format documentation https://github.com/aardappel/procrastitracker/blob/master/PT/file_format.txt which some people have used to write readers in JS/Python (though can't find those right now).

justanothernoob4648 commented 3 years ago

Ok thanks. Also, I’m trying to monitor someone’s screen time, is there a way to stop procrastitracker from tracking while still doing things?

aardappel commented 3 years ago

Other than quitting the application, there is a way to delete activity from the statistics view (see http://strlen.com/procrastitracker/)

emmansh commented 2 years ago

Hi there, I'm chiming into this thread. First, @aardappel -- this is a fantastic piece of software. Very useful. Thank you very much for developing it.

I arrived here with a goal of creating an automated workflow for reading the database file into a program (I use R), then parsing the data, (inside R, which I should know how), and ultimately creating a simple report with hours breakdown.

So reading the DB data is the key to moving forward.

Following this thread I arrived at C:\Users\MYSELF\AppData\Roaming\procrastitrackerdbs\db.PT. However, when opening the file I see unreadable data: image
Bummer! How can I convert this to something I can read/parse? Please note that since I want to automate the procedure, using ProcrastiTracker GUI by point-and-click method isn't suitable.

Thanks a lot!


EDIT


I've seen this issue that discusses the topic in general. However, I could not wrap my head around any of the tips given there. I'd appreciate some guidance for a C-ignorant person like me: how should I extract information from database files in human language?

aardappel commented 2 years ago

@emmansh yes, it is (compressed) binary data, much like a jpeg or most file formats. Not everything is text :)

I'm afraid the only way forward is to learn more about binary formats, and how to read binary data in R or whatever language you choose.

emmansh commented 2 years ago

@aardappel thanks for replying quickly. Could you advise about the kind of encoding of the .PT file, or any idea of how to move forward with this specific binary data? Aside from knowing it's compressed with zlib, I have no understanding of what this creature is.

aardappel commented 2 years ago

@emmansh as in the linked issue, there is already documentation. I can't explain that any further without knowing what it is you don't understand about reading binary data. You may need to learn something new :)

emmansh commented 2 years ago

After researching this challenge more, I've realized that writing a program to extract data from the .PT file and converting it to a readable format is way beyond my skillset. And I don't even know where to start (in other words, I don't know what I need to know).

I will therefore have to take a different approach to this: Export to HTML using point-and-click, then process the HTML file further with tools I'm fluent at. Unfortunately, it's a compromise because such export procedure isn't automated (got to right-click the tray icon, choose on the menu, etc.). But better than nothing.

@aardappel -- If you ever find yourself wondering whether you should add a feature that automatically/routinely saves the database into a hierarchical & human-readable format such as .json, please know that there's at least one person that will become incredibly happy to see such a feature.


Regardless, this is a great program and many thanks for developing and maintaining it as an open-source project.

gdinit commented 2 years ago

Hello and thank you for this great software.

I only have one issue, there are a few entries I would like to delete - maybe I am being blind but I cannot see how to "delete" an activity.

Other than quitting the application, there is a way to delete activity from the statistics view (see http://strlen.com/procrastitracker/)

I have seen this message above, as well as another one ( issue #4 ) but still cannot seem to comprehend how to do this. If it is not too much to ask could you please provide an idiot proof explanation of how to delete a particular entry from the database?

aardappel commented 2 years ago

@gdinit yes, the above link says CTRL+H hides the currently selected item in the treeview (hidden items still accumulate time etc, they are just not shown). that is not the same as permanently deleting, but is currently the only option.

gdinit commented 2 years ago

@aardappel I understand - thank you for the quick response. I hope you can one day add the currently missing "delete entry" function.

betamigo98 commented 1 year ago

@aardappel I would upvote the creation of a delete entry too. Many thanks for the app.