Extract Highlights Plugin

I found uninstalling and reinstalling my plugins solved a similar hot key issue a few weeks ago, I suggest trying that.

2 Likes

It is not working with the shortcut

Hi @Ward! Hm, similar to what @icebear is saying: I’ve had some weird issues with hot-keys lately, too. Can you try re-installing the plugin?

Shift-Alt-_ should work unless there is another plugin using this combo. For Ctrl-Alt-H I have no reference (It’s not defined in my plugin)

If I click on the button on the side bar the MOC is created but not all the notes.

That’s odd - So you’re saying that on hitting the button, the MOC and some but not all notes are opening up?

Let me know!

Hi @Alexis. I have reinstalled the plugin and that solves the problem of opening the notes. Great. This is awesome. :clap:

But I still have the shortcut problem. I will test further and keep you updated.

1 Like

I have set other shortcuts and now it works perfect. :clap: :muscle: :+1:

1 Like

Many thank yous for creating this plugin. The benefit of using the bold tags is that I can highlight multiple sentences in an MOC entry. Cheers!

1 Like

Happy this works for you! Cheers!

This has the potential to be really useful for me. It might even get to to put more of other people’s texts into (part of) my vault, something I’m usually not included to do. But the note titles do seem a bit long. What would be really cool would be to have a way of marking of the parts of the highlighting that you want to use as the title. For example,

==One of the big advantags of the [[Extract Highlights plugin for Obsidian]] is the it can be used to set up MOCs quickly==

would generate the following (sandwiched between two other extracted highlights done in the normal way):

  • [[Some note titles could be identical to the highlighted text]]
  • [[Extract Highlights plugin for Obsidian]]
    • One of the big advantags of the [[Extract Highlights plugin for Obsidian]] is setting up MOCs quickly
  • [[Some note titles could be identical to the highlighted text]]

In cases where there are no backlinks selected within the highlighted text, then there would be no sub-bullet point, and demonstrated. All of this should probably also be an option rather than a default. I have no idea how much work it would be, or whether it is even possible, but it would really help me to get the most out of this!

1 Like

I love your idea! Maybe it could be like this:

==One of the big advantags of the ====Extract Highlights plugin for Obsidian==== is the it can be used to set up MOCs quickly==

And it could occur by first highlighting the larger sentence and secondarily highlighting the internal part that acts as title.

This syntax would keep the entire thing highlighted and I can’t imagine many if any ordinary cases where you would want to generate this syntax for a normal highlighting task.

I may be way off base with this idea, but just wanted to throw it out there because I really like your thought. I have long struggled with overly long titles.

Thanks.

2 Likes

Glad to hear it! Your idea has the advantage of the consistency of using the highlighting syntax. At the same time, I think that my proposal of using the backlink syntax [[]] has the advantage of putting me in the mode already of thinking “This is something that I want to be a note title / graph node” – which is a different frame of mind from “This is something I want to highlight”. Another advantage: in those cases in which one decides not to do the extraction, you’ve already set up a link (if only as an orphan).

BTW: Alexis (the plugin dev) recommends making reviewing each of the generated links, and making changes to the newly generated notes at that point, and I see his point.

Another approach would be to extract without backlinks, add H2 heading (manually or by globally replace the bullets with ##), and then use the (amazing) community plugin “Note Refactor: Split note by headings - H2” to generate a new set of notes that would all link back to the Highlights page. In a sense I might prefer that, since I’m reluctant to put too many “source” files into my vault, because I want maintain a bright line between my vault of notes and my library of source material (mostly PDFs or web clippings).

1 Like

Above I suggested this following syntax in response to @AutonomyGaps cool idea about a feature using double bracket syntax within a highlight range to define what the note title should be for that highlight:

==One of the big advantages of the ====Extract Highlights plugin for Obsidian==== is the it can be used to set up MOCs quickly==

I may again be wrong, but I believe I failed to realize that following default Markdown, Obsidian would think the last two equals signs out of the first set of four consecutive equals signs were the end of that first highlight range. I mistakenly assumed that Obsidian immediately ended a highlight range as soon as two consecutive equals signs occur.

Instead it could look like this:

==One of the big advantages of the== ==Extract Highlights plugin for Obsidian== ==is the it can be used to set up MOCs quickly==

I still wanted to leave the initial top syntax suggestion in my original post rather than editing it because some people may still actually like that more. And since this is a plugin, I guess it doesn’t really matter what Obsidian would think without the plugin. But actually it kind of does in the sense that I suggested that particular syntax thinking that in a scenario where you no longer had the Extract Highlight plugin, at least the proper range would be highlighted, albeit in three ranges rather than one. Of course, that is also true for @AutonomyGaps suggestion, but I digress. At this point, I am pretty much sold on the bracket version assuming there wouldn’t be any weird issues that arise when you inevitably highlight something with an uncreated link in it but do not want to to have that name as your extracted highlight note title. But I am sure if @akaalias and others liked the bracket version, he could cook up a nifty way that this would be a non issue.

I didn’t mean to get so involved with this post but once I realized my mistake I didn’t feel good leaving the post up, but then saw it had a vote or two and consequently felt wrong deleting or editing it.

In conclusion, I love these plugins and especially appreciate the group effort at brainstorming the bells and whistles.

Thanks so much!

2 Likes

So sad to hear, that due to different handling of the pdf js in obsidian 10.08, your great Plugin stopped working. I tried to find a way to fix it, but didnt succeeded. Its so valuable!

Does someone has an idea / solution for that problem?

Hey there – Good news, the PDF Highlights Plugin works again! I finally had the time to fully refactor the issue. Plus it should now be future proof if Obsidian uses a newer or different PDF-handling library.

Anyways, to update to the latest - working - version, just go into Settings → Community Plugins → Check for Updates

Yay! :tada:

4 Likes

Thanks a lot for your hard work!

Can you let me know how to use it?

I had updated the plugin and still did not know how to highlight the embedded pdf file on Obsidian with your plugin and paste the highlights.

I also had my pdf highlighted and do not know to extract the highlights with the plugin.

Thanks!

Thanks a lot for your hard work, it is an invaluable tool! I am super excited that it is working again with the newest Obsidian version.
However, I encountered an issue when importing highlights from pdf files with two-column text (as is the case for many academic papers for example). There, the highlights get imported without any white space between the words. Has someone else encountered the same issue and maybe found a solution to the problem? Help would be greatly appreciated, since I use the tool mainly for importing highlights from academic papers.

Hey @Liong1976! Great questions, thank you.

  1. Creating highlights: To highlight sentences in your PDF, you still have to use your regular PDF application. My plugin does not have that feature.
  2. Extracting highlights: Once you’ve dragged your highlighted PDF into Obsidian, open it in Obsidian and click the PDF icon in the left side-bar.

The icon looks like this:

Screenshot 2021-02-18 at 11.59.48

Hope this helps!

Hey @mickey,

Good catch, I’d have to look at the actual output. I saw you already submitted two issues on Github – Awesome. Please add any example files for both issues. Thanks!

Hey @akaalias,

thanks for the quick reply! Someone else must have encountered the same issue and submitted it on Github - it wasn’t me. :smiley: I don’t have a Github account (yet), but I’ll post two exemplary screenshots of the input pdf with highlights and the output on here, maybe this will help.

Screen Shot 2021-02-18 at 13.17.06

It works like a charm!

Thanks a lot, akaalias.

1 Like

Oh funny! That’s not you on Github?! :joy:

If possible, can you share the PDF you’re showing?

Glad to hear, thanks!