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:
Marty Oehme 2025-03-12 18:28:12 +01:00
parent 6f79a12d2b
commit 1017b876e9
Signed by: Marty
GPG key ID: 4E535BC19C61886E
3 changed files with 101 additions and 19 deletions

View file

@ -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]