Created
July 1, 2020 12:30
-
-
Save maxchuquimia/098fac99723dd02dc6884000e71e04a5 to your computer and use it in GitHub Desktop.
Calculate total time in Skype calls with a person (parsing Skype export)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat skype_export.json | jq -r '.conversations[] | select(.displayName != null) | select(.displayName | contains("PEER NAME HERE")) | .MessageList[] | select(.messagetype == "Event/Call") | .content' | grep 'ended' | sed -e 's/^.*callId="\([^"]*\)".*<duration>\(.*\)<\/d.*$/\1 \2/g' | uniq | sed 's/^.* \(.*\)$/\1/g' | awk '{ SUM += $1} END { printf "%.2f", SUM }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment