Attempt to calculate annotation offsets
There are clear issues remaining with this approach. The wallabag-given 'start' and 'end' fields do _not_ just point to the n-th paragraph all the time (like I thought) but actually represent a beautifulsoup4 like tree descent. So: `p_start_match = re.match(r"/p\[(\d+)\]", annot["ranges"][0]["start"])` will fail on any annotation not just at the n-th paragraph. Instead we should see how we can move this tree into the beautifulsoup4 parser and make use of wallabag already having done the work for us?
This commit is contained in:
parent
6f79a12d2b
commit
1017b876e9
3 changed files with 101 additions and 19 deletions
|
|
@ -5,12 +5,12 @@ description = "Add your description here"
|
|||
readme = "README.md"
|
||||
requires-python = ">=3.13"
|
||||
dependencies = [
|
||||
"beautifulsoup4>=4.13.3",
|
||||
"lxml>=5.3.1",
|
||||
"requests>=2.32.3",
|
||||
# REQUIRED FOR CURRENT SHAARLI2HOARDER IMPLEMENTATION ONLY
|
||||
# "beautifulsoup4>=4.13.3",
|
||||
# "netscape-bookmarks-file-parser",
|
||||
# "pyjwt>=2.10.1",
|
||||
# "requests>=2.32.3",
|
||||
"requests>=2.32.3",
|
||||
]
|
||||
|
||||
[tool.pyright]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue