|
1 | | -Highlights to Obsidian is a plugin for Calibre ebook manager that formats and sends highlights to Obsidian.md markdown editor. This plugin's calibre forum post can be found [here](https://www.mobileread.com/forums/showthread.php?t=351283). |
2 | 1 |
|
3 | | -After installing, go to Preferences -> Toolbars & menus -> The main toolbar. The highlights to obsidian menu button is listed as H2O. |
| 2 | +# Highlights to Obsidian |
4 | 3 |
|
5 | | ---- |
| 4 | +Highlights to Obsidian is a plugin for the calibre ebook manager that formats and sends highlights to Obsidian.md markdown editor. This plugin [can be found](https://www.mobileread.com/forums/showthread.php?t=351283) on the calibre forum. |
6 | 5 |
|
7 | | -You can update the formatting of highlights sent to Obsidian in this plugin's config menu at Preferences -> Plugins -> User interface action -> Highlights to Obsidian. |
| 6 | +After installing, go to Preferences -> Toolbars & menus -> The main toolbar. The Highlights to Obsidian menu button is listed as H2O. |
8 | 7 |
|
9 | | -If you don't want your first time sending new highlights to Obsidian to send all highlights, update the last send time in the config. |
| 8 | +1. [[#Useful Info]] |
| 9 | +2. [[#Formatting Options]] |
| 10 | +3. [[#Misc]] |
10 | 11 |
|
11 | | -In the formatting config menu, the 'title' is the title of the note that a highlight will be sent to. The 'body' is the text that will be sent to that note for each highlight. The 'header' will be sent to each note exactly once when you send highlights. |
| 12 | +## Useful Info |
12 | 13 |
|
13 | | -Sometimes, if you send highlights while your obsidian vault is closed, not all highlights will be sent. If this happens, you can use the "Resend Previously Sent Highlights" function. |
| 14 | +- You can update the formatting of highlights sent to Obsidian in the config menu at Preferences -> Plugins -> User interface action -> Highlights to Obsidian. |
14 | 15 |
|
15 | | -You can set keyboard shortcuts in Preferences -> Shortcuts -> H2O. Some available keyboard shortcuts include CTRL+S, CTRL+E, CTRL+G, CTRL+H, CTRL+J, and CTRL+K. |
| 16 | +- If you don't want the first time sending new highlights to send all of your highlights, you can update the last send time in the config. |
16 | 17 |
|
17 | | ---- |
| 18 | +- In the formatting config menu, the 'title' is the title of the note that a highlight will be sent to. The 'body' is the text that will be sent to that note for each highlight. The 'header' will be sent to each note exactly once when you send highlights. |
18 | 19 |
|
19 | | -Available formatting options are as follows: |
| 20 | +- In a note's title, you can include slashes "/" to specify what folder the note should be in. |
20 | 21 |
|
| 22 | +- Sometimes, if you send highlights while your Obsidian vault is closed, not all highlights will be sent. If this happens, you can use the "Resend Previously Sent Highlights" function. |
| 23 | + |
| 24 | +- You can set keyboard shortcuts in Preferences -> Shortcuts -> H2O. |
| 25 | + |
| 26 | +- Due to URI length limits, H2O can only send a few thousand words to a single note at once. Extra text will be sent to different notes with increasing numbers added to the end of the title. |
| 27 | + |
| 28 | +## Formatting Options |
| 29 | + |
| 30 | +For an example of how to use these, see the default format settings in the plugin's config menu. |
| 31 | + |
| 32 | +**Book:** |
21 | 33 | - {title}: Title of the book the highlight is in. |
22 | 34 | - {authors}: Authors of the book the highlight is in. |
| 35 | +- {bookid}: The book's ID in calibre. |
| 36 | + |
| 37 | +**Highlight:** |
23 | 38 | - {highlight}: The highlighted text. |
24 | 39 | - {blockquote}: The highlighted text, formatted as a blockquote. an arrow and a space "> " are added to the beginning of each line. |
25 | 40 | - {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. |
26 | | -- {date}: Date the highlight was made, formatted as YYYY-MM-DD |
27 | | -- {time}: Time the highlight was made, formatted as HH:MM:SS |
28 | | -- {datetime}: Date and time highlight was made, formatted as YYYY-MM-DD HH:MM:SS |
29 | | -- {localdate}, {localtime}, {localdatetime} |
30 | | -- {timezone}: The timezone that your computer is currently set to. Note that this may not always match the timezone the highlight was made in. This uses the full name, as in "Coordinated Universal Time", instead of the abbreviation, as in "UTC". |
31 | | -- {utcoffset} or {timeoffset}: 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. |
32 | | -- {day}: Day of the month the highlight was made, as in 3 or 17 |
33 | | -- {month}: Month the highlight was made, as in 4 for April or 10 for October |
34 | | -- {year}: Full year the highlight was made, as in 2022 |
35 | | -- {localday}, {localmonth}, {localyear} |
36 | | -- {utcnow}: current UTC time, formatted same as {datetime}. |
37 | | -- {localnow} |
38 | 41 | - {url}: A [calibre:// url](https://manual.calibre-ebook.com/url_scheme.html) 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. |
39 | 42 | - {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. |
40 | | -- {timestamp}: The highlight's Unix timestamp. This is the default sort key used to determine what order to send highlights in. |
| 43 | +- {timestamp}: The highlight's Unix timestamp. As a sort key, this will order highlights by when they were made. |
| 44 | +- {uuid}: The highlight's unique ID in calibre. For example, "TlNlh8_I5VGKUtqdfbOxDw". |
| 45 | + |
| 46 | +**Time:** |
| 47 | +- {date}: Date the highlight was made, formatted as YYYY-MM-DD. |
| 48 | +- {time}: Time the highlight was made, formatted as HH:MM:SS. |
| 49 | +- {datetime}: Date and time highlight was made, formatted as YYYY-MM-DD HH:MM:SS. |
| 50 | +- {day}: Day of the month the highlight was made, as in 3 or 17. |
| 51 | +- {month}: Month the highlight was made, as in 4 for April or 10 for October. |
| 52 | +- {year}: Full year the highlight was made, as in 2022. |
| 53 | +- {hour}: Hour the highlight was made, based on a 24-hour (not 12-hour) system. |
| 54 | +- {minute}: Minute the highlight was made. |
| 55 | +- {second}: Second the highlight was made. |
| 56 | +- {utcnow}: current time, formatted same as {datetime}. |
| 57 | +- {datenow}: Current date, formatted same as {date}. |
| 58 | +- {timenow}: Current time, formatted same as {time}. |
| 59 | +- {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". |
| 60 | +- {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. |
| 61 | +- 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}. |
| 62 | + |
| 63 | +**Highlights to Obsidian:** |
41 | 64 | - {totalsent}: The total number of highlights being sent. |
42 | 65 | - {booksent}: The total number of highlights being sent to this Obsidian note. |
43 | 66 | - {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". |
44 | | -- {bookid}: The book's ID in calibre. |
45 | | -- {uuid}: The highlight's unique ID in calibre. For example, "TlNlh8_I5VGKUtqdfbOxDw". |
46 | | - |
47 | | -For an example of how to use these, see the default format settings in the plugin's config. |
48 | 67 |
|
49 | | ---- |
| 68 | +## Misc |
50 | 69 |
|
51 | | -Formatting options are based on the [Obsidian Clipper](https://github.com/jplattel/obsidian-clipper) Chrome extension. |
| 70 | +This plugin is loosely based on the [Obsidian Clipper](https://github.com/jplattel/obsidian-clipper) Chrome extension. |
52 | 71 |
|
53 | | -h2o-index.txt is for the [plugin index page](https://www.mobileread.com/forums/showthread.php?t=118764) on the Calibre forum. |
| 72 | +The file `h2o-index.txt` is for the [plugin index page](https://www.mobileread.com/forums/showthread.php?t=118764) on the calibre forum. |
0 commit comments