'update'
This commit is contained in:
@@ -1,3 +1,18 @@
|
||||
"""
|
||||
annotationdata.py
|
||||
-----------------
|
||||
功能:
|
||||
- 解析iBooks的AEAnnotation.sqlite数据库,提取所有或指定书籍(assetid/bookid)的笔记。
|
||||
- 提供parse_location辅助函数,解析笔记定位信息。
|
||||
- 返回结构化的annotations数据,便于后续章节定位与导出。
|
||||
|
||||
主要接口:
|
||||
- get_annotations(db_path, bookid=None):返回所有或指定assetid的笔记,结构为{assetid: {uuid: {...}}}
|
||||
- parse_location(location):解析ZANNOTATIONLOCATION,返回(idref, filepos)
|
||||
|
||||
依赖:sqlite3, collections, re, os, datetime
|
||||
"""
|
||||
|
||||
import sqlite3
|
||||
from collections import defaultdict
|
||||
import re
|
||||
|
||||
Reference in New Issue
Block a user