Home › Forums › Get Help for Klok › klok.dat file information
- This topic is empty.
- AuthorPosts
- December 9, 2008 at 4:18 pm #749AnonymousInactive
Just curious as to the format of the data in the klok.dat file.
I use Klok to manage the projects I work on and it is great. However I have to submit bi-monthly time sheets to my employer, and I was hoping to be able to generate these automatically based on the information in Klok.
Perhaps there is a better way to do this?
Thanks
Dan
December 10, 2008 at 2:39 pm #1356AnonymousInactiveIn the current (1.0 and 1.5) versions, the data file is basically a serialized AMF format. This format was created by Adobe (I think) and is used for all kinds of stuff in Flash based applications. In version 2, I am switching to use a local SQLite database. There are lots of benefits for me to doing this but it also opens up the possibilities of other applications being created that can interact with the same data. Obviously users will need to be careful installing other desktop applications that monkey with the Klok data. Changing the data incorrectly could break Klok. It is possible for me to encrypt the local database, but that would eliminate the possibility of other apps using it. So, I am still thinking it all through.
March 2, 2009 at 4:03 pm #1357AnonymousInactiveThanks for the info. I was able to read the file using Python and PyAMF. In case anyone is interested, here is a code sample.
from pyamf.amf3 import decode
from pyamf.util import StringIOProxy
proxy = StringIOProxy(open('klok.dat', 'rb').read())
data = decode(proxy).next()
The ‘data’ object will then contain the data tree as read from the klok data file. After that it is just a matter of traversing the tree to get what information you need.
July 18, 2009 at 10:44 pm #1358bobinouye51Participant@dmikusa wrote:
Thanks for the info. I was able to read the file using Python and PyAMF. In case anyone is interested, here is a code sample.
from pyamf.amf3 import decode
from pyamf.util import StringIOProxy
proxy = StringIOProxy(open('klok.dat', 'rb').read())
data = decode(proxy).next()
The ‘data’ object will then contain the data tree as read from the klok data file. After that it is just a matter of traversing the tree to get what information you need.
Thanks for the info and code snippet. Very useful indeed!
- AuthorPosts
- You must be logged in to reply to this topic.