<%* // The KOReader defined highlight styles vs callout mapping. Leave the keys as is, but you can edit the values to create your own convention. const NOTE_STYLES = { lighten: { type: "quote", title: "Quotable/Concept/General Idea", }, invert: { type: "important", title: "Striking/Intense",
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .callout[data-callout="stylish"] { | |
| --callout-color: var(--color-purple-rgb); | |
| --callout-icon: lucide-brush; | |
| } | |
| .callout[data-callout="sceptic"] { | |
| --callout-color: 107, 142, 35; | |
| --callout-icon: lucide-message-circle-question; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copy this to a markdown file ad uncomment the template tags from the top and the bottom to use with Templater. | |
| // <%* // Uncomment this line | |
| const NOTE_STYLES = { | |
| lemon: { | |
| type: "quote", | |
| title: "Quotable/Concept/General Idea", | |
| }, | |
| blue: { | |
| type: "important", | |
| title: "Striking/Intense", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- START: <% Math.random().toString(36).substring(2, 8) %> --- | |
| <% tp.file.cursor() %> | |
| --- END --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Boox Annotations | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2025-02-26 | |
| // @description export Boox annotations as JSON | |
| // @author Utsob Roy | |
| // @include https://push.boox.com/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=mozilla.org | |
| // @grant GM.registerMenuCommand |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local UIManager = require("ui/uimanager") | |
| local ReaderHighlight = require("apps/reader/modules/readerhighlight") | |
| local _ = require("gettext") | |
| local util = require("util") | |
| local ButtonDialog = require("ui/widget/buttondialog") | |
| local BD = require("ui/bidi") | |
| local C_ = _.pgettext | |
| local ffiUtil = require("ffi/util") | |
| local logger = require("logger") | |
| local BlitBuffer = require("ffi/blitbuffer") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%* | |
| // Note style prefixes we will map to callouts. | |
| // It will suffice to put just this character to change the callout style. | |
| // If additional notes are required, we will use a space after the prefix, | |
| // and then continue to our usual note. | |
| // Customize this as you see fit. With types from: https://help.obsidian.md/Editing+and+formatting/Callouts#Supported+types | |
| const NOTE_STYLES = { | |
| "!": { | |
| type: "important", | |
| title: "Striking/Intense", |
<%* function getTitleAndAuthor(l) { l = l.replace("Reading Notes | <<", "").split(">>"); return { title: l[0], authors: l[1] } }
let file = app.workspace.getActiveFile()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Formatters { | |
| format_book_collections(collections, dv) { | |
| if (collections) { | |
| const keys = Object.keys(collections); | |
| const links = dv | |
| .pages('"Personal/Reading/Collections"') | |
| .where( | |
| (p) => | |
| p.handle != undefined && | |
| keys.indexOf(p.handle) > -1 |
NewerOlder