How abraham-ny/sitemaptool works
SitemapTool is a Cobra-based command-line sitemap manager. Users configure it, add URLs or create sitemaps, then inspect statistics or ping search engines. The sampled source shows configuration and database loading, robots checks, URL deduplication, rotation, and sitemap persistence in one file; sitemap-index generation, VCS filtering, and some command behavior are documented but their implementations were not sampled, so uncertain call paths are omitted.
Main entry points: main.go Command handlers
Components 21
CLI
- Command entry
main.go - Command handlers
main.go - Statistics
main.go
Sitemap management
- Sitemap manager
main.go - Add URL
main.go - URL deduplication
main.go - Sitemap rotation
main.go - Sitemap files
main.go - Sitemap database
main.go - Sitemap index
main.go
Configuration and policy
- Configuration
main.go - Config file
main.go - Robots policy
main.go - robots.txt
main.go - VCS filtering
main.go - .gitignore rules
External integrations
- Search engine ping
main.go - Search engines
- Update checker
main.go - Release service
Other components
- User
Connections 25
- User → Command entry: runs
- Command entry → Command handlers: dispatches
- Command handlers → Sitemap manager: creates
- Sitemap manager → Config file: loads/saves
- Sitemap manager → Sitemap database: loads/saves
- Sitemap manager → Robots policy: loads rules
- Robots policy → robots.txt: reads
- Command handlers → Configuration: configures
- Configuration → Config file: writes
- Command handlers → Add URL: adds URL
- Add URL → Robots policy: checks policy
- Add URL → URL deduplication: checks hash
- Add URL → Sitemap rotation: gets current
- Sitemap rotation → Sitemap database: reads/writes
- Add URL → Sitemap files: writes URL
- Add URL → Sitemap database: updates state
- Command handlers → Sitemap index: generates
- Command handlers → VCS filtering: filters paths
- VCS filtering → .gitignore rules: reads rules
- Command handlers → Statistics: requests
- Statistics → Sitemap database: reads
- Command handlers → Search engine ping: requests
- Search engine ping → Search engines: pings
- Command handlers → Update checker: checks/updates
- Update checker → Release service: checks/downloads