Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open the database files #77

Open
justanothernoob4648 opened this issue May 2, 2021 · 13 comments
Open

Open the database files #77

justanothernoob4648 opened this issue May 2, 2021 · 13 comments

Comments

@justanothernoob4648
Copy link

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

@aardappel
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

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

@emmansh
Copy link

emmansh commented Sep 19, 2021

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
Copy link
Owner

@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
Copy link

emmansh commented Sep 20, 2021

@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
Copy link
Owner

@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
Copy link

emmansh commented Sep 22, 2021

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
Copy link

gdinit commented Nov 2, 2021

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
Copy link
Owner

@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
Copy link

gdinit commented Nov 2, 2021

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

@betamigo98
Copy link

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

@Cleroth
Copy link

Cleroth commented Jul 10, 2024

Also second a way to delete entries. Recently had a crash that resulted in the database getting corrupted. Thankful for the backups, which I then merged into the current database (hadn't realized it had been corrupted/reset). Only a few days later I realized I accidentally merged it multiple times, and it turns out the times just add up (like 80 hour days :D). If I could just delete all that duplicated data I could retrieve my most recent data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants