bingryan / obsidian-ibook-plugin

export mac ibook annotations/hightlights to obsidian vault
MIT License
72 stars 2 forks source link

Bug: No book page created when ':' is in book title #44

Closed MinMaxing closed 1 year ago

MinMaxing commented 1 year ago

Hello!

Let me preface by thanking the developer for making this plugin. It greatly enhances my obsidian experience.

I found a small bug. Whenever a book title contains a ':', no book page will be created when the export command is called. This is likely due to the book title not being sanitized and/or Obsidian not accepting ':' in a note title.

To @bingryan, consider sanitizing the book title; or making a check in export.ts that checks for forbidden characters in note titles.

To users, a temporary override can be created either in export.ts (line 100) when building from source or in the obsidian config file when it's already downloaded (line 47084 in main.js). Replace ${contentname}.md with overide.md. You can then import books with ':' in the title, and then manually changing the title as all new imports will be named override.md.

bingryan commented 1 year ago

Got it

bingryan commented 1 year ago
image

@MinMaxing i add toggle for this feat. please update this plugin and try again :)

MinMaxing commented 1 year ago

Updated and works perfectly. Marked as closed!

Thank you for fast response!

Amparose commented 7 months ago

This still breaks the front-matter metadata in the md file:

title: Example: That breaks the front matter

Instead of how the file name sanitises:

title: Example- That breaks the front matter