Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how is _add_text meant to work? #1294

Open
mil-ad opened this issue Jan 29, 2025 · 5 comments
Open

how is _add_text meant to work? #1294

mil-ad opened this issue Jan 29, 2025 · 5 comments

Comments

@mil-ad
Copy link

mil-ad commented Jan 29, 2025

I'm trying to use the _add_text script and I'm not quite sure how it's meant to work. I choose _add_text and then I can draw box, followed by typing the text. But when I press enter I only see the box and nothing happens. If I click anywhere the box disappears and I don't have any new annotations.

Am I doing it wrong?

Image

@ahrm
Copy link
Owner

ahrm commented Jan 29, 2025

It is possible that configuration might be different in other operating systems. For example instead of:

new_command _add_text python -m sioyek.add_text "%{sioyek_path}" "%{local_database}" "%{shared_database}" "%{file_path}" "%{selected_rect}" "%{command_text}"

You might have to do something like

new_command _add_text python -m sioyek.add_text '%{sioyek_path}' '%{local_database}' '%{shared_database}' '%{file_path}' '%{selected_rect}' '%{command_text}'

Either way, if you are using the development branch, this command is unnecessary because we have a built-in add_freetext_bookmark command.

@mil-ad
Copy link
Author

mil-ad commented Jan 29, 2025

omg add_freetext_bookmark is great! 🤩

How do I delete them though? Also is there a way to embed them into the pdf instead of the database? The embed_annotations command doesn't seem to do it.

@mil-ad
Copy link
Author

mil-ad commented Jan 29, 2025

also is there a way to change the colour of the text? This is a game changer!

@ahrm
Copy link
Owner

ahrm commented Jan 29, 2025

How do I delete them though?

You can delete them either by pressing delete in the bookmark list (gb list) or by running delete_visible_bookmark command which shows a label next to each visible bookmark and deletes the selected label's bookmark.

Also is there a way to embed them into the pdf instead of the database? The embed_annotations command doesn't seem to do it.

You can export a version of the PDF files with the annotations embedded using the embed_annotations command. doesn't it work for you?

also is there a way to change the colour of the text?

You can change the color using freetext_bookmark_color config. You can set the config at runtime by prefixing it with = in the commands menu. That is, entering =freetext_bookmark_color in the commands menu allows you to set the config.

@mil-ad
Copy link
Author

mil-ad commented Jan 29, 2025

Amazing! Thank you @ahrm!

The only thing I would change is to have a separate command for embedding annotations into the current file (which is why I normally want to do) or maybe even a config to always store annotations to the file instead of the database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants