A script to get document editing time

Hi, not sure if this is helpful to anyone else, or if there’s a better method, but I was curious about my total editing time of Krita documents, so I wrote this simple script. It should work in Bash on Windows (e.g. Git Bash) and Linux.

Can be used like this:

script.sh doc_A.kra
script.sh doc_*.kra        # read multiple files

I haven’t tested it too extensively, seems to work :smiley:

#!/bin/bash
function get_time {
    unzip -p "$1" documentinfo.xml | \
    grep editing-time | \
    sed -E 's/ *<\/?editing-time>//g'
}

for f in "$@"
do
    if [ -e "$f" ]; then
        echo -e "$(get_time "$f")\t$f"
    else
        echo "File not found: $f"
    fi
done

Once you get an output, you can paste it into a spreadsheet or similar and get a sum, at least that’s what I did. The raw value is in seconds.

2 Likes

Probably this one:
Timer Watch
:wink:

Michelist

Thanks, that’s a nice plugin, but my situation is a bit different. I just wanted to check how much time I have spent painting in Krita in 2024, for example. I haven’t tracked the time in any way, so the built in counter in Krita documents is the best thing I have now.

1 Like

I also need the same thing, I asked the timer wach programmer for a similar function in that pluguin but it is not easy to use.
is this: Tab Information · EyeOdin/project_pages Wiki · GitHub
I also need the same function to calculate the time worked, it is the feature that the recorder has which detects only when you are working.

I was not aware of this inaccuracy, sorry.

Michelist

1 Like