Help you get train operating information in the Kanto area
204
Gem for getting train information in the Kanto area.
traininfo_kanto scrapes Yahoo!路線情報
Add this line to your application's Gemfile:
gem 'traininfo_kanto'
And then execute:
$ bundle
Or install it yourself as:
$ gem install traininfo_kanto
$ irb
irb(main):001:0> require 'traininfo_kanto'
irb(main):002:0> TraininfoKanto.get(['山手線', '京浜東北線'], url: true)
=> ["山手線は平常運転です。", "京浜東北線は列車遅延があります。\n宇都宮線内でドア点検を行った影響で、一部列車に遅れが出ています。 (9月21日 16時45分掲載)\nhttps://transit.yahoo.co.jp/traininfo/detail/22/0/"]
The defaults below are all false.
url : Whether to add a URL in cases other than "平常運転".Or traininfo_kanto can also used as a command.
$ traininfo_kanto get 山手線 京浜東北線
山手線は平常運転です。
京浜東北線は列車遅延があります。
宇都宮線内でドア点検を行った影響で、一部列車に遅れが出ています。 (9月21日 16時45分掲載)
shifumin/traininfo_kanto - Docker Hub
docker run --rm shifumin/traininfo_kanto get 山手線 中央線
After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/traininfo_kanto. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the TraininfoKanto project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
Content type
Image
Digest
Size
106.9 MB
Last updated
about 7 years ago
docker pull shifumin/traininfo_kanto