-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
64 lines (54 loc) · 1.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Kindle Highlights by @greduan</title>
<meta name="description" content="Kindle Highlights by @greduan">
<meta name="author" content="Eduardo Lavaque">
</head>
<body>
<h1>Kindle Highlights by @greduan</h1>
<p><a href="https://github.com/greduan/kindle-highlights">https://github.com/greduan/kindle-highlights</a></p>
<p>Instructions:</p>
<p>
<ol>
<li>
Visit <a href="https://read.amazon.co.jp/kp/notebook/" rel="noopener noreferrer">https://read.amazon.co.jp/kp/notebook/</a> (adjust for your Amazon domain).
</li>
<li>Choose your book.</li>
<li>
Select the contents of the whole page and copy them into your clipboard.
(Pro-tip use Ctrl-a/Cmd-a, or right click "Select All" and Ctrl-c/Cmd-c
or right click "Copy".)
</li>
<li>
Paste your clipboard into the text field.
</li>
</ol>
</p>
<div id="target"></div>
<script src="https://cdn.jsdelivr.net/npm/ractive"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lodash.min.js"></script>
<script id="template" type="text/ractive">
<label>
Paste the highlights page into here.
<textarea value="{{ pastedText }}" autofocus></textarea>
</label>
<hr />
{{#each books as book}}
<h2>{{book.title}}</h2>
{{#each book.batches as batch}}
<p>{{batch.extractedAt}}</p>
<ul>
{{#each batch.highlights as highlight}}
<li>{{highlight.text}}</li>
{{/each}}
</ul>
{{/each}}
{{else}}
<p>Book hasn't been loaded yet.</p>
{{/each}}
</script>
<script src="index.js"></script>
</body>
</html>