{"id":20106134,"url":"https://github.com/himkt/ndl","last_synced_at":"2025-08-03T11:32:25.592Z","repository":{"id":27835838,"uuid":"31325842","full_name":"himkt/ndl","owner":"himkt","description":"gem to make use of NLP API","archived":false,"fork":false,"pushed_at":"2015-05-19T13:25:04.000Z","size":146,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-30T17:50:16.249Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/himkt/ndl","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/himkt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-25T17:19:07.000Z","updated_at":"2016-02-11T07:58:51.000Z","dependencies_parsed_at":"2022-09-03T11:42:37.953Z","dependency_job_id":null,"html_url":"https://github.com/himkt/ndl","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/himkt/ndl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himkt%2Fndl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himkt%2Fndl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himkt%2Fndl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himkt%2Fndl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/himkt","download_url":"https://codeload.github.com/himkt/ndl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himkt%2Fndl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267464805,"owners_count":24091570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T17:49:11.045Z","updated_at":"2025-08-03T11:32:25.283Z","avatar_url":"https://github.com/himkt.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ndl\n\nWelcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/ndl`. To experiment with that code, run `bin/console` for an interactive prompt.\n\nTODO: Delete this and the text above, and describe your gem\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'ndl'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install ndl\n\n## Usage\n\n### OpenSearch\n\n* The following arguments are available\n  - :dpid\n  - :dpgroupid\n  - :any\n  - :title\n  - :creator\n  - :publisher\n  - :ndc\n  - :from\n  - :until\n  - :cnt\n  - :idx\n  - :isbn\n  - :mediatype\n\n* please refer to [my repository](https://github.com/himkt/opensearch)\n\n```ruby\nrequire 'ndl'\n\nopen_search = Ndl::OpenSearch.new\n\n\n# you can parse 'result' by using xml parser\nresult = open_search.search(:title=\u003e'a', :from=\u003e'1111-11-11', :cnt=\u003e2, :ndc=\u003e100)\n\n# parse return Hash include key, 'hit' and 'item'\n# hit is number of hit\n# item is array that include hash object, and array include bibliography\nparsed_result = open_search.parse(result)\np parsed_result\n\n=begin\n# you can also see result by using the following code\nresult = open_search.search(:title=\u003e'a', :from=\u003e'1111-11-11', :cnt=\u003e2)\nwhile line = result.gets\n  puts line\nend\n=end\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo 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` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\n1. Fork it ( https://github.com/[my-github-username]/ndl/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## data source\n* 国立国会図書館のAPIを利用します\n* from [this](http://iss.ndl.go.jp/information/wp-content/uploads/2014/12/ndlsearch_api_20141215_jp.pdf)\n\n## リクエストURL\n* http://iss.ndl.go.jp/api/opensearch?dpid=[dpid]\u0026title=[title]\u0026...\n\n## 引数\n\n|参照名     |内容                                            |一致条件|複数   |\n|:----------|:-----------------------------------------------|:-------|:------|\n|dpid       |データプロパイダID                              |完全一致|able   |\n|dpgroupid  |データプロバイダグループID                      |完全一致|disable|\n|any        |すべての項目を対象に検索                        |部分一致|able   |\n|title      |タイトル                                        |部分一致|able   |\n|creator    |作成者                                          |部分一致|able   |\n|publisher  |出版者                                          |部分一致|able   |\n|ndc        |分類(NDC)                                       |前方一致|disable|\n|from       |開始出版年月日(YYYY-MM-DD)                      |        |disable|\n|until      |終了出版年月日                                  |        |disable|\n|cnt        |出力レコード上限値(省略時は200)                 |        |disable|\n|idx        |レコード取得開始位置                            |        |disable|\n|isbn       |isbn(10, 13桁の場合は完全一致), その他は前方一致|        |disable|\n|mediatype  |種類種別                                        |完全一致|able   |\n\n## データプロバイダID\n\n* [参照](http://iss.ndl.go.jp/information/wp-content/uploads/2014/12/ndlsearch_api_furoku1_20141215_jp.pdf)\n\n## データプロバイダグループID\n\n|No |データプロバイダグループID|データプロバイダグループIDの内容|\n|:--|:-------------------------|:-------------------------------|\n|1  |Digitalcontents           |本文、デジタル画像等(一次情報)  |\n|2  |Catalogue                 |目録、索引等                    |\n|3  |Site                      |サイト情報                      |\n|4  |Reference                 |調べ物に便利な情報、参考情報    |\n|5  |Science                   |自然科学系の情報                |\n|6  |Humanities                |人文科学系の情報                |\n|7  |Library                   |図書館に関わる情報              |\n|8  |Child                     |子供向けの情報                  |\n|9  |Ndl                       |国立国会図書館が提供する情報    |\n\n## 種類種別\n\n|記号|種別|\n|:---|:---|\n|1   |本  |\n|2   |記事・論文|\n|3   |新聞|\n|4   |児童書|\n|5   |レファレンス資料|\n|6   |デジタル資料|\n|7   |その他|\n|8   |障害者向け資料|\n|9   |立法情報|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhimkt%2Fndl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhimkt%2Fndl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhimkt%2Fndl/lists"}