{"id":28239734,"url":"https://github.com/miscord-dev/annict-epgstation-connector","last_synced_at":"2025-08-02T00:35:11.424Z","repository":{"id":65365733,"uuid":"380482984","full_name":"miscord-dev/annict-epgstation-connector","owner":"miscord-dev","description":"Annictの「見たい」作品をEPGStationの録画予約ルールへ同期するコマンド","archived":false,"fork":false,"pushed_at":"2025-07-08T17:43:34.000Z","size":287,"stargazers_count":8,"open_issues_count":13,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-08T18:54:22.664Z","etag":null,"topics":["annict","cli","epgstation","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miscord-dev.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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-06-26T11:14:15.000Z","updated_at":"2025-07-08T17:43:37.000Z","dependencies_parsed_at":"2023-10-23T22:31:55.555Z","dependency_job_id":"5b816307-6a80-418f-8fb8-13247889d992","html_url":"https://github.com/miscord-dev/annict-epgstation-connector","commit_stats":null,"previous_names":["miscord-dev/annict-epgstation-connector"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/miscord-dev/annict-epgstation-connector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miscord-dev%2Fannict-epgstation-connector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miscord-dev%2Fannict-epgstation-connector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miscord-dev%2Fannict-epgstation-connector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miscord-dev%2Fannict-epgstation-connector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miscord-dev","download_url":"https://codeload.github.com/miscord-dev/annict-epgstation-connector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miscord-dev%2Fannict-epgstation-connector/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265445338,"owners_count":23766448,"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":["annict","cli","epgstation","golang"],"created_at":"2025-05-19T02:13:04.581Z","updated_at":"2025-07-15T16:34:12.112Z","avatar_url":"https://github.com/miscord-dev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# annict-epgstation-connector\n\nA service that automatically creates recording rules in EPGStation based on your anime watch list from Annict.\n\n## Overview\n\nThis connector synchronizes your anime watch status from [Annict](https://annict.com/) (a Japanese anime tracking service) to [EPGStation](https://github.com/l3tnun/EPGStation) (a Japanese TV recording system). It automatically creates recording rules for anime you want to watch, are currently watching, or have on hold, while optionally excluding shows available on streaming services.\n\n### Key Features\n\n- **Automatic Recording Rules**: Creates EPGStation recording rules based on your Annict watch status\n- **VOD Service Filtering**: Skip recording for anime available on streaming services like Netflix, Amazon Prime, Hulu, etc.\n- **Daemon Mode**: Continuous synchronization with configurable intervals\n- **Rule Removal**: Automatically removes recording rules when you mark anime as completed or dropped\n- **Prometheus Metrics**: Built-in monitoring and metrics collection\n- **Deduplication**: Prevents duplicate recording rules using local database storage\n\n## Prerequisites\n\n- Go 1.24 or later\n- Running EPGStation instance\n- Annict account with API access\n\n## Installation\n\n### From Source\n\n```bash\ngit clone https://github.com/miscord-dev/annict-epgstation-connector\ncd annict-epgstation-connector\ngo build ./cmd/annict-epgstation-connector\n```\n\n### Using Go Install\n\n```bash\ngo install github.com/miscord-dev/annict-epgstation-connector/cmd/annict-epgstation-connector@latest\n```\n\n## Setup\n\n### 1. Get Annict API Token\n\n1. Visit [Annict Developer Console](https://annict.com/settings/apps)\n2. Create a new application or use an existing one\n3. Copy your API token\n\n### 2. Configure EPGStation\n\nEnsure your EPGStation instance is running and accessible. The default API endpoint is typically `http://localhost:8888/api`.\n\n### 3. Set Environment Variables\n\n```bash\nexport ANNICT_API_TOKEN=\"your-annict-api-token\"\nexport EPGSTATION_ENDPOINT=\"http://localhost:8888/api\"\n```\n\n## Usage\n\n### Basic Usage (One-time Sync)\n\n```bash\n./annict-epgstation-connector sync\n```\n\n### Daemon Mode (Continuous Sync)\n\n```bash\n# Run with default 60-second interval\n./annict-epgstation-connector sync --daemon\n\n# Custom interval (5 minutes)\n./annict-epgstation-connector sync --daemon --interval 300\n\n# With custom database path and metrics endpoint\n./annict-epgstation-connector sync --daemon \\\n  --interval 300 \\\n  --db-path /path/to/database \\\n  --metrics-listen-address :9090\n```\n\n### VOD Service Filtering\n\nExclude recording rules for anime available on streaming services:\n\n```bash\n# Exclude Netflix and Amazon Prime\n./annict-epgstation-connector sync --exclude-vod-services netflix,amazon-prime\n\n# With fallback detection (searches all page links when specific VOD section not found)\n./annict-epgstation-connector sync \\\n  --exclude-vod-services netflix,hulu \\\n  --enable-vod-fallback\n```\n\n**Supported VOD Services:**\n\n- `netflix` - Netflix\n- `amazon-prime` - Amazon Prime Video\n- `hulu` - Hulu\n- `disney` - Disney+\n- `abema` - AbemaTV\n- `crunchyroll` - Crunchyroll\n- `funimation` - Funimation\n- `dazn` - DAZN\n- `bandai` - Bandai Channel\n- `nico` - Niconico\n- `danime` - dAnime Store\n\n### Automatic Rule Removal\n\nEnable automatic removal of recording rules when anime is marked as completed or dropped:\n\n```bash\n./annict-epgstation-connector sync --enable-rule-removal\n```\n\n### Complete Example\n\n```bash\n./annict-epgstation-connector sync \\\n  --daemon \\\n  --interval 300 \\\n  --exclude-vod-services netflix,amazon-prime,hulu \\\n  --enable-vod-fallback \\\n  --enable-rule-removal \\\n  --metrics-listen-address :9090 \\\n  --db-path /opt/annict-connector/db\n```\n\n## Configuration\n\n### Command Line Options\n\n| Flag | Description | Default |\n|------|-------------|---------|\n| `--daemon, -d` | Run as a daemon | `false` |\n| `--interval, -i` | Sync interval in seconds (daemon mode) | `60` |\n| `--metrics-listen-address` | Metrics HTTP server address | `:8080` |\n| `--db-path, --db` | Database storage path | `/tmp/annict-epgstation-connector` |\n| `--exclude-vod-services` | Comma-separated list of VOD services to exclude | `none` |\n| `--enable-vod-fallback` | Enable fallback VOD detection | `false` |\n| `--enable-rule-removal` | Enable automatic rule removal | `false` |\n\n### Environment Variables\n\n| Variable | Description | Required |\n|----------|-------------|----------|\n| `ANNICT_API_TOKEN` | Your Annict API token | Yes |\n| `EPGSTATION_ENDPOINT` | EPGStation API endpoint | Yes |\n\n## Monitoring\n\nWhen running in daemon mode, Prometheus metrics are exposed at the configured metrics endpoint (default: `:8080/metrics`).\n\n### Available Metrics\n\nThe service exposes various metrics for monitoring synchronization status, recording rule creation, and error rates.\n\n## Development\n\n### Building\n\n```bash\ngo build ./cmd/annict-epgstation-connector\n```\n\n### Code Generation\n\n```bash\nmake generate  # Runs go generate ./...\n```\n\n### Testing\n\n```bash\n# Run E2E tests\nginkgo tests/e2e/\n\n# Or using Go test runner\ngo test ./tests/e2e/\n```\n\n### Linting\n\nThe project uses golangci-lint for code quality checks:\n\n```bash\ngolangci-lint run\n```\n\n## Architecture\n\n- **CLI**: Built with urfave/cli/v2\n- **Annict Client**: GraphQL client using genqlient\n- **EPGStation Client**: REST client using oapi-codegen\n- **Database**: CockroachDB Pebble for local key-value storage\n- **VOD Checker**: Web scraper for streaming service availability\n- **Metrics**: Prometheus metrics collection\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests if applicable\n5. Run tests and linting\n6. Submit a pull request\n\n## Support\n\nFor issues and questions, please use the GitHub issue tracker.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiscord-dev%2Fannict-epgstation-connector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiscord-dev%2Fannict-epgstation-connector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiscord-dev%2Fannict-epgstation-connector/lists"}