procrastitracker icon indicating copy to clipboard operation
procrastitracker copied to clipboard

Open the database files

Open justanothernoob4648 opened this issue 3 years ago • 13 comments

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

justanothernoob4648 avatar May 02 '21 14:05 justanothernoob4648

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).

aardappel avatar May 02 '21 15:05 aardappel

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?

justanothernoob4648 avatar May 02 '21 16:05 justanothernoob4648

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

aardappel avatar May 02 '21 21:05 aardappel

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?

emmansh avatar Sep 19 '21 10:09 emmansh

@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.

aardappel avatar Sep 20 '21 00:09 aardappel

@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.

emmansh avatar Sep 20 '21 03:09 emmansh

@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 :)

aardappel avatar Sep 22 '21 00:09 aardappel

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.

emmansh avatar Sep 22 '21 08:09 emmansh

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?

gdinit avatar Nov 02 '21 13:11 gdinit

@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.

aardappel avatar Nov 02 '21 15:11 aardappel

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

gdinit avatar Nov 02 '21 18:11 gdinit

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

betamigo98 avatar Aug 11 '22 16:08 betamigo98