fyodor 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5de951472982ff3ff9ffaedc5f7c408bbef81440e17d93c9dae8dde987acc31
4
- data.tar.gz: 677311ac291eddb41c81f909f9eedc6e6468c9949337e92d115e9bc88497456c
3
+ metadata.gz: 1d4153e3ca5ba770ca3a10fcf7d1896aa51566521f5f4f560c2353d3fecdeee3
4
+ data.tar.gz: dae113570a5189571ad80efc677a28cc7a9ddc02205f0b5690f44add8838a957
5
5
  SHA512:
6
- metadata.gz: 97ff856f056f7b4cfbb00fca5f4444cb34077b0e6b136e8745e7d2b83cb36193656b6d5d0602c2b33618387b2eedf7122b658e66a56b6093914d0b20d54e6361
7
- data.tar.gz: 04e4a70680ebadd82842fafaa7394af6f7f7bcf52d3ede4dd7549a167ddd7cbed2f93a96e20fb18f2fe2933c1ff5d7fa2f5744af897c333cb3687f52aef0f5c4
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/page on each book (the clippings file is ordered by time).
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.
@@ -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 += "#{entry_text(entry)}\n\n"
56
- output += "<p style=\"text-align: right;\"><sup>#{entry_desc(entry)}</sup></p>\n\n"
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 entry_text(entry)
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
- # Markdown doesn't like multiline italics.
67
- "* <i>#{text(entry)}</i>"
66
+ "* _Note:_\n#{entry.text.strip}"
68
67
  else
69
- "* #{text(entry)}"
68
+ "* #{entry.text.strip}"
70
69
  end
71
70
  end
72
71
 
73
- def entry_desc(entry)
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
@@ -1,3 +1,3 @@
1
1
  module Fyodor
2
- VERSION = "0.2.3".freeze
2
+ VERSION = "0.2.4".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fyodor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael Cavalcanti