learn-japanese 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c326b07ac2656bdfcaf385898b70c589d8fa7571bf6adbcb4b7b369130dd51d5
4
- data.tar.gz: 1c19e75e31d96b4d3b9e11d349c8c24f0e2f0b71649193afe73f4cb02c192a04
3
+ metadata.gz: 5d63b5f7f7aafa4c249290ead834bad949693cb156bb25f537fba3c0665211ab
4
+ data.tar.gz: 758f37922314566ac2e95a944428bbd6180de32df90549fad521037548c72cdf
5
5
  SHA512:
6
- metadata.gz: 7e06b77a12fabb4667ecba8a4c681b7e1e4e6c3616d8c7ecfebc63da7cb7e21c1da8a2fade41a35d95549e9951276eca99ef358fc1e39156856eb663cacd688e
7
- data.tar.gz: e67a8f0828e1d1683d085e6ab6ebabf8af0882a2524d9f3e84442f06d10e0407b00e86d97dfbcdbe0c9e70b3a899749f735d35ae0ecc65dccbfa876b3082e32d
6
+ metadata.gz: 9cd09b6001f729cbf395e3bf10eadc7e3a8a69a80d3201c1ef41290d3df67b120071cff1435566f857cf2a5678a5df6a59fb53e1e14fb313582cb52f90d0b738
7
+ data.tar.gz: 6ad71c8b31c20cb5a7196968ef58bf6f32b3f7e719bf7ac3d33d0cb8e2e8f31126166ad80c16ddff7224c6b8fe4a183c2d99d7469b95ebaffb0f7466f9f6eb7d
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.7.5
data/README.md CHANGED
@@ -1,25 +1,32 @@
1
1
 
2
2
  [![Gem Version](https://badge.fury.io/rb/learn-japanese.svg)](https://badge.fury.io/rb/learn-japanese)
3
3
 
4
- # Aprender japonés
4
+ # Learn Japanese
5
5
 
6
- `learn-japanese` es un programa Ruby de licencia libre para ayudar a aprender el japonés.
7
- De momento, sólo se está empezando a implementar la funcionalidad para aprender el Silabario Hiragana, pero poco a poco irá creciendo a medida que yo mismo aprenda más japonés.
6
+ `learn-japanese` helps us to learn japanese.
8
7
 
9
- Para instalar el programa:
10
- 1. Debes tener Ruby instalado en tu equipo.
11
- 2. Abrir un terminal y ejecutar `sudo gem install learn-japanese`, para instalar la herramienta.
8
+ > WARNING: just only Hiragana (groups 1-4) for now.
12
9
 
13
- ## Modo de Uso
10
+ Every few week will be grow with more functions... at the same time I'm learning too... I hope.
14
11
 
15
- Abrir un terminal
16
- * Ejecutar `short-answer-game`, para el juego de preguntas donde debemos escribir la respuesta.
17
- * Ejecutar `choose-answer-game`, para el juego de preguntas donde debemos elegir la respuesta correcta.
18
- * `sounds-to-hiragana`, pasar sonidos a Hiragana.
12
+ ## Installation
19
13
 
20
- > NOTA: Para aumentar la dificultad haremos `short-answer-game NUMBER`, donde NUMBER será un valor entre 1-4 por el momento.
14
+ 1. Install Ruby on your system.
15
+ 2. Open a terminal and run `sudo gem install learn-japanese`, to install the Ruby gem.
21
16
 
22
- # Silabario japonés
17
+ ## Usage
18
+
19
+ * Open a terminal and run `learn-japanese`.
20
+
21
+ ## Functions or mini-games
22
+
23
+ | Function name | Description |
24
+ | ------------- | ---------------------------------------- |
25
+ | short-answer | Write the sound associated to the symbol |
26
+ | choose-answer | Choose the symbol associated to the sound |
27
+ | sound | Write the sounds and get the word |
28
+
29
+ # ANEXO
23
30
 
24
31
  ## Hiragana
25
32
 
@@ -3,4 +3,4 @@
3
3
  $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
4
4
  require 'learn-japanese/game/sound-game'
5
5
 
6
- SoundGame.loop_hiragana_game
6
+ SoundGame.run
@@ -21,4 +21,10 @@ class CLI < Thor
21
21
  def short_answer(level)
22
22
  LearnJapanese.short_answer(level.to_i)
23
23
  end
24
+
25
+ map ['so', '-so', '--sound', 'sound'] => 'sound'
26
+ desc 'sound', 'Write sounds and get the Hiragana'
27
+ def sound
28
+ LearnJapanese.sound
29
+ end
24
30
  end
@@ -1,19 +1,46 @@
1
1
  ---
2
- - sounds: e
3
- hiragana: え
4
- spanish: pintura
5
2
  - sounds: ái
6
3
  hiragana: あい
7
4
  spanish: amor
5
+ - sounds: áka
6
+ hiragana: あか
7
+ spanish: rojo)
8
8
  - sounds: áo
9
9
  hiragana: あお
10
10
  spanish: azul
11
+ - sounds: e
12
+ hiragana: え
13
+ spanish: pintura
14
+ - sounds: éki
15
+ hiragana: えき
16
+ spanish: estación de tren
11
17
  - sounds: ié
12
18
  hiragana: いえ
13
19
  spanish: casa
14
20
  - sounds: íi
15
21
  hiragana: いい
16
22
  spanish: bien
23
+ - sounds: i-e
24
+ hiragana: いいえ
25
+ spanish: 'no'
17
26
  - sounds: ué
18
27
  hiragana: うえ
19
28
  spanish: arriba
29
+ - sounds: ka
30
+ hiragana: か
31
+ spanish: mosquito
32
+ - sounds: kaó
33
+ hiragana: かお
34
+ spanish: cara
35
+ - sounds: ki
36
+ hiragana: き
37
+ spanish: árbol
38
+ - sounds: kíkai
39
+ hiragana: きかい
40
+ spanish: máquina, oportunidad
41
+ - sounds: áisatsu
42
+ hiragana: あいさつ
43
+ spanish: salud
44
+ - sounds: áisatsu wo suru
45
+ hiragana: あいさつをする
46
+ spanish: saludar
@@ -1,6 +1,7 @@
1
1
 
2
2
  require_relative '../hiragana'
3
3
  require_relative '../dictionary'
4
+ require_relative '../debug'
4
5
  require 'colorize'
5
6
 
6
7
  module SoundGame
@@ -18,16 +19,23 @@ module SoundGame
18
19
  word
19
20
  end
20
21
 
21
- def self.loop_hiragana_game
22
+ def self.run
23
+ Debug.puts_line
24
+ puts "SOUNDS TO HIRAGANA".light_cyan
25
+ puts "Example: a i => あい (amor - ái)".blue
26
+ Debug.puts_line
27
+
22
28
  sounds = "init"
23
29
  until sounds.empty?
24
- puts "[ Sounds to Hiragana ] Example: a i => あい (amor - ái)".white
25
- print " Write sounds ? ".light_yellow
26
- sounds = gets.chomp.split
30
+ print "\nWrite sounds ? ".light_yellow
31
+ sounds = STDIN.gets.chomp.split
27
32
  word = self.to_hiragana(sounds)
28
- puts " Hiragana => #{word["hiragana"]}".cyan
29
- puts " Spanish => #{word["spanish"]}".cyan
30
- puts " Pronounce => #{word["sounds"]}".cyan
33
+ print "Hiragana => ".white
34
+ puts word["hiragana"]
35
+ print "Spanish => ".white
36
+ puts word["spanish"]
37
+ print "Pronounce => ".white
38
+ puts word["sounds"]
31
39
  end
32
40
  end
33
41
 
@@ -1,6 +1,6 @@
1
1
 
2
2
  module LearnJapanese
3
- VERSION = '0.5.0'
3
+ VERSION = '0.6.0'
4
4
  NAME = 'learn-japanese'
5
5
  HOMEPAGE = 'https://github.com/dvarrui/learn-japanese'
6
6
  end
@@ -2,6 +2,7 @@
2
2
  require_relative 'learn-japanese/version'
3
3
  require_relative 'learn-japanese/game/choose-answer-game'
4
4
  require_relative 'learn-japanese/game/short-answer-game'
5
+ require_relative 'learn-japanese/game/sound-game'
5
6
 
6
7
  module LearnJapanese
7
8
 
@@ -25,4 +26,8 @@ module LearnJapanese
25
26
  ShortAnswerGame.show_help(level)
26
27
  ShortAnswerGame.new(level).run
27
28
  end
29
+
30
+ def self.sound
31
+ SoundGame.run
32
+ end
28
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: learn-japanese
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Vargas Ruiz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-18 00:00:00.000000000 Z
11
+ date: 2022-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -49,6 +49,7 @@ extensions: []
49
49
  extra_rdoc_files: []
50
50
  files:
51
51
  - ".gitignore"
52
+ - ".ruby-version"
52
53
  - Gemfile
53
54
  - LICENSE
54
55
  - README.md
@@ -89,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
90
  - !ruby/object:Gem::Version
90
91
  version: '0'
91
92
  requirements: []
92
- rubygems_version: 3.3.3
93
+ rubygems_version: 3.1.6
93
94
  signing_key:
94
95
  specification_version: 4
95
96
  summary: Learn Japanese (UNDER DEVELOPMENT)