vocab-to-anki 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 82d67cb1f7a837ad1924c659a492fe111520aa7bf32b9d70d0b834dfbd20a182
4
+ data.tar.gz: 461b1bf9437304a5ee9a36741bf385b9b8f2dd1895eb2f20507fd1b5f16410b3
5
+ SHA512:
6
+ metadata.gz: c5311405ad02c11fe54ac6331550e9a201de717f1ad240a14246a387f0cdbe88a7f64c566cc7550dc399df9848f0aa8a34838a4daf107f3fedd932039ae781d8
7
+ data.tar.gz: 0d89bd613c3c8061cd6e26b8f105ac372e32830350aaf24b81e2b423d8ceb0ad3309154d83b2979c27d563e9a7160b8495a39cde4da1b5f99c994d83c60e1b7c
data/.env_sample ADDED
@@ -0,0 +1,5 @@
1
+ HEADLESS_MODE=true
2
+ MERRIAM_WEBSTER_API_KEY=
3
+ MERRIAM_WEBSTER_API_URL="https://www.dictionaryapi.com/api/v3/references/collegiate/json/"
4
+ SELENIUM_DRIVER=firefox
5
+ SOURCES="macmillan_dictionary google_translate merriam_webster"
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format progress
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,28 @@
1
+ require:
2
+ - rubocop-rake
3
+ - rubocop-rspec
4
+
5
+ AllCops:
6
+ TargetRubyVersion: 2.6
7
+
8
+ Naming/FileName:
9
+ Exclude:
10
+ - "lib/vocab-to-anki.rb"
11
+
12
+ Metrics/BlockLength:
13
+ Exclude:
14
+ - Guardfile
15
+
16
+ Style/Documentation:
17
+ Enabled: false
18
+
19
+ Style/StringLiterals:
20
+ Enabled: true
21
+ EnforcedStyle: double_quotes
22
+
23
+ Style/StringLiteralsInInterpolation:
24
+ Enabled: true
25
+ EnforcedStyle: double_quotes
26
+
27
+ Layout/LineLength:
28
+ Max: 120
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at bncvr@outlook.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in vocab-to-anki.gemspec
6
+ gemspec
7
+
8
+ gem "pry"
9
+ gem "rake", "~> 13.0"
10
+ gem "rspec", "~> 3.0"
11
+ gem "rubocop", "~> 1.21"
data/Gemfile.lock ADDED
@@ -0,0 +1,156 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ vocab-to-anki (0.2.0)
5
+ capybara-sessionkeeper (~> 0.2.0)
6
+ faraday (~> 2.7, >= 2.7.4)
7
+ rubocop-rake (~> 0.6.0)
8
+ rubocop-rspec (~> 2.20)
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ addressable (2.8.1)
14
+ public_suffix (>= 2.0.2, < 6.0)
15
+ ast (2.4.2)
16
+ capybara (3.39.0)
17
+ addressable
18
+ matrix
19
+ mini_mime (>= 0.1.3)
20
+ nokogiri (~> 1.8)
21
+ rack (>= 1.6.0)
22
+ rack-test (>= 0.6.3)
23
+ regexp_parser (>= 1.5, < 3.0)
24
+ xpath (~> 3.2)
25
+ capybara-sessionkeeper (0.2.0)
26
+ capybara
27
+ selenium-webdriver
28
+ coderay (1.1.3)
29
+ crack (0.4.5)
30
+ rexml
31
+ diff-lcs (1.5.0)
32
+ dotenv (2.8.1)
33
+ faraday (2.7.4)
34
+ faraday-net_http (>= 2.0, < 3.1)
35
+ ruby2_keywords (>= 0.0.4)
36
+ faraday-net_http (3.0.2)
37
+ ffi (1.15.5)
38
+ formatador (1.1.0)
39
+ guard (2.18.0)
40
+ formatador (>= 0.2.4)
41
+ listen (>= 2.7, < 4.0)
42
+ lumberjack (>= 1.0.12, < 2.0)
43
+ nenv (~> 0.1)
44
+ notiffany (~> 0.0)
45
+ pry (>= 0.13.0)
46
+ shellany (~> 0.0)
47
+ thor (>= 0.18.1)
48
+ guard-compat (1.2.1)
49
+ guard-rspec (4.7.3)
50
+ guard (~> 2.1)
51
+ guard-compat (~> 1.1)
52
+ rspec (>= 2.99.0, < 4.0)
53
+ hashdiff (1.0.1)
54
+ json (2.6.3)
55
+ listen (3.8.0)
56
+ rb-fsevent (~> 0.10, >= 0.10.3)
57
+ rb-inotify (~> 0.9, >= 0.9.10)
58
+ lumberjack (1.2.8)
59
+ matrix (0.4.2)
60
+ method_source (1.0.0)
61
+ mini_mime (1.1.2)
62
+ nenv (0.3.0)
63
+ nokogiri (1.14.3-x86_64-linux)
64
+ racc (~> 1.4)
65
+ notiffany (0.1.3)
66
+ nenv (~> 0.1)
67
+ shellany (~> 0.0)
68
+ parallel (1.22.1)
69
+ parser (3.2.0.0)
70
+ ast (~> 2.4.1)
71
+ pry (0.14.2)
72
+ coderay (~> 1.1)
73
+ method_source (~> 1.0)
74
+ public_suffix (5.0.1)
75
+ racc (1.6.2)
76
+ rack (3.0.7)
77
+ rack-test (2.1.0)
78
+ rack (>= 1.3)
79
+ rainbow (3.1.1)
80
+ rake (13.0.6)
81
+ rb-fsevent (0.11.2)
82
+ rb-inotify (0.10.1)
83
+ ffi (~> 1.0)
84
+ regexp_parser (2.6.2)
85
+ rexml (3.2.5)
86
+ rspec (3.12.0)
87
+ rspec-core (~> 3.12.0)
88
+ rspec-expectations (~> 3.12.0)
89
+ rspec-mocks (~> 3.12.0)
90
+ rspec-core (3.12.0)
91
+ rspec-support (~> 3.12.0)
92
+ rspec-expectations (3.12.2)
93
+ diff-lcs (>= 1.2.0, < 2.0)
94
+ rspec-support (~> 3.12.0)
95
+ rspec-mocks (3.12.3)
96
+ diff-lcs (>= 1.2.0, < 2.0)
97
+ rspec-support (~> 3.12.0)
98
+ rspec-support (3.12.0)
99
+ rubocop (1.43.0)
100
+ json (~> 2.3)
101
+ parallel (~> 1.10)
102
+ parser (>= 3.2.0.0)
103
+ rainbow (>= 2.2.2, < 4.0)
104
+ regexp_parser (>= 1.8, < 3.0)
105
+ rexml (>= 3.2.5, < 4.0)
106
+ rubocop-ast (>= 1.24.1, < 2.0)
107
+ ruby-progressbar (~> 1.7)
108
+ unicode-display_width (>= 2.4.0, < 3.0)
109
+ rubocop-ast (1.24.1)
110
+ parser (>= 3.1.1.0)
111
+ rubocop-capybara (2.18.0)
112
+ rubocop (~> 1.41)
113
+ rubocop-factory_bot (2.22.0)
114
+ rubocop (~> 1.33)
115
+ rubocop-rake (0.6.0)
116
+ rubocop (~> 1.0)
117
+ rubocop-rspec (2.22.0)
118
+ rubocop (~> 1.33)
119
+ rubocop-capybara (~> 2.17)
120
+ rubocop-factory_bot (~> 2.22)
121
+ ruby-progressbar (1.11.0)
122
+ ruby2_keywords (0.0.5)
123
+ rubyzip (2.3.2)
124
+ selenium-webdriver (4.9.0)
125
+ rexml (~> 3.2, >= 3.2.5)
126
+ rubyzip (>= 1.2.2, < 3.0)
127
+ websocket (~> 1.0)
128
+ shellany (0.0.1)
129
+ thor (1.2.1)
130
+ unicode-display_width (2.4.2)
131
+ vcr (6.1.0)
132
+ webmock (3.18.1)
133
+ addressable (>= 2.8.0)
134
+ crack (>= 0.3.2)
135
+ hashdiff (>= 0.4.0, < 2.0.0)
136
+ websocket (1.2.9)
137
+ xpath (3.2.0)
138
+ nokogiri (~> 1.8)
139
+
140
+ PLATFORMS
141
+ x86_64-linux
142
+
143
+ DEPENDENCIES
144
+ dotenv (~> 2.8, >= 2.8.1)
145
+ guard (~> 2.18)
146
+ guard-rspec (~> 4.7, >= 4.7.3)
147
+ pry
148
+ rake (~> 13.0)
149
+ rspec (~> 3.0)
150
+ rubocop (~> 1.21)
151
+ vcr (~> 6.1)
152
+ vocab-to-anki!
153
+ webmock (~> 3.18, >= 3.18.1)
154
+
155
+ BUNDLED WITH
156
+ 2.4.5
data/Guardfile ADDED
@@ -0,0 +1,72 @@
1
+ # frozen_string_literal: true
2
+
3
+ # A sample Guardfile
4
+ # More info at https://github.com/guard/guard#readme
5
+
6
+ ## Uncomment and set this to only include directories you want to watch
7
+ # directories %w(app lib config test spec features) \
8
+ # .select{|d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist")}
9
+
10
+ ## Note: if you are using the `directories` clause above and you are not
11
+ ## watching the project directory ('.'), then you will want to move
12
+ ## the Guardfile to a watched dir and symlink it back, e.g.
13
+ #
14
+ # $ mkdir config
15
+ # $ mv Guardfile config/
16
+ # $ ln -s config/Guardfile .
17
+ #
18
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
19
+
20
+ # NOTE: The cmd option is now required due to the increasing number of ways
21
+ # rspec may be run, below are examples of the most common uses.
22
+ # * bundler: 'bundle exec rspec'
23
+ # * bundler binstubs: 'bin/rspec'
24
+ # * spring: 'bin/rspec' (This will use spring if running and you have
25
+ # installed the spring binstubs per the docs)
26
+ # * zeus: 'zeus rspec' (requires the server to be started separately)
27
+ # * 'just' rspec: 'rspec'
28
+
29
+ guard :rspec, cmd: "bundle exec rspec" do
30
+ require "guard/rspec/dsl"
31
+ dsl = Guard::RSpec::Dsl.new(self)
32
+
33
+ # Feel free to open issues for suggestions and improvements
34
+
35
+ # RSpec files
36
+ rspec = dsl.rspec
37
+ watch(rspec.spec_helper) { rspec.spec_dir }
38
+ watch(rspec.spec_support) { rspec.spec_dir }
39
+ watch(rspec.spec_files)
40
+
41
+ # Ruby files
42
+ ruby = dsl.ruby
43
+ dsl.watch_spec_files_for(ruby.lib_files)
44
+
45
+ # Rails files
46
+ rails = dsl.rails(view_extensions: %w[erb haml slim])
47
+ dsl.watch_spec_files_for(rails.app_files)
48
+ dsl.watch_spec_files_for(rails.views)
49
+
50
+ watch(rails.controllers) do |m|
51
+ [
52
+ rspec.spec.call("routing/#{m[1]}_routing"),
53
+ rspec.spec.call("controllers/#{m[1]}_controller"),
54
+ rspec.spec.call("acceptance/#{m[1]}")
55
+ ]
56
+ end
57
+
58
+ # Rails config changes
59
+ watch(rails.spec_helper) { rspec.spec_dir }
60
+ watch(rails.routes) { "#{rspec.spec_dir}/routing" }
61
+ watch(rails.app_controller) { "#{rspec.spec_dir}/controllers" }
62
+
63
+ # Capybara features specs
64
+ watch(rails.view_dirs) { |m| rspec.spec.call("features/#{m[1]}") }
65
+ watch(rails.layouts) { |m| rspec.spec.call("features/#{m[1]}") }
66
+
67
+ # Turnip features and steps
68
+ watch(%r{^spec/acceptance/(.+)\.feature$})
69
+ watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m|
70
+ Dir[File.join("**/#{m[1]}.feature")][0] || "spec/acceptance"
71
+ end
72
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 Bianca Vieira
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # Anki Translator
2
+
3
+ Fetch translations and definitions and generate an Anki CSV file
4
+
5
+ [![Gem Version](https://badge.fury.io/rb/vocab-to-anki.svg)](https://badge.fury.io/rb/vocab-to-anki)
6
+
7
+ ## Installation
8
+
9
+ Install the gem and add to the application's Gemfile by executing:
10
+
11
+ ```sh
12
+ $ bundle add vocab-to-anki
13
+ ```
14
+
15
+ If bundler is not being used to manage dependencies, install the gem by executing:
16
+
17
+ ```sh
18
+ $ gem install vocab-to-anki
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ To generate CSV file with Basic Anki cards from a CSV input file containing `text` and `context`:
24
+
25
+ ```rb
26
+ helper = AnkiTranslator::CardsHelper.new
27
+ notes = helper.generate_csv_file
28
+ ```
29
+
30
+ ## Development
31
+
32
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
33
+
34
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
35
+
36
+ ## Contributing
37
+
38
+ Bug reports and pull requests are welcome on GitHub at https://github.com/b1anca/vocab-to-anki. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/b1anca/vocab-to-anki/blob/master/CODE_OF_CONDUCT.md).
39
+
40
+ ## License
41
+
42
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
43
+
44
+ ## Code of Conduct
45
+
46
+ Everyone interacting in the AnkiTranslator project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/b1anca/vocab-to-anki/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
@@ -0,0 +1,66 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.dictionaryapi.com/api/v3/references/collegiate/json/husky?key=<MERRIAM_WEBSTER_API_KEY>
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ User-Agent:
13
+ - Faraday v2.7.4
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - "*/*"
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Date:
24
+ - Wed, 26 Apr 2023 01:37:05 GMT
25
+ Content-Type:
26
+ - application/json; charset=utf-8
27
+ Content-Length:
28
+ - '4357'
29
+ Connection:
30
+ - keep-alive
31
+ Server:
32
+ - Apache
33
+ Cache-Control:
34
+ - max-age=86400, public
35
+ Pragma:
36
+ - cache
37
+ Vary:
38
+ - Accept-Encoding
39
+ Access-Control-Allow-Origin:
40
+ - "*"
41
+ body:
42
+ encoding: ASCII-8BIT
43
+ string: '[{"meta":{"id":"husky:1","uuid":"92cdaae3-5123-4971-b909-c81ddda40cd3","sort":"080314600","src":"collegiate","section":"alpha","stems":["huskier","huskiest","huskily","huskiness","huskinesses","husky"],"offensive":false},"hom":1,"hwi":{"hw":"hus*ky","prs":[{"mw":"\u02c8h\u0259-sk\u0113","sound":{"audio":"husky001","ref":"c","stat":"1"}}]},"fl":"adjective","ins":[{"if":"hus*ki*er"},{"ifc":"-est","if":"hus*ki*est"}],"def":[{"sseq":[[["sense",{"dt":[["text","{bc}hoarse
44
+ with or as if with emotion"]]}]]]}],"uros":[{"ure":"hus*ki*ly","prs":[{"mw":"\u02c8h\u0259-sk\u0259-l\u0113","sound":{"audio":"husky003","ref":"c","stat":"1"}}],"fl":"adverb"},{"ure":"hus*ki*ness","prs":[{"mw":"\u02c8h\u0259-sk\u0113-n\u0259s","sound":{"audio":"husky004","ref":"c","stat":"1"}}],"fl":"noun"}],"et":[["text","probably
45
+ from {it}husk{\/it} huskiness, from obsolete {it}husk{\/it} to have a dry
46
+ cough"]],"date":"circa 1722","shortdef":["hoarse with or as if with emotion"]},{"meta":{"id":"husky:2","uuid":"bd7d4829-f2cb-4e9a-9a2a-71b9c48e47a8","sort":"080314700","src":"collegiate","section":"alpha","stems":["huskies","husky"],"offensive":false},"hom":2,"hwi":{"hw":"hus*ky","prs":[{"mw":"\u02c8h\u0259-sk\u0113","sound":{"audio":"husky001","ref":"c","stat":"1"}}]},"fl":"noun","ins":[{"il":"plural","if":"hus*kies"}],"def":[{"sseq":[[["sense",{"sn":"1","dt":[["text","{bc}{sx|siberian
47
+ husky||}"]]}]],[["sense",{"sn":"2","dt":[["text","{bc}a heavy-coated working
48
+ dog of the New World arctic region"]]}]]]}],"et":[["text","shortening of {it}Huskemaw,
49
+ Uskemaw{\/it} Eskimo, from Cree {it}a\u0161kime\u00b7w{\/it}; akin to Montagnais
50
+ (Algonquian language of eastern Canada) {it}aiachkime8{\/it} Micmac, Eskimo
51
+ {ma}{mat|eskimo|}{\/ma}"]],"date":"1852{ds||2||}","shortdef":["siberian husky","a
52
+ heavy-coated working dog of the New World arctic region"]},{"meta":{"id":"husky:3","uuid":"778911e8-7c8e-4ca4-9d2b-0af0948595b4","sort":"080314800","src":"collegiate","section":"alpha","stems":["huskier","huskiest","huskily","huskiness","huskinesses","husky"],"offensive":false},"hom":3,"hwi":{"hw":"hus*ky","prs":[{"mw":"\u02c8h\u0259-sk\u0113","sound":{"audio":"husky001","ref":"c","stat":"1"}}]},"fl":"adjective","ins":[{"if":"hus*ki*er"},{"ifc":"-est","if":"hus*ki*est"}],"def":[{"sseq":[[["sense",{"sn":"1","dt":[["text","{bc}{sx|burly||},
53
+ {sx|robust||}"]]}]],[["sense",{"sn":"2","dt":[["text","{bc}{sx|large||}"]]}]]]}],"et":[["text","probably
54
+ from {et_link|husk:1|husk:1}"]],"date":"1869{ds||1||}","shortdef":["burly,
55
+ robust","large"]},{"meta":{"id":"husky:4","uuid":"a6daa108-d62e-4c2b-8308-ccd57f02f577","sort":"080314900","src":"collegiate","section":"alpha","stems":["huskies","husky"],"offensive":false},"hom":4,"hwi":{"hw":"hus*ky","prs":[{"mw":"\u02c8h\u0259-sk\u0113","sound":{"audio":"husky001","ref":"c","stat":"1"}}]},"fl":"noun","ins":[{"il":"plural","if":"hus*kies"}],"def":[{"sseq":[[["sense",{"dt":[["text","{bc}one
56
+ that is husky"]]}]]]}],"date":"1864","shortdef":["one that is husky"]},{"meta":{"id":"husky:5","uuid":"4652923b-b979-4f84-86d5-ce4d45b22327","sort":"080315000","src":"collegiate","section":"alpha","stems":["huskier","huskiest","huskily","huskiness","huskinesses","husky"],"offensive":false},"hom":5,"hwi":{"hw":"husky","prs":[{"mw":"\u02c8h\u0259-sk\u0113","sound":{"audio":"husky001","ref":"c","stat":"1"}}]},"fl":"adjective","ins":[{"if":"husk*i*er"},{"ifc":"-est","if":"husk*i*est"}],"def":[{"sseq":[[["sense",{"dt":[["text","{bc}resembling,
57
+ containing, or full of {a_link|husks}"]]}]]]}],"date":"1552","shortdef":["resembling,
58
+ containing, or full of husks"]},{"meta":{"id":"Siberian husky","uuid":"6b2f8008-711f-4ec9-99bc-0e45ea3967e2","sort":"194379300","src":"collegiate","section":"alpha","stems":["Siberian
59
+ huskies","Siberian husky"],"offensive":false},"hwi":{"hw":"Si*be*ri*an husky","prs":[{"mw":"s\u012b-\u02c8bir-\u0113-\u0259n-","sound":{"audio":"siberi01","ref":"c","stat":"1"}}]},"fl":"noun","def":[{"sseq":[[["sense",{"dt":[["text","{bc}any
60
+ of a breed of medium-sized thick-coated compact dogs that were developed in
61
+ Siberia for use as sled dogs and that have erect ears and a bushy tail"]]}]]]}],"art":{"artid":"siberian","capt":"Siberian
62
+ husky"},"date":"1930","shortdef":["any of a breed of medium-sized thick-coated
63
+ compact dogs that were developed in Siberia for use as sled dogs and that
64
+ have erect ears and a bushy tail"]}]'
65
+ recorded_at: Wed, 26 Apr 2023 01:37:05 GMT
66
+ recorded_with: VCR 6.1.0
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "csv"
4
+ require "faraday"
5
+ require "capybara/sessionkeeper"
6
+ require "selenium-webdriver"
7
+
8
+ require_relative "vocab_to_anki/cards_helper"
9
+ require_relative "vocab_to_anki/configuration"
10
+ require_relative "vocab_to_anki/references"
11
+ require_relative "vocab_to_anki/references/macmillan_dictionary"
12
+ require_relative "vocab_to_anki/references/google_translate"
13
+ require_relative "vocab_to_anki/references/merriam_webster"
14
+ require_relative "vocab_to_anki/version"
15
+
16
+ module AnkiTranslator
17
+ class Error < StandardError; end
18
+
19
+ Capybara.register_driver :chrome do |app|
20
+ options = Selenium::WebDriver::Chrome::Options.new
21
+ options.add_argument("--headless") if configuration.headless_mode
22
+ options.add_argument("--disable-gpu")
23
+ options.add_argument("--no-sandbox")
24
+
25
+ Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
26
+ end
27
+
28
+ Capybara.register_driver :firefox do |app|
29
+ options = Selenium::WebDriver::Firefox::Options.new
30
+ options.add_argument("--headless") if configuration.headless_mode
31
+
32
+ Capybara::Selenium::Driver.new(app, browser: :firefox, options: options)
33
+ end
34
+
35
+ class << self
36
+ attr_accessor :configuration
37
+
38
+ def configure
39
+ self.configuration ||= Configuration.new
40
+ yield(configuration)
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,130 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AnkiTranslator
4
+ class CardsHelper
5
+ DEFAULT_INPUT_FILE = "input.csv"
6
+ DEFAULT_OUTPUT_FILE = "output.csv"
7
+
8
+ Note = Struct.new(:text, :context, :definitions, :translations)
9
+
10
+ attr_reader :notes
11
+
12
+ def initialize(input_file = DEFAULT_INPUT_FILE, output_file = DEFAULT_OUTPUT_FILE)
13
+ @notes = parse(input_file)
14
+ @total = @notes.count
15
+ @output_file = output_file
16
+ end
17
+
18
+ def generate_csv_file(start_at = 0, end_at = total)
19
+ add_definitions_and_translations(start_at, end_at)
20
+ print_stats(notes[start_at..end_at])
21
+ cards = anki_cards(notes[start_at..end_at])
22
+ write(cards, "#{start_at}-#{end_at}-#{output_file}")
23
+ end
24
+
25
+ private
26
+
27
+ attr_writer :notes
28
+ attr_reader :references, :total, :output_file
29
+
30
+ def add_definitions_and_translations(start_at, end_at)
31
+ notes[start_at..end_at].each_with_index do |note, i|
32
+ print %(\n#{i + start_at}/#{end_at} "#{note.text}")
33
+ note.definitions, note.translations = References.definitions_and_translations(note.text)
34
+ end
35
+ end
36
+
37
+ def anki_cards(selected_notes)
38
+ selected_notes.each_with_object([]) do |note, arr|
39
+ next unless note.definitions&.any? || note.translations&.any?
40
+
41
+ back = parse_translations(note.translations) +
42
+ parse_definitions(note.definitions)
43
+ # parse_context(note.text, note.context)
44
+ # puts "\n-------------------#{note.text}-------------------\n#{back}"
45
+ arr.push({ front: note.text.downcase, back: back })
46
+ end
47
+ end
48
+ # TODO: cards preview? frontend?
49
+
50
+ def write(array, filename)
51
+ csv = CSV.generate do |row|
52
+ array.each { |hash| row << hash.values }
53
+ end
54
+ File.write(filename, csv)
55
+ filename
56
+ end
57
+
58
+ def print_stats(selected_notes)
59
+ default = { no_translation: 0, no_definition: [] }
60
+ counts_hash = References.source_names.each_with_object(default) { |sn, h| h[sn] = 0 }
61
+ puts "\n\n------ stats ------\n"
62
+ stats(selected_notes, counts_hash).each { |k, v| puts "#{k}: #{v}" }
63
+ end
64
+
65
+ def stats(selected_notes, counts_hash)
66
+ selected_notes.each do |c|
67
+ increment_no_translation(counts_hash, c)
68
+ add_no_definition(counts_hash, c)
69
+ increment_source_names(counts_hash, c)
70
+ end
71
+ counts_hash
72
+ end
73
+
74
+ def increment_no_translation(hash, note)
75
+ hash[:no_translation] += 1 unless note.translations&.any?
76
+ end
77
+
78
+ def add_no_definition(hash, note)
79
+ hash[:no_definition].push(note.text) unless note.definitions&.any?
80
+ end
81
+
82
+ def increment_source_names(hash, note)
83
+ References.source_names.each do |sn|
84
+ hash[sn] += 1 if note.definitions&.any? { |d| d.source == sn }
85
+ end
86
+ end
87
+
88
+ def parse_context(text, context)
89
+ return "" unless context
90
+
91
+ "#{context.gsub(text, "<strong>#{text}</strong>")}\n"
92
+ end
93
+
94
+ def parse_translations(translations)
95
+ return "" unless translations&.any?
96
+
97
+ "#{translations.map(&:text).join(", ")}\n"
98
+ end
99
+
100
+ def parse_definitions(definitions)
101
+ return "" unless definitions&.any?
102
+
103
+ definitions
104
+ .group_by(&:source)
105
+ .map { |_k, v| ul_elements(v) }
106
+ .join
107
+ end
108
+
109
+ def ul_elements(arr)
110
+ lis = arr.map do |d|
111
+ examples = d.examples&.any? ? %( "<em>#{d.examples.join(", ")}</em>") : ""
112
+ "<li>#{d.text}#{examples}</li>"
113
+ end
114
+ "<ul>#{lis.join}</ul>"
115
+ end
116
+
117
+ def parse(filename)
118
+ file = File.read(filename)
119
+ anki_file = filename.match?(/.txt$/)
120
+ if anki_file
121
+ puts "parsing Anki file..."
122
+ arr = CSV.parse(file, col_sep: "\t")
123
+ arr.map { |a| Note.new(text: a.first) }
124
+ else
125
+ arr = CSV.parse(file, headers: true, header_converters: :symbol)
126
+ arr.map { |h| Note.new(*h.values_at(*Note.members)) }
127
+ end
128
+ end
129
+ end
130
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AnkiTranslator
4
+ class Configuration
5
+ attr_accessor :merriam_webster_api_url, :merriam_webster_api_key, :selenium_driver, :headless_mode, :sources
6
+ end
7
+ end
@@ -0,0 +1,73 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AnkiTranslator
4
+ module References
5
+ class GoogleTranslate
6
+ URL = "https://translate.google.com/"
7
+ TARGET_LANGUAGE = "pt"
8
+
9
+ attr_reader :session, :name
10
+
11
+ def initialize
12
+ @name = :google_translate
13
+ @session = new_session
14
+ end
15
+
16
+ def fetch_definitions(term)
17
+ search(term)
18
+ return unless session.has_selector?("h3", text: "Definitions of ")
19
+
20
+ definitions = session.find("h3", text: "Definitions of ")&.all(:xpath, ".//..")&.first&.all("div[lang=en]")
21
+ a = []
22
+ a.push parse_definitions(definitions)
23
+ a.push translations
24
+ rescue Selenium::WebDriver::Error::StaleElementReferenceError
25
+ new_session
26
+ nil
27
+ end
28
+
29
+ private
30
+
31
+ attr_writer :session
32
+
33
+ def new_session
34
+ session = Capybara::Session.new(AnkiTranslator.configuration.selenium_driver)
35
+ session.visit("#{URL}?sl=en&tl=#{TARGET_LANGUAGE}&op=translate")
36
+ session
37
+ end
38
+
39
+ def search(term)
40
+ input_element = session.all("span[lang=en]").first
41
+ return search(term) if input_element.nil?
42
+
43
+ text_area = input_element.find("textarea")
44
+ text_area.set(term)
45
+ text_area.native.send_keys(:return)
46
+ sleep 3
47
+ end
48
+
49
+ def clear_search
50
+ search_element = session.all("span[lang=en]").first
51
+ return if search_element.nil?
52
+
53
+ search_element.find("textarea").set("")
54
+ end
55
+
56
+ def translations
57
+ return unless session.has_selector?("h3", text: "Translations of")
58
+
59
+ session.find("table").all("th[scope=row]")[0..2].map do |t|
60
+ Translation.new(text: t.text, source: name)
61
+ end
62
+ end
63
+
64
+ def parse_definitions(definitions)
65
+ (0...definitions.count).step(2).map do |i|
66
+ definition = definitions[i].text
67
+ quote = definitions[i + 1]&.text
68
+ Definition.new(text: definition, examples: [quote].compact, source: name)
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AnkiTranslator
4
+ module References
5
+ class MacmillanDictionary
6
+ URL = "https://www.macmillandictionary.com/"
7
+
8
+ attr_reader :session, :name
9
+
10
+ def initialize
11
+ @name = :macmillan
12
+ @session = Capybara::Session.new(AnkiTranslator.configuration.selenium_driver)
13
+ @session.visit(URL)
14
+ @session.click_button("I Accept")
15
+ end
16
+
17
+ def fetch_definitions(term)
18
+ search(term)
19
+ definitions = session.all("span", class: "DEFINITION")
20
+ return nil unless definitions&.any?
21
+
22
+ definitions.map do |d|
23
+ examples = find_examples(d)
24
+ Definition.new(text: d.text, examples: examples, source: name)
25
+ end
26
+ end
27
+
28
+ private
29
+
30
+ def search(term)
31
+ input = session.find("div", class: "search-container").find("input")
32
+ input.set(term)
33
+ input.native.send_keys(:return)
34
+ end
35
+
36
+ def find_examples(element)
37
+ parent = element.first(:xpath, ".//..")
38
+ if parent.has_selector?("p", class: "EXAMPLE")
39
+ parent.all("p", class: "EXAMPLE").map(&:text)
40
+ elsif parent.has_selector?("span", class: "EXAMPLE")
41
+ parent.all("span", class: "EXAMPLE").map(&:text)
42
+ elsif parent.has_selector?("div", class: "openEx")
43
+ parent.all("div", class: "openEx").map(&:text)
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AnkiTranslator
4
+ module References
5
+ class MerriamWebster
6
+ attr_reader :conn, :session, :name
7
+
8
+ def initialize
9
+ @name = :merriam_webster
10
+ params = { key: AnkiTranslator.configuration.merriam_webster_api_key }
11
+ headers = { "Content-Type" => "application/json" }
12
+ @conn = Faraday.new(url: AnkiTranslator.configuration.merriam_webster_api_url, params: params,
13
+ headers: headers) do |f|
14
+ f.response :json
15
+ end
16
+ end
17
+
18
+ def fetch_definitions(term)
19
+ definitions = search(term)
20
+ definitions.map do |d|
21
+ Definition.new(text: d, source: name)
22
+ end
23
+ end
24
+
25
+ private
26
+
27
+ def search(term)
28
+ escaped_term = CGI.escape(term)
29
+ body = conn.get(escaped_term).body.first
30
+ body.is_a?(Hash) && body.key?("shortdef") ? body["shortdef"] : []
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AnkiTranslator
4
+ module References
5
+ Translation = Struct.new(:text, :source)
6
+ Definition = Struct.new(:text, :examples, :source)
7
+
8
+ class << self
9
+ def definitions_and_translations(term)
10
+ definitions = sources.map { |s| s.fetch_definitions(term) }.flatten.compact
11
+ definitions.each_with_object([[], []]) do |d, arr|
12
+ d.is_a?(Definition) ? arr[0] << d : arr[1] << d
13
+ end
14
+ end
15
+
16
+ def source_names
17
+ sources.map(&:name)
18
+ end
19
+
20
+ private
21
+
22
+ def sources
23
+ source_options = {
24
+ macmillan_dictionary: MacmillanDictionary,
25
+ merriam_webster: MerriamWebster,
26
+ google_translate: GoogleTranslate
27
+ }.freeze
28
+
29
+ @sources ||= AnkiTranslator.configuration.sources.map do |s|
30
+ source_options.include?(s) ? source_options[s].new : nil
31
+ end.compact
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AnkiTranslator
4
+ VERSION = "0.2.0"
5
+ end
@@ -0,0 +1,4 @@
1
+ module AnkiTranslator
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,215 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vocab-to-anki
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
5
+ platform: ruby
6
+ authors:
7
+ - Bianca Vieira
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-05-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: capybara-sessionkeeper
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.2.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.2.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: faraday
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.7'
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 2.7.4
37
+ type: :runtime
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - "~>"
42
+ - !ruby/object:Gem::Version
43
+ version: '2.7'
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 2.7.4
47
+ - !ruby/object:Gem::Dependency
48
+ name: rubocop-rake
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: 0.6.0
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: 0.6.0
61
+ - !ruby/object:Gem::Dependency
62
+ name: rubocop-rspec
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '2.20'
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '2.20'
75
+ - !ruby/object:Gem::Dependency
76
+ name: dotenv
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '2.8'
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: 2.8.1
85
+ type: :development
86
+ prerelease: false
87
+ version_requirements: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - "~>"
90
+ - !ruby/object:Gem::Version
91
+ version: '2.8'
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: 2.8.1
95
+ - !ruby/object:Gem::Dependency
96
+ name: guard
97
+ requirement: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - "~>"
100
+ - !ruby/object:Gem::Version
101
+ version: '2.18'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - "~>"
107
+ - !ruby/object:Gem::Version
108
+ version: '2.18'
109
+ - !ruby/object:Gem::Dependency
110
+ name: guard-rspec
111
+ requirement: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - "~>"
114
+ - !ruby/object:Gem::Version
115
+ version: '4.7'
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: 4.7.3
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - "~>"
124
+ - !ruby/object:Gem::Version
125
+ version: '4.7'
126
+ - - ">="
127
+ - !ruby/object:Gem::Version
128
+ version: 4.7.3
129
+ - !ruby/object:Gem::Dependency
130
+ name: vcr
131
+ requirement: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - "~>"
134
+ - !ruby/object:Gem::Version
135
+ version: '6.1'
136
+ type: :development
137
+ prerelease: false
138
+ version_requirements: !ruby/object:Gem::Requirement
139
+ requirements:
140
+ - - "~>"
141
+ - !ruby/object:Gem::Version
142
+ version: '6.1'
143
+ - !ruby/object:Gem::Dependency
144
+ name: webmock
145
+ requirement: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - "~>"
148
+ - !ruby/object:Gem::Version
149
+ version: '3.18'
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: 3.18.1
153
+ type: :development
154
+ prerelease: false
155
+ version_requirements: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '3.18'
160
+ - - ">="
161
+ - !ruby/object:Gem::Version
162
+ version: 3.18.1
163
+ description: Fetch translations and definitions and generate an Anki CSV file
164
+ email:
165
+ - bncvr@outlook.com
166
+ executables: []
167
+ extensions: []
168
+ extra_rdoc_files: []
169
+ files:
170
+ - ".env_sample"
171
+ - ".rspec"
172
+ - ".rubocop.yml"
173
+ - CODE_OF_CONDUCT.md
174
+ - Gemfile
175
+ - Gemfile.lock
176
+ - Guardfile
177
+ - LICENSE.txt
178
+ - README.md
179
+ - Rakefile
180
+ - fixtures/vcr_cassettes/merriam_webster.yml
181
+ - lib/vocab-to-anki.rb
182
+ - lib/vocab_to_anki/cards_helper.rb
183
+ - lib/vocab_to_anki/configuration.rb
184
+ - lib/vocab_to_anki/references.rb
185
+ - lib/vocab_to_anki/references/google_translate.rb
186
+ - lib/vocab_to_anki/references/macmillan_dictionary.rb
187
+ - lib/vocab_to_anki/references/merriam_webster.rb
188
+ - lib/vocab_to_anki/version.rb
189
+ - sig/anki_translator.rbs
190
+ homepage: https://github.com/b1anca/vocab-to-anki
191
+ licenses:
192
+ - MIT
193
+ metadata:
194
+ homepage_uri: https://github.com/b1anca/vocab-to-anki
195
+ source_code_uri: https://github.com/b1anca/vocab-to-anki
196
+ post_install_message:
197
+ rdoc_options: []
198
+ require_paths:
199
+ - lib
200
+ required_ruby_version: !ruby/object:Gem::Requirement
201
+ requirements:
202
+ - - ">="
203
+ - !ruby/object:Gem::Version
204
+ version: 2.6.0
205
+ required_rubygems_version: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - ">="
208
+ - !ruby/object:Gem::Version
209
+ version: '0'
210
+ requirements: []
211
+ rubygems_version: 3.4.1
212
+ signing_key:
213
+ specification_version: 4
214
+ summary: Anki Translator
215
+ test_files: []