Home Forums Get Help for Klok klok.dat file information

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #749
    Anonymous
    Inactive

    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

    #1356
    Anonymous
    Inactive

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

    #1357
    Anonymous
    Inactive

    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.

    #1358
    bobinouye51bobinouye51
    Participant

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.