{"id":15725091,"url":"https://github.com/eggplants/zutool","last_synced_at":"2025-05-12T13:27:03.247Z","repository":{"id":183801224,"uuid":"670522391","full_name":"eggplants/zutool","owner":"eggplants","description":"Unofficial zutool (頭痛ール: https://zutool.jp) API Wrapper","archived":false,"fork":false,"pushed_at":"2025-04-08T01:50:53.000Z","size":619,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-29T17:44:50.905Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://egpl.dev/zutool/","language":"Python","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/eggplants.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-25T08:38:03.000Z","updated_at":"2025-04-08T01:50:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"c043488e-ec3b-4465-8f99-a2cc954615e2","html_url":"https://github.com/eggplants/zutool","commit_stats":null,"previous_names":["eggplants/zutool"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eggplants%2Fzutool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eggplants%2Fzutool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eggplants%2Fzutool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eggplants%2Fzutool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eggplants","download_url":"https://codeload.github.com/eggplants/zutool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253746977,"owners_count":21957665,"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","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-10-03T22:19:26.091Z","updated_at":"2025-05-12T13:27:03.229Z","avatar_url":"https://github.com/eggplants.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zutool\n\n[![PyPI version](\n  \u003chttps://badge.fury.io/py/zutool.svg\u003e\n  )](\n  \u003chttps://badge.fury.io/py/zutool\u003e\n) [![Maintainability](\n  \u003chttps://qlty.sh/badges/ddb7a44f-c9b0-4164-a409-a3d06521b937/maintainability.svg\u003e\n  )](\n  \u003chttps://qlty.sh/gh/eggplants/projects/zutool\u003e\n  ) [![pre-commit.ci status](\n  \u003chttps://results.pre-commit.ci/badge/github/eggplants/zutool/master.svg\u003e\n  )](\n  \u003chttps://results.pre-commit.ci/latest/github/eggplants/zutool/master\u003e\n) [![Code Coverage](\n  \u003chttps://qlty.sh/badges/ddb7a44f-c9b0-4164-a409-a3d06521b937/test_coverage.svg\u003e\n  )](\n  \u003chttps://qlty.sh/gh/eggplants/projects/zutool\u003e\n) [![Test](\n  \u003chttps://github.com/eggplants/zutool/actions/workflows/test.yml/badge.svg\u003e\n  )](\n  \u003chttps://github.com/eggplants/zutool/actions/workflows/test.yml\u003e\n) [![Release](\n  \u003chttps://github.com/eggplants/zutool/actions/workflows/release.yml/badge.svg\u003e\n  )](\n  \u003chttps://github.com/eggplants/zutool/actions/workflows/release.yml\u003e\n)\n\n[![ghcr latest](\n  \u003chttps://ghcr-badge.egpl.dev/eggplants/zutool/latest_tag?trim=major\u0026label=latest\u003e\n ) ![ghcr size](\n  \u003chttps://ghcr-badge.egpl.dev/eggplants/zutool/size\u003e\n)](\n  \u003chttps://github.com/eggplants/zutool/pkgs/container/zutool\u003e\n)\n\nUnofficial zutool (頭痛ール: \u003chttps://zutool.jp/\u003e) API Wrapper\n\n## Install\n\n```bash\npipx install zutool\n# or,\npip install zutool\n```\n\n## As Library\n\n```python\nimport zutool as z\n\n# see: \u003chttps://nlftp.mlit.go.jp/ksj/gml/codelist/PrefCd.html\u003e\narea_code = \"13\" # 東京都\nz.get_pain_status(area_code)\n\nkeyword = \"東京都\"\nz.get_weather_point(keyword)\n\n# see: \u003chttps://geoshape.ex.nii.ac.jp/city/code/?13113\u003e\ncity_code = \"13113\" # 東京都渋谷区\nz.get_weather_status(city_code)\n\ncity_code = \"13101\" # 東京都千代田区\nz.get_otenki_asp(city_code)\n```\n\n## As CLI\n\n```shellsession\n$ zutool -h\nusage: zutool [-h] [-j] {pain_status,ps,weather_point,wp,weather_status,ws,otenki_asp,oa} ...\n\nGet info of zutool \u003chttps://zutool.jp/\u003e.\n\npositional arguments:\n  {pain_status,ps,weather_point,wp,weather_status,ws,otenki_asp,oa}\n    pain_status (ps)          get pain status by prefecture\n    weather_point (wp)        search weather point\n    weather_status (ws)       get pain status by city\n    otenki_asp (oa)           get weather infomations\n\noptional arguments:\n  -h, --help                  show this help message and exit\n  -j, --json                  print as json (default: False)\n```\n\n### `pain_status (ps)`\n\n```shellsession\n$ zutool ps -h\nusage: zutool pain_status [-h] [-s CODE] area_code\n\npositional arguments:\n  area_code   see: \u003chttps://nlftp.mlit.go.jp/ksj/gml/codelist/PrefCd.html\u003e (ex. `13`)\n\noptional arguments:\n  -h, --help  show this help message and exit\n  -s CODE     set weather point code as default (ex. `13113`) (default: None)\n```\n\n```shellsession\n$ zutool ps 01\n             今のみんなの体調は？ \u003c北海道|01\u003e\n                 (集計時間: 12時-18時台)\n┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n┃ 😃😃😃😃😃😃😃😃 17.098445595855%                      ┃\n┃ 😐😐😐😐😐😐😐😐😐😐😐😐😐😐😐 31.60621761658%         ┃\n┃ 😞😞😞😞😞😞😞😞😞😞😞😞😞😞😞😞😞😞 37.823834196891%  ┃\n┃ 🤯🤯🤯🤯🤯🤯 13.471502590674%                          ┃\n┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩\n│ [😃･･･普通, 😐･･･少し痛い, 😞･･･痛い, 🤯･･･かなり痛い] │\n└────────────────────────────────────────────────────────┘\n```\n\n### `weather_point (wp)`\n\n```shellsession\n$ zutool wp -h\nusage: zutool weather_point [-h] [-k] keyword\n\npositional arguments:\n  keyword     keyword for searching city_code (ex. `東京都`)\n\noptional arguments:\n  -h, --help  show this help message and exit\n  -k, --kata  with kata column in non-json output (default: False)\n```\n\n```shellsession\n$ zutool wp \"港区\"\n        「港区」の検索結果\n┏━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┓\n┃ 地域コード ┃ 地域名             ┃\n┡━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━┩\n│ 13103      │ 東京都港区         │\n│ 23111      │ 愛知県名古屋市港区 │\n│ 27107      │ 大阪府大阪市港区   │\n└────────────┴────────────────────┘\n```\n\n### `weather_status (ws)`\n\n```shellsession\n$ zutool ws -h\nusage: zutool weather_status [-h] [-n N [N ...]] city_code\n\npositional arguments:\n  city_code     see: \u003chttps://geoshape.ex.nii.ac.jp/city/code/\u003e (ex. `13113`)\n\noptional arguments:\n  -h, --help    show this help message and exit\n  -n N [N ...]  specify day number to show (default: [0])\n```\n\n```shellsession\n$ zutool ws 13113\n                                                   \u003c東京都渋谷区|13113\u003eの気圧予報\n                                                  today = 2023-08-15 20:00:00+09:00 \n┏━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┓\n┃ 0        ┃ 1        ┃ 2        ┃ 3        ┃ 4        ┃ 5        ┃ 6        ┃ 7        ┃ 8        ┃ 9        ┃ 10       ┃ 11       ┃\n┡━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━┩\n│ ☁        │ ☁        │ ☔       │ ☔       │ ☁        │ ☔       │ ☁        │ ☁        │ ☔       │ ☔       │ ☁        │ ☁        │\n│ 28.4℃    │ 27.5℃    │ 27.3℃    │ 26.5℃    │ 26.9℃    │ 26.7℃    │ 26.9℃    │ 27.9℃    │ 28.4℃    │ 28.4℃    │ 29.1℃    │ 30.7℃    │\n│ ↗        │ ↗        │ ↗        │ ↗        │ ↗        │ ↗        │ ↗        │ ↗        │ ↗        │ ↗        │ ↗        │ ↗        │\n│ 1004.8   │ 1004.2   │ 1004.3   │ 1004.3   │ 1004.6   │ 1004.9   │ 1005.2   │ 1005.4   │ 1005.8   │ 1006.0   │ 1005.8   │ 1005.3   │\n│ やや警戒 │ やや警戒 │ やや警戒 │ やや警戒 │ やや警戒 │ やや警戒 │ やや警戒 │ やや警戒 │ やや警戒 │ やや警戒 │ やや警戒 │ やや警戒 │\n└──────────┴──────────┴──────────┴──────────┴──────────┴──────────┴──────────┴──────────┴──────────┴──────────┴──────────┴──────────┘\n┏━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┓\n┃ 12       ┃ 13       ┃ 14       ┃ 15     ┃ 16     ┃ 17     ┃ 18     ┃ 19     ┃ 20     ┃ 21       ┃ 22       ┃ 23       ┃\n┡━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━┩\n│ ☁        │ ☀        │ ☀        │ ☀      │ ☀      │ ☔     │ ☁      │ ☁      │ ☔     │ ☔       │ ☔       │ ☔       │\n│ 31.1℃    │ 32.2℃    │ 31.9℃    │ 31.6℃  │ 31.3℃  │ 29.9℃  │ 29.3℃  │ 29.2℃  │ 28.4℃  │ 27.9℃    │ 27.5℃    │ 27.2℃    │\n│ ↗        │ ↗        │ ↗        │ ↗      │ ↗      │ ↗      │ ↗      │ ↗      │ ↗      │ ↗        │ ↗        │ ↗        │\n│ 1005.1   │ 1004.9   │ 1004.9   │ 1004.6 │ 1004.7 │ 1004.8 │ 1005.2 │ 1005.7 │ 1006.3 │ 1006.5   │ 1006.5   │ 1006.4   │\n│ やや警戒 │ やや警戒 │ やや警戒 │ 通常_0 │ 通常_0 │ 通常_0 │ 通常_0 │ 通常_0 │ 通常_0 │ やや警戒 │ やや警戒 │ やや警戒 │\n└──────────┴──────────┴──────────┴────────┴────────┴────────┴────────┴────────┴────────┴──────────┴──────────┴──────────┘\n```\n\n### `otenki_asp (oa)`\n\n```shellsession\n$ zutool oa -h\nusage: zutool otenki_asp [-h] [-n N [N ...]] {01101,04101,13101,15103,17201,23106,27128,34101,39201,40133,47201}\n\npositional arguments:\n  {01101,04101,13101,15103,17201,23106,27128,34101,39201,40133,47201}\n                                                  see: \u003chttps://geoshape.ex.nii.ac.jp/city/code/\u003e (ex. `13113`)\n\noptional arguments:\n  -h, --help                                      show this help message and exit\n  -n N [N ...]                                    specify day number to show (default: [0, 1, 2, 3, 4, 5, 6])\n```\n\n```shellsession\n$ zutool oa 13101\n                                            \u003c東京|13101\u003eの天気情報\n┏━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓\n┃ 日付  ┃ 天気       ┃ 降水確率 ┃ 最高気温 ┃ 最低気温 ┃ 最大風速 ┃ 最大風速時風向 ┃ 気圧予報レベル ┃ 最小湿度 ┃\n┡━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩\n│ 08/02 │ 晴れ       │ 10.0     │ 35.0     │ 26.0     │ 11.2     │ 8.0            │ 2.0            │ 60.5     │\n│ 08/03 │ 晴れ       │ 10.0     │ 36.0     │ 26.0     │ 11.8     │ 8.0            │ 4.0            │ 63.6     │\n│ 08/04 │ 晴れ       │ 0.0      │ 36.0     │ 26.0     │ 10.0     │ 8.0            │ 2.0            │ 59.6     │\n│ 08/05 │ 晴れのち雨 │ 30.0     │ 36.0     │ 27.0     │ 11.8     │ 8.0            │ 1.0            │ 64.3     │\n│ 08/06 │ 雨のち晴れ │ 30.0     │ 36.0     │ 27.0     │ 10.3     │ 8.0            │ 2.0            │ 61.9     │\n│ 08/07 │ 晴れのち雨 │ 50.0     │ 33.0     │ 26.0     │ 7.2      │ 2.0            │ 2.0            │ 63.6     │\n│ 08/08 │ 雨一時晴れ │ 80.0     │ 33.0     │ 26.0     │ 6.2      │ 6.0            │ 1.0            │ 79.5     │\n└───────┴────────────┴──────────┴──────────┴──────────┴──────────┴────────────────┴────────────────┴──────────┘\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feggplants%2Fzutool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feggplants%2Fzutool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feggplants%2Fzutool/lists"}