KindleのハイライトをCosense用に出力する
KindleのハイライトをScrapbox用に出力するブックマークレット
https://read.amazon.co.jp/notebook
参考
Kindleの「メモとハイライト」ページのハイライトをScrapbox用に出力するブックマークレットを作った - テストウフ
Kindleでハイライトした内容をScrapboxに書き込むためのメモ - Qiita
/daiiz/markdown-button
出力の仕方をこれにする
code:js
;(() => {
if (location.href.indexOf('https://read.amazon.co.jp/notebook') !== 0) {
return
}
const annotations = Array.from(
document.querySelectorAll('#annotationHighlightHeader')
).map((elem) => elem.innerText)
const highlights = Array.from(
document.querySelectorAll('.kp-notebook-highlight')
).map((elem) => elem.innerText)
const lines = []
for (let i = 0; i < annotations.length; i++) {
lines.push(annotationsi)
lines.push(>${highlights[i]})
}
const print = (body) => {
const bom = new Uint8Array(0xef, 0xbb, 0xbf)
const url = URL.createObjectURL(
new Blob(bom, body, {
type: 'text/plain',
})
)
window.open(url)
}
print(lines.join('\n'))
})()