fyodor 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -1
- data/lib/fyodor/md_generator.rb +6 -12
- data/lib/fyodor/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d4153e3ca5ba770ca3a10fcf7d1896aa51566521f5f4f560c2353d3fecdeee3
|
4
|
+
data.tar.gz: dae113570a5189571ad80efc677a28cc7a9ddc02205f0b5690f44add8838a957
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fca692ec9b1f113476c1568b7beb45895e5cb3f1b7bfdbefa3076f70b44bc1b40a7bc51b46d84bd8c87eb7d384858048e5c2c9b64a11c23ebcfce8476f9de02
|
7
|
+
data.tar.gz: c453cd1c2cdaa59f18305ead427843313ba400450daead5db39f16090ec092e4e7395413f3a364028b69bf9d43fc164551a306146105a631610a077ddf075fc7
|
data/README.md
CHANGED
@@ -14,7 +14,7 @@ To read more about the motivation and what problem it tries to solve, [check thi
|
|
14
14
|
|
15
15
|
- Supports all the type of entries in your clippings file: highlights, notes, clips and bookmarks.
|
16
16
|
- Automatic removal of empty or duplicate entries (the clippings file can get a lot of those).
|
17
|
-
- Orders your entries by location
|
17
|
+
- Orders your entries by location on each book (the clippings file is ordered by time).
|
18
18
|
- Easily configurable for your language, allowing you to get all features and beautiful output.
|
19
19
|
- This software goes some length to be locale agnostic: basic parsing should work without configuration for any language. It should also work even if your clippings file has multiple locales.
|
20
20
|
- Bookmarks are printed together and notes are formatted differently, for better visualization.
|
@@ -30,6 +30,14 @@ Install Ruby and run:
|
|
30
30
|
$ gem install fyodor
|
31
31
|
```
|
32
32
|
|
33
|
+
## Updating
|
34
|
+
|
35
|
+
Run:
|
36
|
+
|
37
|
+
```
|
38
|
+
$ gem update fyodor
|
39
|
+
```
|
40
|
+
|
33
41
|
## Configuration
|
34
42
|
|
35
43
|
Fyodor has an optional configuration file, which is used for the following features.
|
data/lib/fyodor/md_generator.rb
CHANGED
@@ -52,25 +52,24 @@ module Fyodor
|
|
52
52
|
output = "---\n\n"
|
53
53
|
output += "## #{title}\n\n" unless title.nil?
|
54
54
|
entries.each do |entry|
|
55
|
-
output += "#{
|
56
|
-
output += "<p style=\"text-align: right;\"><sup>#{
|
55
|
+
output += "#{item_text(entry)}\n\n"
|
56
|
+
output += "<p style=\"text-align: right;\"><sup>#{item_desc(entry)}</sup></p>\n\n"
|
57
57
|
end
|
58
58
|
output
|
59
59
|
end
|
60
60
|
|
61
|
-
def
|
61
|
+
def item_text(entry)
|
62
62
|
case entry.type
|
63
63
|
when Entry::TYPE[:bookmark]
|
64
64
|
"* #{page(entry)}"
|
65
65
|
when Entry::TYPE[:note]
|
66
|
-
#
|
67
|
-
"* <i>#{text(entry)}</i>"
|
66
|
+
"* _Note:_\n#{entry.text.strip}"
|
68
67
|
else
|
69
|
-
"* #{text
|
68
|
+
"* #{entry.text.strip}"
|
70
69
|
end
|
71
70
|
end
|
72
71
|
|
73
|
-
def
|
72
|
+
def item_desc(entry)
|
74
73
|
return entry.desc unless entry.desc_parsed?
|
75
74
|
|
76
75
|
case entry.type
|
@@ -93,10 +92,5 @@ module Fyodor
|
|
93
92
|
def type(entry)
|
94
93
|
SINGULAR[entry.type]
|
95
94
|
end
|
96
|
-
|
97
|
-
def text(entry)
|
98
|
-
# Markdown needs no white space between text and formatters
|
99
|
-
entry.text.strip
|
100
|
-
end
|
101
95
|
end
|
102
96
|
end
|
data/lib/fyodor/version.rb
CHANGED