{"id":15204047,"url":"https://github.com/hanage999/mastobots","last_synced_at":"2025-10-29T04:31:42.717Z","repository":{"id":52259920,"uuid":"156973603","full_name":"Hanage999/mastobots","owner":"Hanage999","description":"Goで書いたMastodonのbot。MySQLとJuman++との合わせ技です。","archived":false,"fork":false,"pushed_at":"2025-06-10T01:38:18.000Z","size":301,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-19T04:20:15.685Z","etag":null,"topics":["bot","golang","jumanpp","mastodon","mysql"],"latest_commit_sha":null,"homepage":null,"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/Hanage999.png","metadata":{"files":{"readme":"README.ja.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,"zenodo":null}},"created_at":"2018-11-10T11:13:23.000Z","updated_at":"2025-06-10T01:38:22.000Z","dependencies_parsed_at":"2023-11-25T09:35:38.774Z","dependency_job_id":"6c4d6ef9-3149-49b4-aa51-b19c4ed21f89","html_url":"https://github.com/Hanage999/mastobots","commit_stats":{"total_commits":145,"total_committers":1,"mean_commits":145.0,"dds":0.0,"last_synced_commit":"6d9f25d6ac3169c19c3466131423f85f69290fff"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Hanage999/mastobots","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hanage999%2Fmastobots","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hanage999%2Fmastobots/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hanage999%2Fmastobots/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hanage999%2Fmastobots/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hanage999","download_url":"https://codeload.github.com/Hanage999/mastobots/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hanage999%2Fmastobots/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280893614,"owners_count":26409280,"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-10-25T02:00:06.499Z","response_time":81,"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":["bot","golang","jumanpp","mastodon","mysql"],"created_at":"2024-09-28T05:06:12.356Z","updated_at":"2025-10-29T04:31:42.712Z","avatar_url":"https://github.com/Hanage999.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mastobots\n\n[![en](https://img.shields.io/badge/lang-en-red.svg)](https://github.com/Hanage999/mastobots/blob/master/README.md)\n[![ja](https://img.shields.io/badge/lang-ja-green.svg)](https://github.com/Hanage999/mastobots/blob/master/README.ja.md)\n\n指定したキーワードを含むRSSフィードのアイテムを取得し、日本語または英語で解析した後、日本語のコメントをつけてMastodonに定期的にポストするボットです。また、メンションへの反応や天気情報の提供も行います。\n\nRSSアイテムはMySQLデータベースに保存され、日本語アイテムはJuman++、英語アイテムはProseを用いて形態素解析されます。ボットが関心を持つキーワードを解析結果と照合し、自動的にコメント付きでポストします。\n\nRSSアイテムをデータベースに取り込むには、[feedAggregator](https://blog.crazynewworld.net/2018/10/29/323/) など別のツールを使用してください。\n\n設定ファイル (`config.yml`) を編集することで、複数のボットを並行運用できます。\n\n## 必要なソフトウェア\n\n事前に以下をインストールしてください。\n\n- MySQL\n- [Juman++ 2.0.0-rc3](http://nlp.ist.i.kyoto-u.ac.jp/index.php?JUMAN++)\n\n## 主な機能\n\n- 日本語・英語のRSSフィードに対応（解析後のポストは日本語）。\n- ポスト間隔、コメント、キーワード等を細かく設定可能。\n- 「いい（＋ボット固有の語尾）」とメンションすると肯定または否定の反応を返します。\n- 「フォロー」を含むメンションでユーザーを自動的にフォロー。\n- 場所と時間（今、今日、明日、明後日）を含めて天気を尋ねると、[OpenWeatherMap](https://openweathermap.org) から取得した天気情報を返答。「体感」を含めると体感温度で回答。\n- 就寝・起床時間を設定可能。活動しない時間帯を設定できます。同一時刻に設定すると24時間稼働します。\n- 設定で `LivesWithSun` を `true` にすると、緯度経度に基づく日の出・日の入り時刻に連動して寝起きします（[Yahoo! YOLP API](https://developer.yahoo.co.jp/webapi/map/) を使用）。\n- 設定で `RandomFrequency` を設定すると、ランダムにポスト可能（`RandomToots` にメッセージを記述）。\n- `-p \u003c整数\u003e` オプション付きで起動すると、指定分数のみ稼働。\n\n## セットアップ方法\n\n1. `database_tables.sql` をMySQLデータベースにインポートし、feedAggregator等でRSSアイテムを定期取得。\n2. `cmd/mastobots` 内で `go build` し、`mastobots` 実行ファイルを作成。\n3. `config.yml.example` を `config.yml` にコピー・編集。\n4. `./mastobots` でボットを起動。systemdやscreenでバックグラウンド稼働を推奨。\n\n## クレジット\n\n- Webサービス提供：Yahoo! JAPAN ([Yahoo! YOLP API](https://developer.yahoo.co.jp/sitemap/))\n- 天気情報提供：[OpenWeatherMap](https://openweathermap.org)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanage999%2Fmastobots","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhanage999%2Fmastobots","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanage999%2Fmastobots/lists"}