{"action":"created","issue":{"url":"https://api.github.com/repos/aardappel/procrastitracker/issues/19","repository_url":"https://api.github.com/repos/aardappel/procrastitracker","labels_url":"https://api.github.com/repos/aardappel/procrastitracker/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/aardappel/procrastitracker/issues/19/comments","events_url":"https://api.github.com/repos/aardappel/procrastitracker/issues/19/events","html_url":"https://github.com/aardappel/procrastitracker/issues/19","id":182544861,"number":19,"title":"Reading the database manually","user":{"login":"oguzhanogreden","id":7797029,"avatar_url":"https://avatars.githubusercontent.com/u/7797029?v=3","gravatar_id":"","url":"https://api.github.com/users/oguzhanogreden","html_url":"https://github.com/oguzhanogreden","followers_url":"https://api.github.com/users/oguzhanogreden/followers","following_url":"https://api.github.com/users/oguzhanogreden/following{/other_user}","gists_url":"https://api.github.com/users/oguzhanogreden/gists{/gist_id}","starred_url":"https://api.github.com/users/oguzhanogreden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oguzhanogreden/subscriptions","organizations_url":"https://api.github.com/users/oguzhanogreden/orgs","repos_url":"https://api.github.com/users/oguzhanogreden/repos","events_url":"https://api.github.com/users/oguzhanogreden/events{/privacy}","received_events_url":"https://api.github.com/users/oguzhanogreden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-10-12T14:44:39Z","updated_at":"2016-12-08T13:12:45Z","closed_at":null,"body":"I wanted to process the data myself, to visualize some of my keystroke activity for fun. However I could not find any guide or hint as to how to read the file. There is [this](https://github.com/Macuyiko/ptunpacker) but I am not familiar with Java.\n\nWould it be feasible to provide geeks among users with a guide or some hints?\n"},"comment":{"url":"https://api.github.com/repos/aardappel/procrastitracker/issues/comments/265736621","html_url":"https://github.com/aardappel/procrastitracker/issues/19#issuecomment-265736621","issue_url":"https://api.github.com/repos/aardappel/procrastitracker/issues/19","id":265736621,"user":{"login":"jt-fuw","id":6706545,"avatar_url":"https://avatars.githubusercontent.com/u/6706545?v=3","gravatar_id":"","url":"https://api.github.com/users/jt-fuw","html_url":"https://github.com/jt-fuw","followers_url":"https://api.github.com/users/jt-fuw/followers","following_url":"https://api.github.com/users/jt-fuw/following{/other_user}","gists_url":"https://api.github.com/users/jt-fuw/gists{/gist_id}","starred_url":"https://api.github.com/users/jt-fuw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jt-fuw/subscriptions","organizations_url":"https://api.github.com/users/jt-fuw/orgs","repos_url":"https://api.github.com/users/jt-fuw/repos","events_url":"https://api.github.com/users/jt-fuw/events{/privacy}","received_events_url":"https://api.github.com/users/jt-fuw/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T13:12:45Z","updated_at":"2016-12-08T13:12:45Z","body":"Get the pt-dmp.zip and try it (or look at an included example); it gives output which structure reflects (by indents and line order) a hierarchy which is in the db.PT information. Do you have an idea how to express it in the .CSV? Generally, .CSV is a flat-organized, but of course one can define a way to express a hierarchy in it; the question is what method would be best for you.\r\n[pt-dmp.txt](https://github.com/aardappel/procrastitracker/files/639408/pt-dmp.txt)\r\n\r\nThe first line tells file format version (I have versions of procrastitracker giving two different formats of the db.PT, version 9 and 10, the program decodes both) and tag count; then tag definition lines follow (each starts from tag index 0..9, then specified color and name); then a line containing parameters stored in the db.PT; all remaining has a tree structure.\r\n\r\nThe tree structure has two kinds of entries: node and day; a node may have many days assigned to it, a day is shown in two lines and has no sub-elements in the hierarchy; you can think about days like leaves on a tree (or files in a filesystem), and about nodes like branches on a tree (or directories in a filesystem), although seems semantically more important is binding a day to a node than connections between nodes; a node has a tag index, which refers a tag.\r\n\r\nSuch a structure is usually stored in database as four tables:\r\n1. Info about parameters - 1 record, or separate record for each parameter.\r\n2. Tag table (key=tagindex, value=tagname).\r\n3. Node table; a node contain link to its parent (e.g. a parent identifier), to build a tree structure\r\n   (key=nodeindex; data contains parentindex, nodename, tagindex, ishidden).\r\n4. Day table (key=nodeindex+date; data contains 7 fields).\r\nAnd the .CSV format is usually for a single table."}}
{"actor":{"display_login":"jt-fuw"}}