fyodor 0.2.0 → 0.2.1

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +39 -20
  3. data/lib/fyodor/version.rb +3 -0
  4. metadata +4 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e6be6cab905375c4a8adfb19399fa61bbdfdb15379544a9db64bff916c646d05
4
- data.tar.gz: bfc78376508d68b62f97659e819b4ddfe1f14cb8a512036bd5e8eabad2fdbb83
3
+ metadata.gz: f14c74a8744a5b6ecc59dbada1fb738913a965fac085dbdd6b1179fda4c4aaa1
4
+ data.tar.gz: dbdea2a6e45f4c8a90cf435cc879f5408838590308e56f540efbe566de8434dd
5
5
  SHA512:
6
- metadata.gz: 0db8ca71d80e837939ac0d40165eaade2b08671e816e2e3ca81ead4830f56efe88ede3849557b4355f307edf4e2119235ed15e8fc9f6fb4558d2a98d4cd4feff
7
- data.tar.gz: ef6eafa1e8006b73f0316cb60efb684846ba9c14cacaefcfc1851969be2302a3b303044d977e18f865f7231b6c558f5aedd064d99c7eb84e71e6660bf09b6911
6
+ metadata.gz: 7e98fb7efcd144c55cebf5608d63143d6fc4f0e7cf734a482f918d653aa33a8368193ac50c860001c78006f2fb6332a35daa5647746a87b8d268a34318cf6fac
7
+ data.tar.gz: d8fb7b506b1f911be98005be170e3db68c526a7490462eb213a0f1d132d21f88aecd5374e529730c914d1fa84a4080e81eed5ff824bd9114821e9be5e0cbf415
data/README.md CHANGED
@@ -2,28 +2,26 @@
2
2
 
3
3
  Convert your Amazon Kindle highlights, notes and bookmarks into markdown files.
4
4
 
5
+ ## What is Fyodor
5
6
 
6
- ## What is it about
7
- This application parses `My Clippings.txt` from your Kindle and generates a markdown file for each book/document, in the format `#{Author} - #{Title}.md`. This way, your annotations on the books you read are conveniently stored and easily managed.
8
-
9
- To read more about the motivation and what problem it tries to solve, [check this blog post](http://rafaelc.org/blog/export-all-your-kindle-highlights-and-notes/).
7
+ This application parses `My Clippings.txt` from your Kindle and generates a markdown file for each book/document, in the format `#{Author} - #{Title}.md`. This way, your annotations are conveniently stored and easily managed.
10
8
 
11
9
  [For samples of the output, click here.](samples/)
12
10
 
11
+ To read more about the motivation and what problem it tries to solve, [check this blog post](http://rafaelc.org/blog/export-all-your-kindle-highlights-and-notes/).
13
12
 
14
13
  ## Features
15
14
 
16
- * Supports all the type of entries in your clippings file: highlights, notes, clips and bookmarks.
17
- * Automatic removal of empty or duplicate entries (the clippings file can get a lot of those).
18
- * Orders your entries by location/page on each book (the clippings file is ordered by time).
19
- * Easily configurable for your language, allowing you to get all features and beautiful output.
20
- * 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.
21
- * Bookmarks are printed together and notes are formatted differently, for better visualization.
22
- * Output in a format that is clean and easy to edit/fiddle around: markdown.
15
+ - Supports all the type of entries in your clippings file: highlights, notes, clips and bookmarks.
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).
18
+ - Easily configurable for your language, allowing you to get all features and beautiful output.
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
+ - Bookmarks are printed together and notes are formatted differently, for better visualization.
21
+ - Output in a format that is clean and easy to edit/fiddle around: markdown.
23
22
 
24
23
  This program is based on the clippings file generated by Kindle 2019, but should work with other models.
25
24
 
26
-
27
25
  ## Installation
28
26
 
29
27
  Install Ruby and run:
@@ -32,28 +30,49 @@ Install Ruby and run:
32
30
  $ gem install fyodor
33
31
  ```
34
32
 
35
-
36
33
  ## Configuration
37
34
 
38
- If your Kindle is not in English, you should configure Fyodor so it knows how your `My Clippings.txt` calls some things (e.g. highlights, pages, etc). This is easily done in `parser` section of the config file, replacing the default English values.
35
+ Fyodor has an optional configuration file, which is used for the following features.
36
+
37
+ ### Languages
38
+
39
+ If your Kindle is not in English, you should tell Fyodor how some things are called by your `My Clippings.txt` (e.g. highlights, pages, etc). _Note that basic parsing should still work without configuration, but you won't take advantage of many features, resulting in a dirtier output._
39
40
 
40
- Note that basic parsing should still work without configuration, but you won't take advantage of many features, resulting in a dirtier output.
41
+ 1. Download the sample config to `~/.config/fyodor.toml` or `$XDG_CONFIG_HOME/fyodor.toml`:
41
42
 
42
- To configure the application, [copy the sample config](https://github.com/rccavalcanti/fyodor/blob/master/fyodor.toml.sample) and place it at `~/.config/fyodor.toml`. Edit it as you like.
43
+ ```
44
+ $ wget https://raw.githubusercontent.com/rccavalcanti/fyodor/master/fyodor.toml.sample -O ~/.config/fyodor.toml
45
+ ```
46
+
47
+ 2. Open both the configuration and your `My Clippings.txt` in your preferred editor. Change the values in the `[parser]` section to mirror what you get in `My Clippings.txt`.
48
+
49
+ For example, this is the configuration for Brazilian Portuguese:
50
+
51
+ ```
52
+ [parser]
53
+ highlight = "Seu destaque"
54
+ note = "Sua nota"
55
+ bookmark = "Seu marcador"
56
+ clip = "Recortar este artigo"
57
+ loc = "posição"
58
+ page = "página"
59
+ time = "Adicionado:"
60
+ ```
43
61
 
44
- The configuration file also allows you to set whether to print the time of each entry. On `[output]`, set `time` to `true` or `false`.
62
+ ### Showing the time
45
63
 
64
+ In the configuration file you can also set whether to print the time of each entry. On `[output]`, set `time` to `true` or `false`.
46
65
 
47
- ## Running
66
+ ## Usage
48
67
 
49
68
  ```
50
69
  $ fyodor CLIPPINGS_FILE [OUTPUT_DIR]
51
70
  ```
52
71
 
53
72
  Where:
54
- * `CLIPPINGS_FILE` is the path for `My Clippings.txt`.
55
- * `OUTPUT_DIR` is the directory to write the markdown files. If none supplied, it will be `fyodor_output` in the current directory.
56
73
 
74
+ - `CLIPPINGS_FILE` is the path for `My Clippings.txt`.
75
+ - `OUTPUT_DIR` is the directory to write the markdown files. If none is supplied, this will be `fyodor_output` under the current directory.
57
76
 
58
77
  ## LICENSE
59
78
 
@@ -0,0 +1,3 @@
1
+ module Fyodor
2
+ VERSION = "0.2.1".freeze
3
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fyodor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael Cavalcanti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-22 00:00:00.000000000 Z
11
+ date: 2020-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: toml
@@ -47,6 +47,7 @@ files:
47
47
  - lib/fyodor/output_writer.rb
48
48
  - lib/fyodor/stats_printer.rb
49
49
  - lib/fyodor/strings.rb
50
+ - lib/fyodor/version.rb
50
51
  homepage: https://github.com/rccavalcanti/fyodor
51
52
  licenses:
52
53
  - GPL-3.0-only
@@ -60,7 +61,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
60
61
  requirements:
61
62
  - - ">="
62
63
  - !ruby/object:Gem::Version
63
- version: '0'
64
+ version: '2.5'
64
65
  required_rubygems_version: !ruby/object:Gem::Requirement
65
66
  requirements:
66
67
  - - ">="