Goondex/internal/scraper/tpdb/scraper.go
Team Goon 2e747c6660 Initial release: v0.1.0-dev1
Clean slate initialization of Goondex - a fast, local-first media indexer.

Features:
- SQLite database with WAL mode and foreign keys
- Full schema for performers, studios, scenes, and tags
- Many-to-many relationships via junction tables
- CRUD stores for all entities with search capabilities
- CLI with performer/studio/scene search commands
- Pluggable scraper architecture with registry
- TPDB client stub (ready for implementation)
- Configuration system via YAML files
- Comprehensive .gitignore and documentation

Architecture:
- cmd/goondex: CLI application with Cobra
- cmd/goondexd: Daemon placeholder for v0.2.0
- internal/db: Database layer with stores
- internal/model: Clean data models
- internal/scraper: Scraper interface and TPDB client
- config/: YAML configuration templates

Database schema includes indexes on common query fields and uses
RFC3339 timestamps for consistency.

Built and tested successfully with Go 1.25.4.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 21:37:26 -05:00

61 lines
1.7 KiB
Go

package tpdb
import (
"context"
"git.leaktechnologies.dev/stu/Goondex/internal/model"
)
// Scraper implements the scraper.Scraper interface for TPDB
type Scraper struct {
client *Client
}
// NewScraper creates a new TPDB scraper
func NewScraper(baseURL, apiKey string) *Scraper {
return &Scraper{
client: NewClient(baseURL, apiKey),
}
}
// Name returns the scraper's unique identifier
func (s *Scraper) Name() string {
return "tpdb"
}
// SearchPerformers searches for performers by query string
func (s *Scraper) SearchPerformers(ctx context.Context, query string) ([]model.Performer, error) {
// TODO: Implement TPDB performer search
return nil, nil
}
// SearchStudios searches for studios by query string
func (s *Scraper) SearchStudios(ctx context.Context, query string) ([]model.Studio, error) {
// TODO: Implement TPDB studio search
return nil, nil
}
// SearchScenes searches for scenes by query string
func (s *Scraper) SearchScenes(ctx context.Context, query string) ([]model.Scene, error) {
// TODO: Implement TPDB scene search
return nil, nil
}
// GetSceneByID retrieves a scene by its remote ID
func (s *Scraper) GetSceneByID(ctx context.Context, remoteID string) (*model.Scene, error) {
// TODO: Implement TPDB scene by ID
return nil, nil
}
// GetPerformerByID retrieves a performer by its remote ID
func (s *Scraper) GetPerformerByID(ctx context.Context, remoteID string) (*model.Performer, error) {
// TODO: Implement TPDB performer by ID
return nil, nil
}
// GetStudioByID retrieves a studio by its remote ID
func (s *Scraper) GetStudioByID(ctx context.Context, remoteID string) (*model.Studio, error) {
// TODO: Implement TPDB studio by ID
return nil, nil
}