nhkore 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +37 -1
- data/README.md +18 -6
- data/Rakefile +11 -16
- data/bin/nhkore +1 -3
- data/lib/nhkore/app.rb +616 -0
- data/lib/nhkore/article.rb +130 -0
- data/lib/nhkore/article_scraper.rb +653 -0
- data/lib/nhkore/cleaner.rb +91 -0
- data/lib/nhkore/cli/bing_cmd.rb +220 -0
- data/lib/nhkore/cli/fx_cmd.rb +116 -0
- data/lib/nhkore/cli/get_cmd.rb +153 -0
- data/lib/nhkore/cli/news_cmd.rb +375 -0
- data/lib/nhkore/cli/sift_cmd.rb +382 -0
- data/lib/nhkore/defn.rb +104 -0
- data/lib/nhkore/dict.rb +80 -0
- data/lib/nhkore/dict_scraper.rb +76 -0
- data/lib/nhkore/entry.rb +104 -0
- data/lib/nhkore/error.rb +35 -0
- data/lib/nhkore/fileable.rb +48 -0
- data/lib/nhkore/missingno.rb +92 -0
- data/lib/nhkore/news.rb +176 -0
- data/lib/nhkore/polisher.rb +93 -0
- data/lib/nhkore/scraper.rb +137 -0
- data/lib/nhkore/search_link.rb +188 -0
- data/lib/nhkore/search_scraper.rb +152 -0
- data/lib/nhkore/sifter.rb +339 -0
- data/lib/nhkore/splitter.rb +90 -0
- data/lib/nhkore/util.rb +190 -0
- data/lib/nhkore/variator.rb +87 -0
- data/lib/nhkore/version.rb +1 -1
- data/lib/nhkore/word.rb +134 -17
- data/lib/nhkore.rb +39 -40
- data/nhkore.gemspec +23 -8
- data/test/{nhkore_tester.rb → nhkore/test_helper.rb} +3 -1
- data/test/nhkore_test.rb +8 -6
- metadata +204 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ab82aafdbc996ca3f0f010d533adb165df24d63a4799ba8812596551506d52c
|
4
|
+
data.tar.gz: 5cb8b107928f7ba4c3e0100d70748b616f897a1b0e8c70149fdbf3ce09c39bd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e85f11cb8b88605964e656234c746adb514d947fa46523fe464e601ae87cc1cdb7f8f32407e317c7e0c470cdfefde24251b7704cf014399a9eeb300fbd43936
|
7
|
+
data.tar.gz: 6b6aecea79efcf9f936667aa2d6a60b7255ee49de6929a576db468504e5084b254cb64729f8638de2c1814cc1223cd9a8ed04703d1a737ff805b3b2a5566102b
|
data/CHANGELOG.md
CHANGED
@@ -2,7 +2,43 @@
|
|
2
2
|
|
3
3
|
Format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
4
4
|
|
5
|
-
## [[Unreleased]](https://github.com/esotericpig/nhkore/compare/v0.
|
5
|
+
## [[Unreleased]](https://github.com/esotericpig/nhkore/compare/v0.2.0...master)
|
6
|
+
|
7
|
+
## [v0.2.0] - 2020-04-01
|
8
|
+
First working version.
|
9
|
+
|
10
|
+
### Added
|
11
|
+
- Gemfile.lock
|
12
|
+
- lib/nhkore/app.rb
|
13
|
+
- lib/nhkore/article.rb
|
14
|
+
- lib/nhkore/article_scraper.rb
|
15
|
+
- lib/nhkore/cleaner.rb
|
16
|
+
- lib/nhkore/defn.rb
|
17
|
+
- lib/nhkore/dict.rb
|
18
|
+
- lib/nhkore/dict_scraper.rb
|
19
|
+
- lib/nhkore/entry.rb
|
20
|
+
- lib/nhkore/error.rb
|
21
|
+
- lib/nhkore/fileable.rb
|
22
|
+
- lib/nhkore/missingno.rb
|
23
|
+
- lib/nhkore/news.rb
|
24
|
+
- lib/nhkore/polisher.rb
|
25
|
+
- lib/nhkore/scraper.rb
|
26
|
+
- lib/nhkore/search_link.rb
|
27
|
+
- lib/nhkore/search_scraper.rb
|
28
|
+
- lib/nhkore/sifter.rb
|
29
|
+
- lib/nhkore/splitter.rb
|
30
|
+
- lib/nhkore/util.rb
|
31
|
+
- lib/nhkore/variator.rb
|
32
|
+
- lib/nhkore/cli/bing_cmd.rb
|
33
|
+
- lib/nhkore/cli/fx_cmd.rb
|
34
|
+
- lib/nhkore/cli/get_cmd.rb
|
35
|
+
- lib/nhkore/cli/news_cmd.rb
|
36
|
+
- lib/nhkore/cli/sift_cmd.rb
|
37
|
+
- test/nhkore/test_helper.rb
|
38
|
+
|
39
|
+
### Removed
|
40
|
+
- test/nhkore_tester.rb
|
41
|
+
- Renamed to `test/nhkore/test_helper.rb`
|
6
42
|
|
7
43
|
## [v0.1.0] - 2020-02-24
|
8
44
|
### Added
|
data/README.md
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/nhkore.svg)](https://badge.fury.io/rb/nhkore)
|
4
4
|
|
5
|
-
[![Source Code](https://img.shields.io/badge/source-github-%
|
6
|
-
[![Changelog](https://img.shields.io/badge/changelog-md-%23A0522D.svg
|
7
|
-
[![License](https://img.shields.io/github/license/esotericpig/nhkore.svg
|
5
|
+
[![Source Code](https://img.shields.io/badge/source-github-%23211F1F.svg)](https://github.com/esotericpig/nhkore)
|
6
|
+
[![Changelog](https://img.shields.io/badge/changelog-md-%23A0522D.svg)](CHANGELOG.md)
|
7
|
+
[![License](https://img.shields.io/github/license/esotericpig/nhkore.svg)](LICENSE.txt)
|
8
8
|
|
9
9
|
A CLI app that scrapes [NHK News Web Easy](https://www3.nhk.or.jp/news/easy/) to create a list of each word and its frequency (how many times it was used) for Japanese language learners.
|
10
10
|
|
@@ -32,22 +32,34 @@ Manually:
|
|
32
32
|
```
|
33
33
|
$ git clone 'https://github.com/esotericpig/nhkore.git'
|
34
34
|
$ cd nhkore
|
35
|
-
$
|
36
|
-
$ bundle exec rake install:local
|
35
|
+
$ rake install
|
37
36
|
```
|
38
37
|
|
39
38
|
## [Using](#contents)
|
40
39
|
|
41
|
-
TODO:
|
40
|
+
TODO: update README Using section
|
42
41
|
|
43
42
|
## [Hacking](#contents)
|
44
43
|
|
45
44
|
```
|
46
45
|
$ git clone 'https://github.com/esotericpig/nhkore.git'
|
46
|
+
$ cd nhkore
|
47
47
|
$ bundle install
|
48
48
|
$ bundle exec rake -T
|
49
49
|
```
|
50
50
|
|
51
|
+
### Testing
|
52
|
+
|
53
|
+
```
|
54
|
+
$ bundle exec rake test
|
55
|
+
```
|
56
|
+
|
57
|
+
### Generating Doc
|
58
|
+
|
59
|
+
```
|
60
|
+
$ bundle exec rake doc
|
61
|
+
```
|
62
|
+
|
51
63
|
## [License](#contents)
|
52
64
|
|
53
65
|
[GNU LGPL v3+](LICENSE.txt)
|
data/Rakefile
CHANGED
@@ -22,7 +22,6 @@
|
|
22
22
|
|
23
23
|
require 'bundler/gem_tasks'
|
24
24
|
|
25
|
-
require 'nhkore/version'
|
26
25
|
require 'rake/clean'
|
27
26
|
require 'rake/testtask'
|
28
27
|
require 'raketeer/irb'
|
@@ -31,11 +30,13 @@ require 'raketeer/run'
|
|
31
30
|
require 'yard'
|
32
31
|
require 'yard_ghurt'
|
33
32
|
|
33
|
+
require 'nhkore/version'
|
34
|
+
|
34
35
|
|
35
|
-
|
36
|
+
CORE_PKG_DIR = 'core_pkg'
|
36
37
|
PKG_DIR = 'pkg'
|
37
38
|
|
38
|
-
CLEAN.exclude('.git/','stock/'
|
39
|
+
CLEAN.exclude('.git/','stock/')
|
39
40
|
CLOBBER.include('doc/',File.join(PKG_DIR,''))
|
40
41
|
|
41
42
|
|
@@ -45,17 +46,15 @@ desc 'Generate documentation (YARDoc)'
|
|
45
46
|
task :doc => [:yard,:yard_gfm_fix] do |task|
|
46
47
|
end
|
47
48
|
|
48
|
-
desc "Package '#{File.join(
|
49
|
+
desc "Package '#{File.join(CORE_PKG_DIR,'')}' data as a Zip file into '#{File.join(PKG_DIR,'')}'"
|
49
50
|
task :pkg_core do |task|
|
50
|
-
pattern = File.join(CORE_DIR,'**','*.{csv,yml}')
|
51
|
-
zip_name = "nhkore-core-#{NHKore::VERSION}.zip"
|
52
|
-
zip_file = File.join(PKG_DIR,zip_name)
|
53
|
-
|
54
51
|
mkdir_p PKG_DIR
|
55
52
|
|
56
|
-
|
57
|
-
|
58
|
-
|
53
|
+
cd CORE_PKG_DIR do
|
54
|
+
pattern = File.join('core','*.{csv,html,yml}')
|
55
|
+
zip_file = File.join('..',PKG_DIR,'nhkore-core.zip')
|
56
|
+
|
57
|
+
sh 'zip','-9rv',zip_file,*Dir.glob(pattern).sort()
|
59
58
|
end
|
60
59
|
end
|
61
60
|
|
@@ -98,11 +97,7 @@ YardGhurt::GFMFixTask.new() do |task|
|
|
98
97
|
end
|
99
98
|
end
|
100
99
|
|
101
|
-
#
|
102
|
-
# Execute "rake yard_ghp_sync[true]" for actually deploying.
|
100
|
+
# Probably not useful for others.
|
103
101
|
YardGhurt::GHPSyncTask.new() do |task|
|
104
|
-
task.description = %q(Rsync "doc/" to my GitHub Page's repo; not useful for others)
|
105
|
-
|
106
102
|
task.ghp_dir = '../esotericpig.github.io/docs/nhkore/yardoc'
|
107
|
-
task.sync_args << '--delete-after'
|
108
103
|
end
|