kita 0.5.3 → 0.5.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/CHANGELOG.md +13 -0
  4. data/Gemfile.lock +1 -1
  5. data/bin/kita +2 -2
  6. data/kita.gemspec +6 -2
  7. data/lib/kita.rb +27 -51
  8. data/lib/kita/audio.rb +1 -1
  9. data/lib/kita/hiragana.rb +1 -0
  10. data/lib/kita/katakana.rb +1 -0
  11. data/lib/kita/question.rb +23 -0
  12. data/lib/kita/version.rb +1 -1
  13. data/snap/gui/kita.desktop +10 -0
  14. data/snap/gui/kita.svg +137 -0
  15. data/snap/snapcraft.yaml +12 -17
  16. data/sounds//343/201/{202.ogg → 2021.ogg} +0 -0
  17. data/sounds//343/201/{204.ogg → 2041.ogg} +0 -0
  18. data/sounds//343/201/{206.ogg → 2061.ogg} +0 -0
  19. data/sounds//343/201/{210.ogg → 2101.ogg} +0 -0
  20. data/sounds//343/201/{212.ogg → 2121.ogg} +0 -0
  21. data/sounds//343/201/{213.ogg → 2131.ogg} +0 -0
  22. data/sounds//343/201/{214.ogg → 2141.ogg} +0 -0
  23. data/sounds//343/201/{215.ogg → 2151.ogg} +0 -0
  24. data/sounds//343/201/{216.ogg → 2161.ogg} +0 -0
  25. data/sounds//343/201/{217.ogg → 2171.ogg} +0 -0
  26. data/sounds//343/201/{220.ogg → 2201.ogg} +0 -0
  27. data/sounds//343/201/{221.ogg → 2211.ogg} +0 -0
  28. data/sounds//343/201/{222.ogg → 2221.ogg} +0 -0
  29. data/sounds//343/201/{223.ogg → 2231.ogg} +0 -0
  30. data/sounds//343/201/{224.ogg → 2241.ogg} +0 -0
  31. data/sounds//343/201/{225.ogg → 2251.ogg} +0 -0
  32. data/sounds//343/201/{226.ogg → 2261.ogg} +0 -0
  33. data/sounds//343/201/{227.ogg → 2271.ogg} +0 -0
  34. data/sounds//343/201/{230.ogg → 2301.ogg} +0 -0
  35. data/sounds//343/201/{231.ogg → 2311.ogg} +0 -0
  36. data/sounds//343/201/{232.ogg → 2321.ogg} +0 -0
  37. data/sounds//343/201/{233.ogg → 2331.ogg} +0 -0
  38. data/sounds//343/201/{234.ogg → 2341.ogg} +0 -0
  39. data/sounds//343/201/{235.ogg → 2351.ogg} +0 -0
  40. data/sounds//343/201/{236.ogg → 2361.ogg} +0 -0
  41. data/sounds//343/201/{237.ogg → 2371.ogg} +0 -0
  42. data/sounds//343/201/{240.ogg → 2401.ogg} +0 -0
  43. data/sounds//343/201/{241.ogg → 2411.ogg} +0 -0
  44. data/sounds//343/201/{242.ogg → 2421.ogg} +0 -0
  45. data/sounds//343/201/{244.ogg → 2441.ogg} +0 -0
  46. data/sounds//343/201/{245.ogg → 2451.ogg} +0 -0
  47. data/sounds//343/201/{246.ogg → 2461.ogg} +0 -0
  48. data/sounds//343/201/{247.ogg → 2471.ogg} +0 -0
  49. data/sounds//343/201/{250.ogg → 2501.ogg} +0 -0
  50. data/sounds//343/201/{251.ogg → 2511.ogg} +0 -0
  51. data/sounds//343/201/{252.ogg → 2521.ogg} +0 -0
  52. data/sounds//343/201/{253.ogg → 2531.ogg} +0 -0
  53. data/sounds//343/201/{254.ogg → 2541.ogg} +0 -0
  54. data/sounds//343/201/{255.ogg → 2551.ogg} +0 -0
  55. data/sounds//343/201/{256.ogg → 2561.ogg} +0 -0
  56. data/sounds//343/201/2571.ogg +0 -0
  57. data/sounds//343/201/2572.ogg +0 -0
  58. data/sounds//343/201/{260.ogg → 2601.ogg} +0 -0
  59. data/sounds//343/201/{261.ogg → 2611.ogg} +0 -0
  60. data/sounds//343/201/{262.ogg → 2621.ogg} +0 -0
  61. data/sounds//343/201/{263.ogg → 2631.ogg} +0 -0
  62. data/sounds//343/201/{264.ogg → 2641.ogg} +0 -0
  63. data/sounds//343/201/{265.ogg → 2651.ogg} +0 -0
  64. data/sounds//343/201/{266.ogg → 2661.ogg} +0 -0
  65. data/sounds//343/201/{267.ogg → 2671.ogg} +0 -0
  66. data/sounds//343/201/2701.ogg +0 -0
  67. data/sounds//343/201/2702.ogg +0 -0
  68. data/sounds//343/201/{271.ogg → 2711.ogg} +0 -0
  69. data/sounds//343/201/{272.ogg → 2721.ogg} +0 -0
  70. data/sounds//343/201/{273.ogg → 2731.ogg} +0 -0
  71. data/sounds//343/201/{274.ogg → 2741.ogg} +0 -0
  72. data/sounds//343/201/{275.ogg → 2751.ogg} +0 -0
  73. data/sounds//343/201/{276.ogg → 2761.ogg} +0 -0
  74. data/sounds//343/201/{277.ogg → 2771.ogg} +0 -0
  75. data/sounds//343/202/{200.ogg → 2001.ogg} +0 -0
  76. data/sounds//343/202/{201.ogg → 2011.ogg} +0 -0
  77. data/sounds//343/202/{202.ogg → 2021.ogg} +0 -0
  78. data/sounds//343/202/{204.ogg → 2041.ogg} +0 -0
  79. data/sounds//343/202/{206.ogg → 2061.ogg} +0 -0
  80. data/sounds//343/202/{210.ogg → 2101.ogg} +0 -0
  81. data/sounds//343/202/{211.ogg → 2111.ogg} +0 -0
  82. data/sounds//343/202/{212.ogg → 2121.ogg} +0 -0
  83. data/sounds//343/202/{213.ogg → 2131.ogg} +0 -0
  84. data/sounds//343/202/{214.ogg → 2141.ogg} +0 -0
  85. data/sounds//343/202/{215.ogg → 2151.ogg} +0 -0
  86. data/sounds//343/202/{217.ogg → 2171.ogg} +0 -0
  87. data/sounds//343/202/{222.ogg → 2221.ogg} +0 -0
  88. data/sounds//343/202/{223.ogg → 2231.ogg} +0 -0
  89. data/ui/builder.ui +23 -22
  90. metadata +80 -78
  91. data/sounds/he.ogg +0 -0
  92. data/sounds/he2.ogg +0 -0
  93. data/sounds/tofix.txt +0 -2
  94. data/sounds//343/201/257.ogg +0 -0
  95. data/sounds//343/201/270.ogg +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4490982ee2a55cd63614c60c73a8046bfd0b2d25fc8b14178941679de9b13cd2
4
- data.tar.gz: 375a7ddd27b6d00757efc0ad32814a1b7f1f6d04fd3c0e6849cb377d59b01d03
3
+ metadata.gz: e2587cd0c8afbec961b0a3323a1c6b136390ffba4de0950f97e749b613d090c2
4
+ data.tar.gz: 36590ce876e19db05a03d88bc508e8bcfbc6245a941d0a4c52acb956d67c4afc
5
5
  SHA512:
6
- metadata.gz: 4628f8eb832ff482c311e96334f48c4dea97f29e16b032ef60ac59a5f27247c42e17aef1853d6ed30a7658b1a0fa4a377249bac49e22c5645ff702112b721bfe
7
- data.tar.gz: 45b2216ff06714670eba51f67894e62632c13acdc88a4c12999e3399babe85b2ce4b66c04ae1962ba3f66839bf20ef3bd8fff7cca80137f74141012d48b2d289
6
+ metadata.gz: 397e143007adfe07eb99dc4ec01f6f7be68b37179dda85fd2a24f7b398be680d868c6540996d0c5c5fb5907873a2abba7167c0ef499ce3b57bd9a74de8da7c2e
7
+ data.tar.gz: bf44b7edcfd2e6f55bf6c189f110150f7176ebf0ffa61d15f43e83cfc5d8b78f36ad0d0ba0ecd28854c0ddd358f7188f231b08e5a9e0cf850f7e07c9d9a04000
data/.gitignore CHANGED
@@ -8,6 +8,7 @@ vendor
8
8
  /coverage/
9
9
  /doc/
10
10
  /pkg/
11
+ /prime/
11
12
  /spec/reports/
12
13
  /tmp/
13
14
 
@@ -9,6 +9,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
9
9
 
10
10
  ### Changed
11
11
 
12
+ ## 2020-06-02
13
+ ### Added
14
+ - Kita randomly selects between two different recordings for each kana
15
+
16
+ ## 2020-05-27
17
+ ### Changed
18
+ - Selecting an incorrect answer for a Katakana question, shows the correct Katakana, rather than
19
+ just repeating the Hiragana
20
+
21
+ ## 2020-05-25
22
+ ### Changed
23
+ - Improved sounds, neither へ nor は are pronounced in their particle form (e and wa).
24
+
12
25
  ## 2020-05-24
13
26
  ### Added
14
27
  - First release
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kita (0.5.2)
4
+ kita (0.5.7)
5
5
  config (~> 2.2)
6
6
  gir_ffi (~> 0.15.2)
7
7
  gstreamer (~> 3.4)
data/bin/kita CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- application_root_path = File.expand_path(__dir__)
5
- require File.join(application_root_path, '../lib/kita.rb')
4
+ RootPath = File.expand_path('../', __dir__)
5
+ require File.join(RootPath, '/lib/kita.rb')
6
6
 
7
7
  app = Kita::Application.new
8
8
 
@@ -10,9 +10,13 @@ Gem::Specification.new do |spec|
10
10
  spec.license = 'GPLv3+'
11
11
 
12
12
  spec.summary = 'A Japanese kana learning tool.'
13
- spec.description = 'A simple tool to help Japanese language learners with hiragana and katakana.'
13
+ spec.description = <<-DESC
14
+ A simple GTK3 app to help Japanese language learners with Hiragana and Katakana. It introduces
15
+ users to the sounds of the kana and teaches basic recognition of both writing systems.
16
+ DESC
17
+
14
18
  spec.homepage = 'https://www.danbishop.org'
15
- spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
19
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')
16
20
 
17
21
  spec.metadata['homepage_uri'] = spec.homepage
18
22
  spec.metadata['source_code_uri'] = 'https://github.com/danbishop/kita'
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'gtk3'
3
4
  require_relative 'kita/audio'
4
5
  require_relative 'kita/config'
5
- require_relative 'kita/hiragana'
6
- require_relative 'kita/katakana'
6
+ require_relative 'kita/question'
7
7
  require_relative 'kita/version'
8
8
 
9
9
  module Kita
@@ -11,20 +11,15 @@ module Kita
11
11
  class Application < Gtk::Application
12
12
  def initialize
13
13
  super 'uk.danbishop.kita', :handles_open
14
- builder_file = "#{File.expand_path(File.dirname(__dir__))}/ui/builder.ui"
15
14
  # Construct a Gtk::Builder instance and load our UI description
16
- @builder = Gtk::Builder.new(file: builder_file)
17
- # Initiate Hiragana class
18
- @hiragana = Hiragana.new
19
- # Initiate Katakana class
20
- @katakana = Katakana.new
21
- @types = [@hiragana]
15
+ @builder = Gtk::Builder.new(file: "#{File.expand_path(File.dirname(__dir__))}/ui/builder.ui")
16
+ @builder.connect_signals { |handler| method(handler) }
17
+ # Initiate Question class
18
+ @question = Question.new
22
19
  @button_signals = {}
23
20
  @sound = Audio.new
24
21
  new_question
25
22
  menu_setup
26
- setup_new_question_button
27
- setup_repeat_button
28
23
  build_main_window
29
24
  end
30
25
 
@@ -36,64 +31,44 @@ module Kita
36
31
  end
37
32
 
38
33
  def setup_about_box
39
- about_box = @builder.get_object('about_box')
34
+ about_box = @builder['about_box']
40
35
  about_box.version = VERSION
41
- about_button = @builder.get_object('menu_about')
42
- about_button.signal_connect('clicked') do
36
+ @builder['menu_about'].signal_connect('clicked') do
43
37
  about_box.run
44
38
  about_box.hide
45
39
  end
46
40
  end
47
41
 
48
- def setup_new_question_button
49
- new_question_button = @builder.get_object('new_question')
50
- new_question_button.signal_connect('clicked') do
51
- new_question
52
- end
53
- end
54
-
55
- def setup_repeat_button
56
- new_question_button = @builder.get_object('speak')
57
- new_question_button.signal_connect('clicked') do
58
- @sound.repeat
59
- end
42
+ def repeat_button_click
43
+ @sound.repeat
60
44
  end
61
45
 
62
46
  def setup_hiragana_switch
63
- @hiragana_switch = @builder.get_object('hiragana_switch')
64
- @hiragana_switch.signal_connect('notify::active') do
47
+ @builder['hiragana_switch'].signal_connect('notify::active') do
65
48
  toggle_hiragana
66
49
  end
67
50
  end
68
51
 
69
52
  def setup_katakana_switch
70
- @katakana_switch = @builder.get_object('katakana_switch')
71
- @katakana_switch.signal_connect('notify::active') do
53
+ @builder['katakana_switch'].signal_connect('notify::active') do
72
54
  toggle_katakana
73
55
  end
74
56
  end
75
57
 
76
58
  def setup_sound_switch
77
- @sound_switch = @builder.get_object('sound_switch')
78
- @sound_switch.signal_connect('notify::active') do
59
+ @builder['sound_switch'].signal_connect('notify::active') do
79
60
  toggle_sound
80
61
  end
81
62
  end
82
63
 
83
64
  def toggle_katakana
84
- # TODO: Switch this to using Settings
85
- @types = []
86
- @types << @hiragana if @hiragana_switch.active?
87
- @types << @katakana if @katakana_switch.active?
88
- (@hiragana_switch.set_active(true) && @types = [@hiragana]) if @types.empty?
65
+ Settings.katakana = !Settings.katakana
66
+ (@builder['hiragana_switch'].set_active(true) && Settings.hiragana = true) if !Settings.katakana && !Settings.hiragana
89
67
  end
90
68
 
91
69
  def toggle_hiragana
92
- # TODO: Switch this to using Settings
93
- @types = []
94
- @types << @hiragana if @hiragana_switch.active?
95
- @types << @katakana if @katakana_switch.active?
96
- (@katakana_switch.set_active(true) && @types = [@katakana]) if @types.empty?
70
+ Settings.hiragana = !Settings.hiragana
71
+ (@builder['katakana_switch'].set_active(true) && Settings.katakana = true) if !Settings.katakana && !Settings.hiragana
97
72
  end
98
73
 
99
74
  def toggle_sound
@@ -103,7 +78,7 @@ module Kita
103
78
  def build_main_window
104
79
  signal_connect :activate do
105
80
  # Connect signal handlers to the constructed widgets
106
- window = @builder.get_object('window')
81
+ window = @builder['window']
107
82
  window.signal_connect('destroy') { Gtk.main_quit }
108
83
  window.present
109
84
  end
@@ -111,20 +86,18 @@ module Kita
111
86
 
112
87
  def new_question
113
88
  reset_buttons
114
- question = @types.sample.question
115
- question_label = @builder.get_object('question')
116
- question_label.set_markup("<span font='72'>#{question[:question]}</span>")
89
+ question = @question.new_question
90
+ @builder['question'].set_markup("<span font='72'>#{question[:question]}</span>")
117
91
  buttons = %w[a b c d]
118
92
  correct_button(buttons, question)
119
93
  wrong_buttons(buttons, question)
120
- puts "Playing: #{question[:question].hiragana}"
121
- @sound.play(question[:question].hiragana) if Settings.speak
94
+ @sound.play("#{question[:question].hiragana}#{[1, 2].sample}") if Settings.speak
122
95
  end
123
96
 
124
97
  def correct_button(buttons, question)
125
98
  # Choose random letter and remove it from array
126
99
  correct = buttons.delete(buttons.sample)
127
- correct_button = @builder.get_object("answer_#{correct}")
100
+ correct_button = @builder["answer_#{correct}"]
128
101
  correct_button.set_label(question[:answer])
129
102
  correct_signal = correct_button.signal_connect('clicked') do
130
103
  new_question
@@ -144,14 +117,17 @@ module Kita
144
117
  def wrong_button_click(button)
145
118
  button.set_sensitive(false)
146
119
  label = button.child
147
- label.set_markup("<span color='#d40000'>#{button.label} #{button.label.hiragana}</span>")
120
+ correction = @question.type == 'hiragana' ? button.label.hiragana : button.label.katakana
121
+ label.set_markup(
122
+ "<span color='#d40000'>#{button.label} #{correction}</span>"
123
+ )
148
124
  end
149
125
 
150
126
  def reset_buttons
151
127
  return nil if @button_signals.empty?
152
128
 
153
129
  @button_signals.each do |letter, signal|
154
- button = @builder.get_object("answer_#{letter}")
130
+ button = @builder["answer_#{letter}"]
155
131
  button.signal_handler_disconnect(signal)
156
132
  button.set_sensitive(true)
157
133
  end
@@ -22,7 +22,7 @@ class Audio
22
22
 
23
23
  def play(uri)
24
24
  @playbin.stop
25
- @playbin.uri = Gst.filename_to_uri("#{@application_root_path}/sounds/#{uri}.ogg")
25
+ @playbin.uri = Gst.filename_to_uri("#{RootPath}/sounds/#{uri}.ogg")
26
26
  @playbin.play
27
27
  end
28
28
 
@@ -48,6 +48,7 @@ class Hiragana
48
48
  def build_question(chars)
49
49
  {
50
50
  question: chars[0],
51
+ type: 'hiragana',
51
52
  answer: chars[0].romaji,
52
53
  choices: [
53
54
  chars[1].romaji,
@@ -48,6 +48,7 @@ class Katakana
48
48
  def build_question(chars)
49
49
  {
50
50
  question: chars[0],
51
+ type: 'katakana',
51
52
  answer: chars[0].hiragana,
52
53
  choices: [
53
54
  chars[1].hiragana,
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'hiragana'
4
+ require_relative 'katakana'
5
+
6
+ # Question Class
7
+ class Question
8
+ attr_accessor :type
9
+
10
+ def initialize
11
+ @hiragana = Hiragana.new
12
+ @katakana = Katakana.new
13
+ end
14
+
15
+ def new_question
16
+ question_types = []
17
+ question_types.push @hiragana if Settings.hiragana
18
+ question_types.push @katakana if Settings.katakana
19
+ question = question_types.sample.question
20
+ @type = question[:type]
21
+ question
22
+ end
23
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kita
4
- VERSION = '0.5.3'
4
+ VERSION = '0.5.8'
5
5
  end
@@ -0,0 +1,10 @@
1
+ [Desktop Entry]
2
+ Name=Kita
3
+ GenericName=Kita
4
+ X-GNOME-FullName=Kita
5
+ Comment=Learn the Japanese kana
6
+ Keywords=Japanese;kana;hiragana;katakana;learn;
7
+ Exec=kita
8
+ Terminal=false
9
+ Type=Application
10
+ Icon=${SNAP}/meta/gui/kita.svg
@@ -0,0 +1,137 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+ xmlns:cc="http://creativecommons.org/ns#"
7
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+ xmlns:svg="http://www.w3.org/2000/svg"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+ width="50mm"
13
+ height="50mm"
14
+ viewBox="0 0 50 50"
15
+ version="1.1"
16
+ id="svg8"
17
+ inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
18
+ sodipodi:docname="kita.svg">
19
+ <defs
20
+ id="defs2">
21
+ <filter
22
+ style="color-interpolation-filters:sRGB"
23
+ id="filter987"
24
+ inkscape:label="filter0" />
25
+ <filter
26
+ style="color-interpolation-filters:sRGB"
27
+ inkscape:label="Noise Fill"
28
+ id="filter1667">
29
+ <feTurbulence
30
+ type="fractalNoise"
31
+ baseFrequency="0.02 0.04"
32
+ numOctaves="5"
33
+ seed="1"
34
+ result="turbulence"
35
+ id="feTurbulence1651" />
36
+ <feComposite
37
+ in="SourceGraphic"
38
+ in2="turbulence"
39
+ operator="in"
40
+ result="composite1"
41
+ id="feComposite1653" />
42
+ <feColorMatrix
43
+ values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 3 -1 "
44
+ result="color"
45
+ id="feColorMatrix1655" />
46
+ <feFlood
47
+ flood-opacity="1"
48
+ flood-color="rgb(21,40,57)"
49
+ result="flood"
50
+ id="feFlood1657" />
51
+ <feMerge
52
+ result="merge"
53
+ id="feMerge1663">
54
+ <feMergeNode
55
+ in="flood"
56
+ id="feMergeNode1659" />
57
+ <feMergeNode
58
+ in="color"
59
+ id="feMergeNode1661" />
60
+ </feMerge>
61
+ <feComposite
62
+ in2="SourceGraphic"
63
+ operator="in"
64
+ result="composite2"
65
+ id="feComposite1665" />
66
+ </filter>
67
+ </defs>
68
+ <sodipodi:namedview
69
+ id="base"
70
+ pagecolor="#000000"
71
+ bordercolor="#666666"
72
+ borderopacity="1.0"
73
+ inkscape:pageopacity="0"
74
+ inkscape:pageshadow="2"
75
+ inkscape:zoom="0.7"
76
+ inkscape:cx="337.63766"
77
+ inkscape:cy="-256.1795"
78
+ inkscape:document-units="mm"
79
+ inkscape:current-layer="layer1"
80
+ showgrid="false"
81
+ inkscape:window-width="3368"
82
+ inkscape:window-height="1376"
83
+ inkscape:window-x="72"
84
+ inkscape:window-y="27"
85
+ inkscape:window-maximized="1"
86
+ fit-margin-top="0"
87
+ fit-margin-left="0"
88
+ fit-margin-right="0"
89
+ fit-margin-bottom="0"
90
+ inkscape:pagecheckerboard="true" />
91
+ <metadata
92
+ id="metadata5">
93
+ <rdf:RDF>
94
+ <cc:Work
95
+ rdf:about="">
96
+ <dc:format>image/svg+xml</dc:format>
97
+ <dc:type
98
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
99
+ <dc:title></dc:title>
100
+ </cc:Work>
101
+ </rdf:RDF>
102
+ </metadata>
103
+ <g
104
+ inkscape:label="Layer 1"
105
+ inkscape:groupmode="layer"
106
+ id="layer1"
107
+ transform="translate(-25.905403,-105.02035)">
108
+ <text
109
+ xml:space="preserve"
110
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.58333302px;line-height:1.25;font-family:Ubuntu;-inkscape-font-specification:Ubuntu;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
111
+ x="46.869045"
112
+ y="115.57143"
113
+ id="text817"><tspan
114
+ sodipodi:role="line"
115
+ id="tspan815"
116
+ x="46.869045"
117
+ y="125.4403"
118
+ style="stroke-width:0.26458332" /></text>
119
+ <circle
120
+ style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
121
+ id="path3017"
122
+ cx="50.905403"
123
+ cy="130.02036"
124
+ r="25" />
125
+ <text
126
+ xml:space="preserve"
127
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.4786377px;line-height:1.25;font-family:Ubuntu;-inkscape-font-specification:Ubuntu;letter-spacing:0px;word-spacing:0px;fill:#d40000;fill-opacity:1;stroke:none;stroke-width:0.96196598"
128
+ x="31.512171"
129
+ y="144.46909"
130
+ id="text2913"><tspan
131
+ sodipodi:role="line"
132
+ id="tspan2911"
133
+ x="31.512171"
134
+ y="144.46909"
135
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:Ubuntu;-inkscape-font-specification:'Ubuntu Bold';fill:#d40000;stroke-width:0.96196598">北</tspan></text>
136
+ </g>
137
+ </svg>
@@ -1,10 +1,10 @@
1
1
  name: kita
2
- version: '0.5.3'
2
+ version: '0.5.7'
3
3
  summary: Japanese learning tool
4
4
  description: |
5
5
  A simple tool to help Japanese language learners.
6
6
 
7
- confinement: devmode
7
+ confinement: strict
8
8
  base: core18
9
9
  grade: stable
10
10
  license: GPL-3.0+
@@ -15,30 +15,25 @@ parts:
15
15
  plugin: ruby
16
16
  gems:
17
17
  - kita
18
- ruby-version: 2.7.0
18
+ ruby-version: 2.7.1
19
19
  stage-packages:
20
- - gobject-introspection
21
- - gir1.2-atk-1.0
22
- - gir1.2-atspi-2.0
23
- - gir1.2-freedesktop
24
- - gir1.2-gdkpixbuf-2.0
25
- - gir1.2-glib-2.0
26
- - gir1.2-gtk-3.0
27
- - gir1.2-pango-1.0
28
- - libcanberra-gtk3-0
29
20
  - libgstreamer1.0-0
30
- - libglib2.0-0
21
+ - gstreamer1.0-plugins-base
31
22
  - libgirepository-1.0-1
32
23
  - gir1.2-gstreamer-1.0
33
- - gstreamer1.0-plugins-base
34
24
 
35
25
  apps:
36
26
  kita:
37
27
  command: bin/kita
38
28
  extensions: [gnome-3-28]
39
29
  plugs:
40
- - desktop
41
- - wayland
42
30
  - audio-playback
43
- # - pulseaudio
31
+ slots:
32
+ - dbus-daemon
44
33
  common-id: uk.danbishop.kita
34
+
35
+ slots:
36
+ dbus-daemon:
37
+ interface: dbus
38
+ bus: session
39
+ name: uk.danbishop.kita
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
Binary file
Binary file
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
Binary file
Binary file
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <!-- Generated with glade 3.22.2
2
+ <!-- Generated with glade 3.22.2
3
3
 
4
4
  Copyright (C)
5
5
 
@@ -30,7 +30,6 @@ Author: Dan Bishop
30
30
  <property name="can_focus">False</property>
31
31
  <property name="type_hint">dialog</property>
32
32
  <property name="program_name">Kita</property>
33
- <property name="version"></property>
34
33
  <property name="copyright" translatable="yes">© 2020 Dan Bishop</property>
35
34
  <property name="comments" translatable="yes">A simple tool to help Japanese language learners.</property>
36
35
  <property name="website">danbishop.uk</property>
@@ -245,6 +244,7 @@ Author: Dan Bishop
245
244
  <property name="can_focus">True</property>
246
245
  <property name="receives_default">True</property>
247
246
  <property name="always_show_image">True</property>
247
+ <signal name="clicked" handler="new_question" swapped="no"/>
248
248
  </object>
249
249
  </child>
250
250
  <child>
@@ -252,6 +252,7 @@ Author: Dan Bishop
252
252
  <property name="visible">True</property>
253
253
  <property name="can_focus">True</property>
254
254
  <property name="receives_default">True</property>
255
+ <signal name="clicked" handler="repeat_button_click" swapped="no"/>
255
256
  <child>
256
257
  <object class="GtkImage">
257
258
  <property name="visible">True</property>
@@ -312,60 +313,60 @@ Author: Dan Bishop
312
313
  <property name="visible">True</property>
313
314
  <property name="can_focus">False</property>
314
315
  <child>
315
- <object class="GtkButton" id="answer_a">
316
- <property name="label">a</property>
316
+ <object class="GtkButton" id="answer_d">
317
+ <property name="label">d</property>
317
318
  <property name="visible">True</property>
318
319
  <property name="can_focus">False</property>
319
320
  <property name="receives_default">True</property>
320
321
  <property name="hexpand">True</property>
321
- <accelerator key="a" signal="clicked"/>
322
- <accelerator key="KP_1" signal="clicked"/>
323
- <accelerator key="1" signal="clicked"/>
322
+ <accelerator key="4" signal="clicked"/>
323
+ <accelerator key="KP_4" signal="clicked"/>
324
+ <accelerator key="f" signal="clicked"/>
324
325
  </object>
325
326
  <packing>
326
327
  <property name="position">0</property>
327
328
  </packing>
328
329
  </child>
329
330
  <child>
330
- <object class="GtkButton" id="answer_b">
331
- <property name="label">b</property>
331
+ <object class="GtkButton" id="answer_c">
332
+ <property name="label">c</property>
332
333
  <property name="visible">True</property>
333
334
  <property name="can_focus">False</property>
334
335
  <property name="receives_default">True</property>
335
336
  <property name="hexpand">True</property>
336
- <accelerator key="s" signal="clicked"/>
337
- <accelerator key="KP_2" signal="clicked"/>
338
- <accelerator key="2" signal="clicked"/>
337
+ <accelerator key="3" signal="clicked"/>
338
+ <accelerator key="KP_3" signal="clicked"/>
339
+ <accelerator key="d" signal="clicked"/>
339
340
  </object>
340
341
  <packing>
341
342
  <property name="position">0</property>
342
343
  </packing>
343
344
  </child>
344
345
  <child>
345
- <object class="GtkButton" id="answer_c">
346
- <property name="label">c</property>
346
+ <object class="GtkButton" id="answer_b">
347
+ <property name="label">b</property>
347
348
  <property name="visible">True</property>
348
349
  <property name="can_focus">False</property>
349
350
  <property name="receives_default">True</property>
350
351
  <property name="hexpand">True</property>
351
- <accelerator key="d" signal="clicked"/>
352
- <accelerator key="KP_3" signal="clicked"/>
353
- <accelerator key="3" signal="clicked"/>
352
+ <accelerator key="2" signal="clicked"/>
353
+ <accelerator key="KP_2" signal="clicked"/>
354
+ <accelerator key="s" signal="clicked"/>
354
355
  </object>
355
356
  <packing>
356
357
  <property name="position">0</property>
357
358
  </packing>
358
359
  </child>
359
360
  <child>
360
- <object class="GtkButton" id="answer_d">
361
- <property name="label">d</property>
361
+ <object class="GtkButton" id="answer_a">
362
+ <property name="label">a</property>
362
363
  <property name="visible">True</property>
363
364
  <property name="can_focus">False</property>
364
365
  <property name="receives_default">True</property>
365
366
  <property name="hexpand">True</property>
366
- <accelerator key="f" signal="clicked"/>
367
- <accelerator key="KP_4" signal="clicked"/>
368
- <accelerator key="4" signal="clicked"/>
367
+ <accelerator key="1" signal="clicked"/>
368
+ <accelerator key="KP_1" signal="clicked"/>
369
+ <accelerator key="a" signal="clicked"/>
369
370
  </object>
370
371
  <packing>
371
372
  <property name="position">0</property>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kita
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Bishop
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-24 00:00:00.000000000 Z
11
+ date: 2020-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: config
@@ -94,7 +94,9 @@ dependencies:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '3.4'
97
- description: A simple tool to help Japanese language learners with hiragana and katakana.
97
+ description: |2
98
+ A simple GTK3 app to help Japanese language learners with Hiragana and Katakana. It introduces
99
+ users to the sounds of the kana and teaches basic recognition of both writing systems.
98
100
  email:
99
101
  - d@nbishop.uk
100
102
  executables:
@@ -118,153 +120,153 @@ files:
118
120
  - lib/kita/config.rb
119
121
  - lib/kita/hiragana.rb
120
122
  - lib/kita/katakana.rb
123
+ - lib/kita/question.rb
121
124
  - lib/kita/version.rb
125
+ - snap/gui/kita.desktop
126
+ - snap/gui/kita.svg
122
127
  - snap/snapcraft.yaml
123
- - sounds/he.ogg
124
- - sounds/he2.ogg
125
- - sounds/tofix.txt
126
- - sounds/あ.ogg
128
+ - sounds/あ1.ogg
127
129
  - sounds/あ2.ogg
128
- - sounds/い.ogg
130
+ - sounds/い1.ogg
129
131
  - sounds/い2.ogg
130
- - sounds/う.ogg
132
+ - sounds/う1.ogg
131
133
  - sounds/う2.ogg
132
- - sounds/え.ogg
134
+ - sounds/え1.ogg
133
135
  - sounds/え2.ogg
134
- - sounds/お.ogg
136
+ - sounds/お1.ogg
135
137
  - sounds/お2.ogg
136
- - sounds/か.ogg
138
+ - sounds/か1.ogg
137
139
  - sounds/か2.ogg
138
- - sounds/が.ogg
140
+ - sounds/が1.ogg
139
141
  - sounds/が2.ogg
140
- - sounds/き.ogg
142
+ - sounds/き1.ogg
141
143
  - sounds/き2.ogg
142
- - sounds/ぎ.ogg
144
+ - sounds/ぎ1.ogg
143
145
  - sounds/ぎ2.ogg
144
- - sounds/く.ogg
146
+ - sounds/く1.ogg
145
147
  - sounds/く2.ogg
146
- - sounds/ぐ.ogg
148
+ - sounds/ぐ1.ogg
147
149
  - sounds/ぐ2.ogg
148
- - sounds/け.ogg
150
+ - sounds/け1.ogg
149
151
  - sounds/け2.ogg
150
- - sounds/げ.ogg
152
+ - sounds/げ1.ogg
151
153
  - sounds/げ2.ogg
152
- - sounds/こ.ogg
154
+ - sounds/こ1.ogg
153
155
  - sounds/こ2.ogg
154
156
  - sounds/これは北です.ogg
155
- - sounds/ご.ogg
157
+ - sounds/ご1.ogg
156
158
  - sounds/ご2.ogg
157
- - sounds/さ.ogg
159
+ - sounds/さ1.ogg
158
160
  - sounds/さ2.ogg
159
- - sounds/ざ.ogg
161
+ - sounds/ざ1.ogg
160
162
  - sounds/ざ2.ogg
161
- - sounds/し.ogg
163
+ - sounds/し1.ogg
162
164
  - sounds/し2.ogg
163
- - sounds/じ.ogg
165
+ - sounds/じ1.ogg
164
166
  - sounds/じ2.ogg
165
- - sounds/す.ogg
167
+ - sounds/す1.ogg
166
168
  - sounds/す2.ogg
167
- - sounds/ず.ogg
169
+ - sounds/ず1.ogg
168
170
  - sounds/ず2.ogg
169
- - sounds/せ.ogg
171
+ - sounds/せ1.ogg
170
172
  - sounds/せ2.ogg
171
- - sounds/ぜ.ogg
173
+ - sounds/ぜ1.ogg
172
174
  - sounds/ぜ2.ogg
173
- - sounds/そ.ogg
175
+ - sounds/そ1.ogg
174
176
  - sounds/そ2.ogg
175
- - sounds/ぞ.ogg
177
+ - sounds/ぞ1.ogg
176
178
  - sounds/ぞ2.ogg
177
- - sounds/た.ogg
179
+ - sounds/た1.ogg
178
180
  - sounds/た2.ogg
179
- - sounds/だ.ogg
181
+ - sounds/だ1.ogg
180
182
  - sounds/だ2.ogg
181
- - sounds/ち.ogg
183
+ - sounds/ち1.ogg
182
184
  - sounds/ち2.ogg
183
- - sounds/ぢ.ogg
185
+ - sounds/ぢ1.ogg
184
186
  - sounds/ぢ2.ogg
185
- - sounds/つ.ogg
187
+ - sounds/つ1.ogg
186
188
  - sounds/つ2.ogg
187
- - sounds/づ.ogg
189
+ - sounds/づ1.ogg
188
190
  - sounds/づ2.ogg
189
- - sounds/て.ogg
191
+ - sounds/て1.ogg
190
192
  - sounds/て2.ogg
191
- - sounds/で.ogg
193
+ - sounds/で1.ogg
192
194
  - sounds/で2.ogg
193
- - sounds/と.ogg
195
+ - sounds/と1.ogg
194
196
  - sounds/と2.ogg
195
- - sounds/ど.ogg
197
+ - sounds/ど1.ogg
196
198
  - sounds/ど2.ogg
197
- - sounds/な.ogg
199
+ - sounds/な1.ogg
198
200
  - sounds/な2.ogg
199
- - sounds/に.ogg
201
+ - sounds/に1.ogg
200
202
  - sounds/に2.ogg
201
- - sounds/ぬ.ogg
203
+ - sounds/ぬ1.ogg
202
204
  - sounds/ぬ2.ogg
203
- - sounds/ね.ogg
205
+ - sounds/ね1.ogg
204
206
  - sounds/ね2.ogg
205
- - sounds/の.ogg
207
+ - sounds/の1.ogg
206
208
  - sounds/の2.ogg
207
- - sounds/は.ogg
209
+ - sounds/は1.ogg
208
210
  - sounds/は2.ogg
209
- - sounds/ば.ogg
211
+ - sounds/ば1.ogg
210
212
  - sounds/ば2.ogg
211
- - sounds/ぱ.ogg
213
+ - sounds/ぱ1.ogg
212
214
  - sounds/ぱ2.ogg
213
- - sounds/ひ.ogg
215
+ - sounds/ひ1.ogg
214
216
  - sounds/ひ2.ogg
215
- - sounds/び.ogg
217
+ - sounds/び1.ogg
216
218
  - sounds/び2.ogg
217
- - sounds/ぴ.ogg
219
+ - sounds/ぴ1.ogg
218
220
  - sounds/ぴ2.ogg
219
- - sounds/ふ.ogg
221
+ - sounds/ふ1.ogg
220
222
  - sounds/ふ2.ogg
221
- - sounds/ぶ.ogg
223
+ - sounds/ぶ1.ogg
222
224
  - sounds/ぶ2.ogg
223
- - sounds/ぷ.ogg
225
+ - sounds/ぷ1.ogg
224
226
  - sounds/ぷ2.ogg
225
- - sounds/へ.ogg
227
+ - sounds/へ1.ogg
226
228
  - sounds/へ2.ogg
227
- - sounds/べ.ogg
229
+ - sounds/べ1.ogg
228
230
  - sounds/べ2.ogg
229
- - sounds/ぺ.ogg
231
+ - sounds/ぺ1.ogg
230
232
  - sounds/ぺ2.ogg
231
- - sounds/ほ.ogg
233
+ - sounds/ほ1.ogg
232
234
  - sounds/ほ2.ogg
233
- - sounds/ぼ.ogg
235
+ - sounds/ぼ1.ogg
234
236
  - sounds/ぼ2.ogg
235
- - sounds/ぽ.ogg
237
+ - sounds/ぽ1.ogg
236
238
  - sounds/ぽ2.ogg
237
- - sounds/ま.ogg
239
+ - sounds/ま1.ogg
238
240
  - sounds/ま2.ogg
239
- - sounds/み.ogg
241
+ - sounds/み1.ogg
240
242
  - sounds/み2.ogg
241
- - sounds/む.ogg
243
+ - sounds/む1.ogg
242
244
  - sounds/む2.ogg
243
- - sounds/め.ogg
245
+ - sounds/め1.ogg
244
246
  - sounds/め2.ogg
245
- - sounds/も.ogg
247
+ - sounds/も1.ogg
246
248
  - sounds/も2.ogg
247
- - sounds/や.ogg
249
+ - sounds/や1.ogg
248
250
  - sounds/や2.ogg
249
- - sounds/ゆ.ogg
251
+ - sounds/ゆ1.ogg
250
252
  - sounds/ゆ2.ogg
251
- - sounds/よ.ogg
253
+ - sounds/よ1.ogg
252
254
  - sounds/よ2.ogg
253
- - sounds/ら.ogg
255
+ - sounds/ら1.ogg
254
256
  - sounds/ら2.ogg
255
- - sounds/り.ogg
257
+ - sounds/り1.ogg
256
258
  - sounds/り2.ogg
257
- - sounds/る.ogg
259
+ - sounds/る1.ogg
258
260
  - sounds/る2.ogg
259
- - sounds/れ.ogg
261
+ - sounds/れ1.ogg
260
262
  - sounds/れ2.ogg
261
- - sounds/ろ.ogg
263
+ - sounds/ろ1.ogg
262
264
  - sounds/ろ2.ogg
263
- - sounds/わ.ogg
265
+ - sounds/わ1.ogg
264
266
  - sounds/わ2.ogg
265
- - sounds/を.ogg
267
+ - sounds/を1.ogg
266
268
  - sounds/を2.ogg
267
- - sounds/ん.ogg
269
+ - sounds/ん1.ogg
268
270
  - sounds/ん2.ogg
269
271
  - test-notify.rb
270
272
  - ui/builder.ui
@@ -284,7 +286,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
284
286
  requirements:
285
287
  - - ">="
286
288
  - !ruby/object:Gem::Version
287
- version: 2.3.0
289
+ version: 2.5.0
288
290
  required_rubygems_version: !ruby/object:Gem::Requirement
289
291
  requirements:
290
292
  - - ">="
Binary file
Binary file
@@ -1,2 +0,0 @@
1
- su
2
- he - pronounced as particle (e)
Binary file
Binary file