You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
352 B

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