How fuadnurfahmi23-droid/scraping-data-mahasiswa- works
This Go CLI collects public Google News RSS headlines for keyword/year queries, or reloads saved raw JSON, then deduplicates, filters and classifies relevant headlines before producing statistics and reports. Its principal runtime entry is the CLI orchestrator; fetching, analysis and reporting are distinct stages, with generic functional primitives supporting those layers. The graph follows the shown main, scraper, classifier and report calls. RSS parsing and file outputs are represented as documented in the README; no unsampled implementation details are assumed.
Main entry points: main.go CLI and workflow · classify.go Analysis pipeline · fp.go Functional primitives · scraper.go RSS parsing
Components 17
CLI orchestration
- CLI and workflow
main.go
News collection
- Query generation
scraper.go - Fetch middleware
scraper.go - RSS parsing
scraper.go
Analysis core
- Article model
model.go - Analysis pipeline
classify.go - Relevance filter
classify.go - Cause classification
classify.go
Functional utilities
- Functional primitives
fp.go
Reporting
- Offline article input
report.go - Statistics
report.go - Console report
report.go - Raw articles JSON
hasil/mentah.json - Classified articles CSV
hasil/kematian_mahasiswa.csv - Statistics JSON
hasil/ringkasan.json
Other components
- CLI user
- Google News RSS
Connections 19
- CLI user → CLI and workflow: runs
README.md - CLI and workflow → Query generation: builds queries
main.go - Query generation → Functional primitives: uses transforms
scraper.go - CLI and workflow → Fetch middleware: configures fetch
main.go - Fetch middleware → Google News RSS: requests RSS
scraper.go - CLI and workflow → RSS parsing: scrapes feeds
main.go - RSS parsing → Article model: creates articles
scraper.go - RSS parsing → Functional primitives: parses concurrently
scraper.go - CLI and workflow → Offline article input: loads saved data
main.go - CLI and workflow → Raw articles JSON: saves raw articles
main.go - CLI and workflow → Analysis pipeline: analyzes articles
main.go - Analysis pipeline → Relevance filter: filters headlines
classify.go - Analysis pipeline → Cause classification: assigns causes
classify.go - Analysis pipeline → Functional primitives: composes transforms
classify.go - CLI and workflow → Statistics: builds statistics
main.go - Statistics → Functional primitives: counts and sorts
report.go - CLI and workflow → Console report: renders report
main.go - CLI and workflow → Classified articles CSV: writes CSV
main.go - CLI and workflow → Statistics JSON: writes summary
main.go