{"id":34126243,"url":"https://github.com/cemc-oper/nmc-typhoon-db-client","last_synced_at":"2026-06-01T04:02:15.321Z","repository":{"id":81889842,"uuid":"307612092","full_name":"cemc-oper/nmc-typhoon-db-client","owner":"cemc-oper","description":"A CLI client for NMC Typhoon Database.","archived":false,"fork":false,"pushed_at":"2024-11-07T03:02:08.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-17T10:07:18.296Z","etag":null,"topics":["data","database-client","nmc"],"latest_commit_sha":null,"homepage":"","language":"Go","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/cemc-oper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-10-27T06:54:29.000Z","updated_at":"2025-07-17T02:14:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"9f09e905-4cc2-46dd-8504-d301ba4a5e73","html_url":"https://github.com/cemc-oper/nmc-typhoon-db-client","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cemc-oper/nmc-typhoon-db-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cemc-oper%2Fnmc-typhoon-db-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cemc-oper%2Fnmc-typhoon-db-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cemc-oper%2Fnmc-typhoon-db-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cemc-oper%2Fnmc-typhoon-db-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cemc-oper","download_url":"https://codeload.github.com/cemc-oper/nmc-typhoon-db-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cemc-oper%2Fnmc-typhoon-db-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33759178,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"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":["data","database-client","nmc"],"created_at":"2025-12-14T23:38:23.022Z","updated_at":"2026-06-01T04:02:15.304Z","avatar_url":"https://github.com/cemc-oper.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nmc-typhoon-db-client\n\n从 NMC 台风数据库检索台风报文\n\n## 编译\n\n使用 `make` 命令编译，生成的 `nmc_typhoon_db_client` 可执行程序保存在 bin 目录下。\n\n## 使用\n\n`nmc_typhoon_db_client get` 命令从数据库中检索台风信息并保存到 CSV 文件中。\n\n下面命令检索 2020 年 10 月 25 日 00 时数据，将结果保存到 test.csv 文件中。\n\n```bash\nnmc_typhoon_db_client \\\n    get \\\n    --config ./config.yaml \\\n    --start-time 2020102500 \\\n    --output-file ./test.csv\n```\n\n`--config` 指定配置文件路径，默认使用当前路径下的 `config.yaml` 文件。\n\n`--start-time` 指定起始时次，格式 YYYYMMDDHH\n\n`--output-file` 设置输出 CSV 文件的路径\n\n## 更多参数\n\n该命令还支持获取时间段内的数据。\n\n`--end-time` 指定截止时次，默认为空。如果设置，则返回起报时次在 `[start_time, end_time]` 之间的数据。\n\n`--forecast-hour` 指定预报时效，单位小时，默认为 `0`，也支持设置时效范围，例如 `0-120` 表示 0 到 120 小时。\n\n下面命令检索 2020 年 10 月 25 日 00 时到 2020 年 10 月 26 日 00 时，预报时效在 0 到 120 小时的数据。\n\n```bash\nnmc_typhoon_db_client \\\n    get \\\n    --config ./config.yaml \\\n    --start-time 2020102500 \\\n    --end-time 2020102600 \\\n    --forecast-hour \"0-120\" \\\n    --output-file \"./test.csv\"\n```\n\n## 配置文件\n\n配置文件包含数据库访问信息，格式如下：\n\n```yaml\ndatabase:\n  host: host ip\n  database_name: database name\n  table_name: table name\n\n  driver: \"mysql+pymysql\"\n\n  auth:\n    user: user name\n    password: password\n```\n\n## CSV 文件\n\n`nmc_typhoon_db_client get` 命令生成的 CSV 文件包含表头。\n列标题与数据库字段名称相同，请参看 [columns.go](./columns.go) 文件中的 `QueryColumns` 对象。\n\n## LICENSE\n\nCopyright \u0026copy; 2020, Perilla Roc at nwpc-oper.\n\n`nmc-typhoon-db-client` is licensed under [MIT License](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcemc-oper%2Fnmc-typhoon-db-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcemc-oper%2Fnmc-typhoon-db-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcemc-oper%2Fnmc-typhoon-db-client/lists"}