pumi 0.19.0 → 0.20.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +8 -0
- data/bin/parse_data +2 -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 +1 -1
- 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: d857da41c2b8a128557b1873beff3d2683d794e551d59dfd61965a9d8b3bc5e5
|
4
|
+
data.tar.gz: 3d78f6d138a40503ffe9bddeaafb3b7e04c0261f167b9ba10d7c65ceea103a09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24cd42c794943e7bdf7ae09fe04977f58e08e93e99823a93a3e7356f4c9988e106e37cb6526438c24a9b44c6057dd63ed9f9dcb40f8f08a171e617319c6d5943
|
7
|
+
data.tar.gz: '0107993da6bad77d3233bd4b37f32cdb040d4ddf0327606edb11d1eee8cb1c818c1d0743e76dea1fb6a319cd4a6f03f459c39a964109791c8dfb48ab5406bf0d'
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.20.1](https://github.com/dwilkie/pumi/compare/v0.20.0...v0.20.1) (2023-08-02)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* Don't load bots and datasources by default ([#55](https://github.com/dwilkie/pumi/issues/55)) ([8abf5a0](https://github.com/dwilkie/pumi/commit/8abf5a06b4f98057c4c826ecde6be851e7c1db3f))
|
9
|
+
|
10
|
+
## [0.20.0](https://github.com/dwilkie/pumi/compare/v0.19.0...v0.20.0) (2023-07-31)
|
11
|
+
|
12
|
+
|
13
|
+
### Features
|
14
|
+
|
15
|
+
* Add iso3166_2 and geodata ([#53](https://github.com/dwilkie/pumi/issues/53)) ([d32b3ea](https://github.com/dwilkie/pumi/commit/d32b3eadd169cf0e56ae40e566f581a5ab3536d2))
|
16
|
+
|
3
17
|
## [0.19.0](https://github.com/dwilkie/pumi/compare/v0.18.0...v0.19.0) (2023-06-04)
|
4
18
|
|
5
19
|
|
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
@@ -6,14 +6,11 @@
|
|
6
6
|
|
7
7
|
require "bundler/setup"
|
8
8
|
require "pumi"
|
9
|
+
require "pumi/data_source/ncdd"
|
10
|
+
require "pumi/data_source/wikipedia"
|
9
11
|
|
10
12
|
Pumi::DataSource::NCDD.new.load_data!
|
11
13
|
|
12
|
-
Pumi::DataSource::Wikipedia.new(
|
13
|
-
scraper: Pumi::DataSource::Wikipedia::CambodianProvincesScraper.new,
|
14
|
-
data_file: Pumi::DataFile.new(:provinces)
|
15
|
-
).load_data!
|
16
|
-
|
17
14
|
Pumi::DataSource::Wikipedia.new(
|
18
15
|
scraper: Pumi::DataSource::Wikipedia::CambodianDistrictsScraper.new,
|
19
16
|
data_file: Pumi::DataFile.new(:districts)
|