configs/bin/kobo-parse-highlights
bin/kobo-parse-highlightsRaw
1#!/usr/bin/env python3
2# script to print all the Kobo highlights in a human readable fashion
3
4import sys
5import xml.etree.ElementTree as ET
6
7tree = ET.parse(sys.argv[1])
8root = tree.getroot()
9
10
11for annotation in root:
12 for target in annotation:
13 for fragment in target:
14 for text in fragment:
15 print("-", text.text)