Files
configs/bin/kobo-parse-highlights
2022-08-21 11:22:24 +02:00

16 lines
352 B
Python
Executable File

#!/usr/bin/env python3
# script to print all the Kobo highlights in a human readable fashion
import sys
import xml.etree.ElementTree as ET
tree = ET.parse(sys.argv[1])
root = tree.getroot()
for annotation in root:
for target in annotation:
for fragment in target:
for text in fragment:
print("-", text.text)