pumi 0.19.0 → 0.20.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 +7 -0
- data/README.md +8 -0
- data/bin/parse_data +0 -5
- data/data/communes.yml +9904 -0
- data/data/districts.yml +1576 -0
- data/data/provinces.yml +225 -0
- data/lib/pumi/bot/wikipedia/article.rb +13 -0
- data/lib/pumi/bot/wikipedia/communes_in_cambodia_article.rb +157 -0
- data/lib/pumi/bot/wikipedia/districts_in_cambodia_article.rb +122 -0
- data/lib/pumi/bot/wikipedia/templates/commune_list.wikitext.erb +46 -0
- data/lib/pumi/bot/wikipedia/templates/district_list.wikitext.erb +27 -0
- data/lib/pumi/bot/wikipedia.rb +10 -0
- data/lib/pumi/bot.rb +6 -0
- data/lib/pumi/data_source/geocoder.rb +251 -0
- data/lib/pumi/data_source/iso31662.rb +29 -0
- data/lib/pumi/data_source/wikipedia.rb +19 -524
- data/lib/pumi/data_source.rb +2 -0
- data/lib/pumi/geodata.rb +3 -0
- data/lib/pumi/location.rb +2 -0
- data/lib/pumi/parser.rb +7 -0
- data/lib/pumi/version.rb +1 -1
- data/lib/pumi/wikipedia/client.rb +68 -0
- data/lib/pumi/wikipedia/response.rb +15 -0
- data/lib/pumi/wikipedia.rb +7 -0
- data/lib/pumi.rb +3 -0
- data/pumi.gemspec +4 -1
- metadata +58 -4
- data/lib/pumi/scraper/result.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eaa8457178792ba448db0779db4f0d06f194d45479189da114c85db397706993
|
4
|
+
data.tar.gz: 8718c98a46c204a6385acb16baa106dd35ca8b9801a6bbdbf8129af836e6fc8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac507799b02d5cf04ae46fdb4e87ea64d011afa2ccab9bf8c2e07ac74b7687bd57178a20ffb507d915be150110f259d852ae6a1af86b3e410634599f298bdf0f
|
7
|
+
data.tar.gz: 1e047785a872f7344bcb724395b586299c70082611741f4f23f04b62782ec8cc74a3b1a5fda18a474727ae9b33edd0d7b918307a1b37f4493b1892bd1f7271cd
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.20.0](https://github.com/dwilkie/pumi/compare/v0.19.0...v0.20.0) (2023-07-31)
|
4
|
+
|
5
|
+
|
6
|
+
### Features
|
7
|
+
|
8
|
+
* Add iso3166_2 and geodata ([#53](https://github.com/dwilkie/pumi/issues/53)) ([d32b3ea](https://github.com/dwilkie/pumi/commit/d32b3eadd169cf0e56ae40e566f581a5ab3536d2))
|
9
|
+
|
3
10
|
## [0.19.0](https://github.com/dwilkie/pumi/compare/v0.18.0...v0.19.0) (2023-06-04)
|
4
11
|
|
5
12
|
|
data/README.md
CHANGED
@@ -80,6 +80,14 @@ And then execute:
|
|
80
80
|
province.links
|
81
81
|
# => {:wikipedia=>"https://en.wikipedia.org/wiki/Phnom_Penh"}
|
82
82
|
|
83
|
+
# Get Geodata
|
84
|
+
province.geodata
|
85
|
+
# => #<struct Pumi::Geodata lat="11.5730391", long="104.857807", bounding_box=["11.4200852", "11.7349524", "104.7204046", "105.0440261"]>
|
86
|
+
|
87
|
+
# Get ISO3166_2 code
|
88
|
+
province.iso3166_2
|
89
|
+
# => "KH-12"
|
90
|
+
|
83
91
|
# Working with Districts (ស្រុក / ខណ្ឌ)
|
84
92
|
|
85
93
|
# Get all districts
|
data/bin/parse_data
CHANGED
@@ -9,11 +9,6 @@ require "pumi"
|
|
9
9
|
|
10
10
|
Pumi::DataSource::NCDD.new.load_data!
|
11
11
|
|
12
|
-
Pumi::DataSource::Wikipedia.new(
|
13
|
-
scraper: Pumi::DataSource::Wikipedia::CambodianProvincesScraper.new,
|
14
|
-
data_file: Pumi::DataFile.new(:provinces)
|
15
|
-
).load_data!
|
16
|
-
|
17
12
|
Pumi::DataSource::Wikipedia.new(
|
18
13
|
scraper: Pumi::DataSource::Wikipedia::CambodianDistrictsScraper.new,
|
19
14
|
data_file: Pumi::DataFile.new(:districts)
|