A service that automatically creates recording rules in EPGStation based on your anime watch list from Annict.
This connector synchronizes your anime watch status from Annict (a Japanese anime tracking service) to 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.
- Automatic Recording Rules: Creates EPGStation recording rules based on your Annict watch status
- VOD Service Filtering: Skip recording for anime available on streaming services like Netflix, Amazon Prime, Hulu, etc.
- Daemon Mode: Continuous synchronization with configurable intervals
- Rule Removal: Automatically removes recording rules when you mark anime as completed or dropped
- Prometheus Metrics: Built-in monitoring and metrics collection
- Deduplication: Prevents duplicate recording rules using local database storage
- Go 1.24 or later
- Running EPGStation instance
- Annict account with API access
git clone https://github.com/miscord-dev/annict-epgstation-connector
cd annict-epgstation-connector
go build ./cmd/annict-epgstation-connector
go install github.com/miscord-dev/annict-epgstation-connector/cmd/annict-epgstation-connector@latest
- Visit Annict Developer Console
- Create a new application or use an existing one
- Copy your API token
Ensure your EPGStation instance is running and accessible. The default API endpoint is typically http://localhost:8888/api
.
export ANNICT_API_TOKEN="your-annict-api-token"
export EPGSTATION_ENDPOINT="http://localhost:8888/api"
./annict-epgstation-connector sync
# Run with default 60-second interval
./annict-epgstation-connector sync --daemon
# Custom interval (5 minutes)
./annict-epgstation-connector sync --daemon --interval 300
# With custom database path and metrics endpoint
./annict-epgstation-connector sync --daemon \
--interval 300 \
--db-path /path/to/database \
--metrics-listen-address :9090
Exclude recording rules for anime available on streaming services:
# Exclude Netflix and Amazon Prime
./annict-epgstation-connector sync --exclude-vod-services netflix,amazon-prime
# With fallback detection (searches all page links when specific VOD section not found)
./annict-epgstation-connector sync \
--exclude-vod-services netflix,hulu \
--enable-vod-fallback
Supported VOD Services:
netflix
- Netflixamazon-prime
- Amazon Prime Videohulu
- Huludisney
- Disney+abema
- AbemaTVcrunchyroll
- Crunchyrollfunimation
- Funimationdazn
- DAZNbandai
- Bandai Channelnico
- Niconicodanime
- dAnime Store
Enable automatic removal of recording rules when anime is marked as completed or dropped:
./annict-epgstation-connector sync --enable-rule-removal
./annict-epgstation-connector sync \
--daemon \
--interval 300 \
--exclude-vod-services netflix,amazon-prime,hulu \
--enable-vod-fallback \
--enable-rule-removal \
--metrics-listen-address :9090 \
--db-path /opt/annict-connector/db
Flag | Description | Default |
---|---|---|
--daemon, -d |
Run as a daemon | false |
--interval, -i |
Sync interval in seconds (daemon mode) | 60 |
--metrics-listen-address |
Metrics HTTP server address | :8080 |
--db-path, --db |
Database storage path | /tmp/annict-epgstation-connector |
--exclude-vod-services |
Comma-separated list of VOD services to exclude | none |
--enable-vod-fallback |
Enable fallback VOD detection | false |
--enable-rule-removal |
Enable automatic rule removal | false |
Variable | Description | Required |
---|---|---|
ANNICT_API_TOKEN |
Your Annict API token | Yes |
EPGSTATION_ENDPOINT |
EPGStation API endpoint | Yes |
When running in daemon mode, Prometheus metrics are exposed at the configured metrics endpoint (default: :8080/metrics
).
The service exposes various metrics for monitoring synchronization status, recording rule creation, and error rates.
go build ./cmd/annict-epgstation-connector
make generate # Runs go generate ./...
# Run E2E tests
ginkgo tests/e2e/
# Or using Go test runner
go test ./tests/e2e/
The project uses golangci-lint for code quality checks:
golangci-lint run
- CLI: Built with urfave/cli/v2
- Annict Client: GraphQL client using genqlient
- EPGStation Client: REST client using oapi-codegen
- Database: CockroachDB Pebble for local key-value storage
- VOD Checker: Web scraper for streaming service availability
- Metrics: Prometheus metrics collection
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Run tests and linting
- Submit a pull request
For issues and questions, please use the GitHub issue tracker.