sioyek-python-extensions icon indicating copy to clipboard operation
sioyek-python-extensions copied to clipboard

Update for 3.0.0a

Open naquad opened this issue 1 year ago • 4 comments

A version for Sioyek Alpha release is highly desired.

The current version is not working with the alpha's DB:

  File "/home/naquad/.local/lib/python3.12/site-packages/sioyek/sioyek.py", line 877, in embed_new_annotations
    self.embed_new_highlights(colormap=colormap)
  File "/home/naquad/.local/lib/python3.12/site-packages/sioyek/sioyek.py", line 871, in embed_new_highlights
    new_highlights = self.get_non_embedded_highlights()
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/naquad/.local/lib/python3.12/site-packages/sioyek/sioyek.py", line 992, in get_non_embedded_highlights
    candidate_highlights = self.get_highlights()
                           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/naquad/.local/lib/python3.12/site-packages/sioyek/sioyek.py", line 1166, in get_highlights
    highlights = [Highlight(self, text, highlight_type, (begin_x, begin_y), (end_x, end_y)) for _, _, text, highlight_type, begin_x, begin_y, end_x, end_y in cursor.fetchall()]
                                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 8)

naquad avatar Sep 24 '24 09:09 naquad

I am also experiencing the same issue, when trying to embed annotations in file.

shivams avatar Nov 13 '24 22:11 shivams

There is now a built-in embed_annotations command in sioyek, there is no need for that extension.

ahrm avatar Nov 14 '24 08:11 ahrm

Okay. embed_annotations asks for a new file location. It doesn't embed it automatically within the current file. I was trying to define a new command _embed_annotations as following:

new_command _embed_annotations python -m sioyek.embed_annotations "%{sioyek_path}" "%{local_database}" "%{shared_database}" "%{file_path}"

But this threw the error mentioned by the OP in the issue. Is there a way to use the built-in embed_annotations to embed it in the current file automatically without asking for a new file location?

shivams avatar Nov 14 '24 21:11 shivams

No it is not possible.

ahrm avatar Nov 15 '24 07:11 ahrm