bandantonio / obsidian-apple-books-highlights-plugin

Import highlights and notes from your Apple Books to Obsidian
https://obsidian.md/plugins?id=apple-books-import-highlights
MIT License
44 stars 2 forks source link

FR: Naming of Highlight File #13

Closed jun6lee closed 2 months ago

jun6lee commented 6 months ago

I have some whole books that I've converted from ePub to HTML to Markdown in my vault.


With my workflow, I have daily notes in which I link the book if I read some part of it that day. I collect this info in other periodic notes for other purposes.

Long story short, if the highlights coming in have the same title, some links in my daily notes will assume to link to the file with the highlights, rather than the book, so as well as folder, it would be a useful tweak if I could append something to the name of the file created. Eg: " - highlights"

bandantonio commented 6 months ago

It seems like Aliases would do the trick for you.

jun6lee commented 6 months ago

Not quite.

Eg: If I have 2 files... /Book/BookTitle.md and /Highlights/BookTitle.md with aliases 1 and 2 respectively.

In my daily note if I say [[BookTitle]] as I have historically, some of the links now will point at the book file, some at the highlight file.

Going forward I could try saying [[2]] and [[1]] but that won't help the 700 Daily Notes already there. Thus I'd rather the highlight files were titled as per my design BookTitle-HL.md

bandantonio commented 6 months ago

Thanks for the details.

I believe you can modify your template for highlights by adding alias to the frontmatter as follows:

---
alias: {{{bookTitle}}}-HL
---

<the rest of the template>

In this way, your links that are pointing to books will be resolved properly, still allowing you to type the same [[BookTitle]] and choose the pre-populated alias that will be resolved to the corresponding book with highlights:

That's how direct link and alias get resolved:

jun6lee commented 6 months ago

Okay, didn't get to play enough. I'll test this out once I can get highlights in, can't seem to resolve that issue yet.

bandantonio commented 2 months ago

Closed due to inactivity