View Single Post
Old 01-05-2023, 05:17 PM   #1
jm289765
Enthusiast
jm289765 began at the beginning.
 
Posts: 28
Karma: 10
Join Date: Jan 2023
Device: calibre
Post [GUI Plugin] Highlights to Obsidian

Highlights to Obsidian is a plugin that formats and sends highlights to the Obsidian.md markdown editor.

Main Features:
  • Send all highlights to Obsidian
  • Only send new highlights or highlights of selected books
  • Customizable formatting
  • Optional header to be attached to the beginning of each batch of highlights
  • When multiple highlights are sent to the same file, user can specify how they will be sorted

Formatting options:
Spoiler:
Book Data:
  • {title}: Title of the book the highlight is in.
  • {authors}: Authors of the book the highlight is in.
  • {bookid}: The book's ID in calibre.

Highlight Data:
  • {highlight}: The highlighted text.
  • {blockquote}: The highlighted text, formatted as a blockquote. An arrow and a space "> " are added to the beginning of each line.
  • {notes}: The user's notes on this highlight, if any notes exist. There is a config option that allows you to set different formatting depending on whether a highlight includes notes.
  • {url}: A calibre url to open the ebook viewer to this highlight. Note that this may not work if your library's name contains unsafe URL characters. Numbers, letters, spaces, underscores, and hyphens are all safe.
  • {location}: The highlight's EPUB CFI location in the book. For example, "/2/8/6/5:192". As a sort key, this will order highlights by their position in the book.
  • {timestamp}: The highlight's Unix timestamp. As a sort key, this will order highlights by when they were made.
  • {uuid}: The highlight's unique ID in calibre. For example, "TlNlh8_I5VGKUtqdfbOxDw".

Time Data:
  • {date}: Date the highlight was made, formatted as YYYY-MM-DD.
  • {time}: Time the highlight was made, formatted as HH:MM:SS.
  • {datetime}: Date and time highlight was made, formatted as YYYY-MM-DD HH:MM:SS.
  • {day}: Day of the month the highlight was made, as in 03 or 17.
  • {month}: Month the highlight was made, as in 04 for April or 10 for October.
  • {year}: Full year the highlight was made, as in 2022.
  • {hour}: Hour the highlight was made, based on a 24-hour (not 12-hour) system.
  • {minute}: Minute the highlight was made.
  • {second}: Second the highlight was made.
  • {utcnow}: current time, formatted same as {datetime}.
  • {datenow}: Current date, formatted same as {date}.
  • {timenow}: Current time, formatted same as {time}.
  • {timezone}: The timezone that your computer is currently set to. Note that this may not always match the timezone the highlight was made in. Also note that this might use the full name "Coordinated Universal Time" instead of the abbreviation "UTC".
  • {utcoffset}: The UTC offset of your computer's current time zone. For example, UTC time gives +0:00. EST time can be -4:00 or -5:00, depending on daylight savings time.
  • All time options use UTC by default. To use your computer's local time zone instead, add "local" to the beginning: {localdate}, {localtime}, {localdatetime}, {localday}, {localmonth}, {localyear}, {localhour}, {localminute}, {localsecond}, {localnow}, {localdatenow}, {localtimenow}.

H2O Data:
  • {totalsent}: The total number of highlights being sent.
  • {booksent}: The total number of highlights being sent to this Obsidian note. If a large note is split into multiple smaller notes, {booksent} will give the total being sent to all of those smaller notes.
  • {highlightsent}: This highlight's position in the highlights being sent to this note. For example, "{highlightsent} out of {booksent}" might result in "3 out of 5".

Note: For an example of how to use these, see the default format settings in the plugin's config.


Special Notes:
  • After installing, go to Preferences -> Toolbars & menus -> The main toolbar. The Highlights to Obsidian menu button is listed as H2O.
  • You can set keyboard shortcuts in Preferences -> Shortcuts -> H2O.
  • Source code
  • Version history
Attached Files
File Type: zip highlights-to-obsidian-1.4.1.zip (34.4 KB, 30124 views)

Last edited by jm289765; 12-18-2023 at 01:33 PM. Reason: update to 1.4.1
jm289765 is offline   Reply With Quote