kita 0.5.2 → 0.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +9 -1
- data/Gemfile.lock +1 -1
- data/bin/kita +2 -2
- data/kita.gemspec +6 -2
- data/lib/kita.rb +13 -19
- 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/257.ogg +0 -0
- data/sounds//343/201/2572.ogg +0 -0
- data/sounds//343/201/270.ogg +0 -0
- data/sounds//343/201/2702.ogg +0 -0
- metadata +9 -7
- data/sounds/he.ogg +0 -0
- data/sounds/he2.ogg +0 -0
- data/sounds/tofix.txt +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b9ab67c3c2be81e1c63d0e5bba5ce903f27c5228b0dd6fe6b4051a032fa5371
|
4
|
+
data.tar.gz: 32021b813755a63059f0d4cb1464b636b374a6a758094bd86d448ba81c5f88dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d22c59c1e32b34cab29475370dd7bac3d12a486be5d6c404008647d5c27a2374ce07a1caa7ac027c0512969034427e5019f9df4229e809c42b9841e32ff3f3ba
|
7
|
+
data.tar.gz: b39f7cce3e1d969f72603c1e3aeb2edc1b0d440f4effa7fc16706d6d6b0d61c76dc5aa9ddfb585a4b3122b1bf3416e2ea09cd86b5d48128e610bb152a93165e8
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -6,10 +6,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
### Added
|
9
|
-
- Marketing banner to prompt users to upgrade to a free account
|
10
9
|
|
11
10
|
### Changed
|
12
11
|
|
12
|
+
## 2020-05-27
|
13
|
+
### Changed
|
14
|
+
- Selecting an incorrect answer for a Katakana question, shows the correct Katakana, rather than
|
15
|
+
just repeating the Hiragana
|
16
|
+
|
17
|
+
## 2020-05-25
|
18
|
+
### Changed
|
19
|
+
- Improved sounds, neither へ nor は are pronounced in their particle form (e and wa).
|
20
|
+
|
13
21
|
## 2020-05-24
|
14
22
|
### Added
|
15
23
|
- 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
|
@@ -14,11 +14,8 @@ module Kita
|
|
14
14
|
builder_file = "#{File.expand_path(File.dirname(__dir__))}/ui/builder.ui"
|
15
15
|
# Construct a Gtk::Builder instance and load our UI description
|
16
16
|
@builder = Gtk::Builder.new(file: builder_file)
|
17
|
-
# Initiate
|
18
|
-
@
|
19
|
-
# Initiate Katakana class
|
20
|
-
@katakana = Katakana.new
|
21
|
-
@types = [@hiragana]
|
17
|
+
# Initiate Question class
|
18
|
+
@question = Question.new
|
22
19
|
@button_signals = {}
|
23
20
|
@sound = Audio.new
|
24
21
|
new_question
|
@@ -81,19 +78,13 @@ module Kita
|
|
81
78
|
end
|
82
79
|
|
83
80
|
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?
|
81
|
+
Settings.katakana = !Settings.katakana
|
82
|
+
(@hiragana_switch.set_active(true) && Settings.hiragana = true) if !Settings.katakana && !Settings.hiragana
|
89
83
|
end
|
90
84
|
|
91
85
|
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?
|
86
|
+
Settings.hiragana = !Settings.hiragana
|
87
|
+
(@katakana_switch.set_active(true) && Settings.katakana = true) if !Settings.katakana && !Settings.hiragana
|
97
88
|
end
|
98
89
|
|
99
90
|
def toggle_sound
|
@@ -111,7 +102,7 @@ module Kita
|
|
111
102
|
|
112
103
|
def new_question
|
113
104
|
reset_buttons
|
114
|
-
question = @
|
105
|
+
question = @question.new_question
|
115
106
|
question_label = @builder.get_object('question')
|
116
107
|
question_label.set_markup("<span font='72'>#{question[:question]}</span>")
|
117
108
|
buttons = %w[a b c d]
|
@@ -144,7 +135,10 @@ module Kita
|
|
144
135
|
def wrong_button_click(button)
|
145
136
|
button.set_sensitive(false)
|
146
137
|
label = button.child
|
147
|
-
|
138
|
+
correction = @question.type == 'hiragana' ? button.label.hiragana : button.label.katakana
|
139
|
+
label.set_markup(
|
140
|
+
"<span color='#d40000'>#{button.label} #{correction}</span>"
|
141
|
+
)
|
148
142
|
end
|
149
143
|
|
150
144
|
def reset_buttons
|
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.6'
|
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
|
data/sounds//343/201/257.ogg
CHANGED
Binary file
|
data/sounds//343/201/2572.ogg
CHANGED
Binary file
|
data/sounds//343/201/270.ogg
CHANGED
Binary file
|
data/sounds//343/201/2702.ogg
CHANGED
Binary file
|
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.7
|
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-
|
11
|
+
date: 2020-05-27 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,11 +120,11 @@ 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
128
|
- sounds/あ.ogg
|
127
129
|
- sounds/あ2.ogg
|
128
130
|
- sounds/い.ogg
|
@@ -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