kita 0.5.3 → 0.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +13 -0
- data/Gemfile.lock +1 -1
- data/bin/kita +2 -2
- data/kita.gemspec +6 -2
- data/lib/kita.rb +27 -51
- data/lib/kita/audio.rb +1 -1
- data/lib/kita/hiragana.rb +1 -0
- data/lib/kita/katakana.rb +1 -0
- data/lib/kita/question.rb +23 -0
- data/lib/kita/version.rb +1 -1
- data/snap/gui/kita.desktop +10 -0
- data/snap/gui/kita.svg +137 -0
- data/snap/snapcraft.yaml +12 -17
- data/sounds//343/201/{202.ogg → 2021.ogg} +0 -0
- data/sounds//343/201/{204.ogg → 2041.ogg} +0 -0
- data/sounds//343/201/{206.ogg → 2061.ogg} +0 -0
- data/sounds//343/201/{210.ogg → 2101.ogg} +0 -0
- data/sounds//343/201/{212.ogg → 2121.ogg} +0 -0
- data/sounds//343/201/{213.ogg → 2131.ogg} +0 -0
- data/sounds//343/201/{214.ogg → 2141.ogg} +0 -0
- data/sounds//343/201/{215.ogg → 2151.ogg} +0 -0
- data/sounds//343/201/{216.ogg → 2161.ogg} +0 -0
- data/sounds//343/201/{217.ogg → 2171.ogg} +0 -0
- data/sounds//343/201/{220.ogg → 2201.ogg} +0 -0
- data/sounds//343/201/{221.ogg → 2211.ogg} +0 -0
- data/sounds//343/201/{222.ogg → 2221.ogg} +0 -0
- data/sounds//343/201/{223.ogg → 2231.ogg} +0 -0
- data/sounds//343/201/{224.ogg → 2241.ogg} +0 -0
- data/sounds//343/201/{225.ogg → 2251.ogg} +0 -0
- data/sounds//343/201/{226.ogg → 2261.ogg} +0 -0
- data/sounds//343/201/{227.ogg → 2271.ogg} +0 -0
- data/sounds//343/201/{230.ogg → 2301.ogg} +0 -0
- data/sounds//343/201/{231.ogg → 2311.ogg} +0 -0
- data/sounds//343/201/{232.ogg → 2321.ogg} +0 -0
- data/sounds//343/201/{233.ogg → 2331.ogg} +0 -0
- data/sounds//343/201/{234.ogg → 2341.ogg} +0 -0
- data/sounds//343/201/{235.ogg → 2351.ogg} +0 -0
- data/sounds//343/201/{236.ogg → 2361.ogg} +0 -0
- data/sounds//343/201/{237.ogg → 2371.ogg} +0 -0
- data/sounds//343/201/{240.ogg → 2401.ogg} +0 -0
- data/sounds//343/201/{241.ogg → 2411.ogg} +0 -0
- data/sounds//343/201/{242.ogg → 2421.ogg} +0 -0
- data/sounds//343/201/{244.ogg → 2441.ogg} +0 -0
- data/sounds//343/201/{245.ogg → 2451.ogg} +0 -0
- data/sounds//343/201/{246.ogg → 2461.ogg} +0 -0
- data/sounds//343/201/{247.ogg → 2471.ogg} +0 -0
- data/sounds//343/201/{250.ogg → 2501.ogg} +0 -0
- data/sounds//343/201/{251.ogg → 2511.ogg} +0 -0
- data/sounds//343/201/{252.ogg → 2521.ogg} +0 -0
- data/sounds//343/201/{253.ogg → 2531.ogg} +0 -0
- data/sounds//343/201/{254.ogg → 2541.ogg} +0 -0
- data/sounds//343/201/{255.ogg → 2551.ogg} +0 -0
- data/sounds//343/201/{256.ogg → 2561.ogg} +0 -0
- data/sounds//343/201/2571.ogg +0 -0
- data/sounds//343/201/2572.ogg +0 -0
- data/sounds//343/201/{260.ogg → 2601.ogg} +0 -0
- data/sounds//343/201/{261.ogg → 2611.ogg} +0 -0
- data/sounds//343/201/{262.ogg → 2621.ogg} +0 -0
- data/sounds//343/201/{263.ogg → 2631.ogg} +0 -0
- data/sounds//343/201/{264.ogg → 2641.ogg} +0 -0
- data/sounds//343/201/{265.ogg → 2651.ogg} +0 -0
- data/sounds//343/201/{266.ogg → 2661.ogg} +0 -0
- data/sounds//343/201/{267.ogg → 2671.ogg} +0 -0
- data/sounds//343/201/2701.ogg +0 -0
- data/sounds//343/201/2702.ogg +0 -0
- data/sounds//343/201/{271.ogg → 2711.ogg} +0 -0
- data/sounds//343/201/{272.ogg → 2721.ogg} +0 -0
- data/sounds//343/201/{273.ogg → 2731.ogg} +0 -0
- data/sounds//343/201/{274.ogg → 2741.ogg} +0 -0
- data/sounds//343/201/{275.ogg → 2751.ogg} +0 -0
- data/sounds//343/201/{276.ogg → 2761.ogg} +0 -0
- data/sounds//343/201/{277.ogg → 2771.ogg} +0 -0
- data/sounds//343/202/{200.ogg → 2001.ogg} +0 -0
- data/sounds//343/202/{201.ogg → 2011.ogg} +0 -0
- data/sounds//343/202/{202.ogg → 2021.ogg} +0 -0
- data/sounds//343/202/{204.ogg → 2041.ogg} +0 -0
- data/sounds//343/202/{206.ogg → 2061.ogg} +0 -0
- data/sounds//343/202/{210.ogg → 2101.ogg} +0 -0
- data/sounds//343/202/{211.ogg → 2111.ogg} +0 -0
- data/sounds//343/202/{212.ogg → 2121.ogg} +0 -0
- data/sounds//343/202/{213.ogg → 2131.ogg} +0 -0
- data/sounds//343/202/{214.ogg → 2141.ogg} +0 -0
- data/sounds//343/202/{215.ogg → 2151.ogg} +0 -0
- data/sounds//343/202/{217.ogg → 2171.ogg} +0 -0
- data/sounds//343/202/{222.ogg → 2221.ogg} +0 -0
- data/sounds//343/202/{223.ogg → 2231.ogg} +0 -0
- data/ui/builder.ui +23 -22
- metadata +80 -78
- data/sounds/he.ogg +0 -0
- data/sounds/he2.ogg +0 -0
- data/sounds/tofix.txt +0 -2
- data/sounds//343/201/257.ogg +0 -0
- data/sounds//343/201/270.ogg +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2587cd0c8afbec961b0a3323a1c6b136390ffba4de0950f97e749b613d090c2
|
4
|
+
data.tar.gz: 36590ce876e19db05a03d88bc508e8bcfbc6245a941d0a4c52acb956d67c4afc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 397e143007adfe07eb99dc4ec01f6f7be68b37179dda85fd2a24f7b398be680d868c6540996d0c5c5fb5907873a2abba7167c0ef499ce3b57bd9a74de8da7c2e
|
7
|
+
data.tar.gz: bf44b7edcfd2e6f55bf6c189f110150f7176ebf0ffa61d15f43e83cfc5d8b78f36ad0d0ba0ecd28854c0ddd358f7188f231b08e5a9e0cf850f7e07c9d9a04000
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -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
|
data/Gemfile.lock
CHANGED
data/bin/kita
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
|
5
|
-
require File.join(
|
4
|
+
RootPath = File.expand_path('../', __dir__)
|
5
|
+
require File.join(RootPath, '/lib/kita.rb')
|
6
6
|
|
7
7
|
app = Kita::Application.new
|
8
8
|
|
data/kita.gemspec
CHANGED
@@ -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 =
|
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.
|
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'
|
data/lib/kita.rb
CHANGED
@@ -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/
|
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:
|
17
|
-
|
18
|
-
|
19
|
-
|
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
|
34
|
+
about_box = @builder['about_box']
|
40
35
|
about_box.version = VERSION
|
41
|
-
|
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
|
49
|
-
|
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
|
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
|
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
|
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
|
-
|
85
|
-
@
|
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
|
-
|
93
|
-
@
|
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
|
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 = @
|
115
|
-
|
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
|
-
|
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
|
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
|
-
|
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
|
130
|
+
button = @builder["answer_#{letter}"]
|
155
131
|
button.signal_handler_disconnect(signal)
|
156
132
|
button.set_sensitive(true)
|
157
133
|
end
|
data/lib/kita/audio.rb
CHANGED
data/lib/kita/hiragana.rb
CHANGED
data/lib/kita/katakana.rb
CHANGED
@@ -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
|
data/lib/kita/version.rb
CHANGED
data/snap/gui/kita.svg
ADDED
@@ -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>
|
data/snap/snapcraft.yaml
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
name: kita
|
2
|
-
version: '0.5.
|
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:
|
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.
|
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
|
-
-
|
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
|
-
|
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
|
data/sounds//343/201/2572.ogg
CHANGED
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
|
data/sounds//343/201/2702.ogg
CHANGED
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
|
data/ui/builder.ui
CHANGED
@@ -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="
|
316
|
-
<property name="label">
|
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="
|
322
|
-
<accelerator key="
|
323
|
-
<accelerator key="
|
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="
|
331
|
-
<property name="label">
|
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="
|
337
|
-
<accelerator key="
|
338
|
-
<accelerator key="
|
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="
|
346
|
-
<property name="label">
|
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="
|
352
|
-
<accelerator key="
|
353
|
-
<accelerator key="
|
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="
|
361
|
-
<property name="label">
|
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="
|
367
|
-
<accelerator key="
|
368
|
-
<accelerator key="
|
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.
|
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-
|
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:
|
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
|
124
|
-
- sounds/he2.ogg
|
125
|
-
- sounds/tofix.txt
|
126
|
-
- sounds/あ.ogg
|
128
|
+
- sounds/あ1.ogg
|
127
129
|
- sounds/あ2.ogg
|
128
|
-
- sounds
|
130
|
+
- sounds/い1.ogg
|
129
131
|
- sounds/い2.ogg
|
130
|
-
- sounds
|
132
|
+
- sounds/う1.ogg
|
131
133
|
- sounds/う2.ogg
|
132
|
-
- sounds
|
134
|
+
- sounds/え1.ogg
|
133
135
|
- sounds/え2.ogg
|
134
|
-
- sounds
|
136
|
+
- sounds/お1.ogg
|
135
137
|
- sounds/お2.ogg
|
136
|
-
- sounds
|
138
|
+
- sounds/か1.ogg
|
137
139
|
- sounds/か2.ogg
|
138
|
-
- sounds
|
140
|
+
- sounds/が1.ogg
|
139
141
|
- sounds/が2.ogg
|
140
|
-
- sounds
|
142
|
+
- sounds/き1.ogg
|
141
143
|
- sounds/き2.ogg
|
142
|
-
- sounds
|
144
|
+
- sounds/ぎ1.ogg
|
143
145
|
- sounds/ぎ2.ogg
|
144
|
-
- sounds
|
146
|
+
- sounds/く1.ogg
|
145
147
|
- sounds/く2.ogg
|
146
|
-
- sounds
|
148
|
+
- sounds/ぐ1.ogg
|
147
149
|
- sounds/ぐ2.ogg
|
148
|
-
- sounds
|
150
|
+
- sounds/け1.ogg
|
149
151
|
- sounds/け2.ogg
|
150
|
-
- sounds
|
152
|
+
- sounds/げ1.ogg
|
151
153
|
- sounds/げ2.ogg
|
152
|
-
- sounds
|
154
|
+
- sounds/こ1.ogg
|
153
155
|
- sounds/こ2.ogg
|
154
156
|
- sounds/これは北です.ogg
|
155
|
-
- sounds
|
157
|
+
- sounds/ご1.ogg
|
156
158
|
- sounds/ご2.ogg
|
157
|
-
- sounds
|
159
|
+
- sounds/さ1.ogg
|
158
160
|
- sounds/さ2.ogg
|
159
|
-
- sounds
|
161
|
+
- sounds/ざ1.ogg
|
160
162
|
- sounds/ざ2.ogg
|
161
|
-
- sounds
|
163
|
+
- sounds/し1.ogg
|
162
164
|
- sounds/し2.ogg
|
163
|
-
- sounds
|
165
|
+
- sounds/じ1.ogg
|
164
166
|
- sounds/じ2.ogg
|
165
|
-
- sounds
|
167
|
+
- sounds/す1.ogg
|
166
168
|
- sounds/す2.ogg
|
167
|
-
- sounds
|
169
|
+
- sounds/ず1.ogg
|
168
170
|
- sounds/ず2.ogg
|
169
|
-
- sounds
|
171
|
+
- sounds/せ1.ogg
|
170
172
|
- sounds/せ2.ogg
|
171
|
-
- sounds
|
173
|
+
- sounds/ぜ1.ogg
|
172
174
|
- sounds/ぜ2.ogg
|
173
|
-
- sounds
|
175
|
+
- sounds/そ1.ogg
|
174
176
|
- sounds/そ2.ogg
|
175
|
-
- sounds
|
177
|
+
- sounds/ぞ1.ogg
|
176
178
|
- sounds/ぞ2.ogg
|
177
|
-
- sounds
|
179
|
+
- sounds/た1.ogg
|
178
180
|
- sounds/た2.ogg
|
179
|
-
- sounds
|
181
|
+
- sounds/だ1.ogg
|
180
182
|
- sounds/だ2.ogg
|
181
|
-
- sounds
|
183
|
+
- sounds/ち1.ogg
|
182
184
|
- sounds/ち2.ogg
|
183
|
-
- sounds
|
185
|
+
- sounds/ぢ1.ogg
|
184
186
|
- sounds/ぢ2.ogg
|
185
|
-
- sounds
|
187
|
+
- sounds/つ1.ogg
|
186
188
|
- sounds/つ2.ogg
|
187
|
-
- sounds
|
189
|
+
- sounds/づ1.ogg
|
188
190
|
- sounds/づ2.ogg
|
189
|
-
- sounds
|
191
|
+
- sounds/て1.ogg
|
190
192
|
- sounds/て2.ogg
|
191
|
-
- sounds
|
193
|
+
- sounds/で1.ogg
|
192
194
|
- sounds/で2.ogg
|
193
|
-
- sounds
|
195
|
+
- sounds/と1.ogg
|
194
196
|
- sounds/と2.ogg
|
195
|
-
- sounds
|
197
|
+
- sounds/ど1.ogg
|
196
198
|
- sounds/ど2.ogg
|
197
|
-
- sounds
|
199
|
+
- sounds/な1.ogg
|
198
200
|
- sounds/な2.ogg
|
199
|
-
- sounds
|
201
|
+
- sounds/に1.ogg
|
200
202
|
- sounds/に2.ogg
|
201
|
-
- sounds
|
203
|
+
- sounds/ぬ1.ogg
|
202
204
|
- sounds/ぬ2.ogg
|
203
|
-
- sounds
|
205
|
+
- sounds/ね1.ogg
|
204
206
|
- sounds/ね2.ogg
|
205
|
-
- sounds
|
207
|
+
- sounds/の1.ogg
|
206
208
|
- sounds/の2.ogg
|
207
|
-
- sounds
|
209
|
+
- sounds/は1.ogg
|
208
210
|
- sounds/は2.ogg
|
209
|
-
- sounds
|
211
|
+
- sounds/ば1.ogg
|
210
212
|
- sounds/ば2.ogg
|
211
|
-
- sounds
|
213
|
+
- sounds/ぱ1.ogg
|
212
214
|
- sounds/ぱ2.ogg
|
213
|
-
- sounds
|
215
|
+
- sounds/ひ1.ogg
|
214
216
|
- sounds/ひ2.ogg
|
215
|
-
- sounds
|
217
|
+
- sounds/び1.ogg
|
216
218
|
- sounds/び2.ogg
|
217
|
-
- sounds
|
219
|
+
- sounds/ぴ1.ogg
|
218
220
|
- sounds/ぴ2.ogg
|
219
|
-
- sounds
|
221
|
+
- sounds/ふ1.ogg
|
220
222
|
- sounds/ふ2.ogg
|
221
|
-
- sounds
|
223
|
+
- sounds/ぶ1.ogg
|
222
224
|
- sounds/ぶ2.ogg
|
223
|
-
- sounds
|
225
|
+
- sounds/ぷ1.ogg
|
224
226
|
- sounds/ぷ2.ogg
|
225
|
-
- sounds
|
227
|
+
- sounds/へ1.ogg
|
226
228
|
- sounds/へ2.ogg
|
227
|
-
- sounds
|
229
|
+
- sounds/べ1.ogg
|
228
230
|
- sounds/べ2.ogg
|
229
|
-
- sounds
|
231
|
+
- sounds/ぺ1.ogg
|
230
232
|
- sounds/ぺ2.ogg
|
231
|
-
- sounds
|
233
|
+
- sounds/ほ1.ogg
|
232
234
|
- sounds/ほ2.ogg
|
233
|
-
- sounds
|
235
|
+
- sounds/ぼ1.ogg
|
234
236
|
- sounds/ぼ2.ogg
|
235
|
-
- sounds
|
237
|
+
- sounds/ぽ1.ogg
|
236
238
|
- sounds/ぽ2.ogg
|
237
|
-
- sounds
|
239
|
+
- sounds/ま1.ogg
|
238
240
|
- sounds/ま2.ogg
|
239
|
-
- sounds
|
241
|
+
- sounds/み1.ogg
|
240
242
|
- sounds/み2.ogg
|
241
|
-
- sounds
|
243
|
+
- sounds/む1.ogg
|
242
244
|
- sounds/む2.ogg
|
243
|
-
- sounds
|
245
|
+
- sounds/め1.ogg
|
244
246
|
- sounds/め2.ogg
|
245
|
-
- sounds
|
247
|
+
- sounds/も1.ogg
|
246
248
|
- sounds/も2.ogg
|
247
|
-
- sounds
|
249
|
+
- sounds/や1.ogg
|
248
250
|
- sounds/や2.ogg
|
249
|
-
- sounds
|
251
|
+
- sounds/ゆ1.ogg
|
250
252
|
- sounds/ゆ2.ogg
|
251
|
-
- sounds
|
253
|
+
- sounds/よ1.ogg
|
252
254
|
- sounds/よ2.ogg
|
253
|
-
- sounds
|
255
|
+
- sounds/ら1.ogg
|
254
256
|
- sounds/ら2.ogg
|
255
|
-
- sounds
|
257
|
+
- sounds/り1.ogg
|
256
258
|
- sounds/り2.ogg
|
257
|
-
- sounds
|
259
|
+
- sounds/る1.ogg
|
258
260
|
- sounds/る2.ogg
|
259
|
-
- sounds
|
261
|
+
- sounds/れ1.ogg
|
260
262
|
- sounds/れ2.ogg
|
261
|
-
- sounds
|
263
|
+
- sounds/ろ1.ogg
|
262
264
|
- sounds/ろ2.ogg
|
263
|
-
- sounds
|
265
|
+
- sounds/わ1.ogg
|
264
266
|
- sounds/わ2.ogg
|
265
|
-
- sounds
|
267
|
+
- sounds/を1.ogg
|
266
268
|
- sounds/を2.ogg
|
267
|
-
- sounds
|
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.
|
289
|
+
version: 2.5.0
|
288
290
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
289
291
|
requirements:
|
290
292
|
- - ">="
|
data/sounds/he.ogg
DELETED
Binary file
|
data/sounds/he2.ogg
DELETED
Binary file
|
data/sounds/tofix.txt
DELETED
data/sounds//343/201/257.ogg
DELETED
Binary file
|
data/sounds//343/201/270.ogg
DELETED
Binary file
|