How ivanglinkin/cctv works
CCTV is a Telegram-based nearby-user location collection and mapping tool; the README states Telegram disabled the feature in September 2024, so the documented principal workflow no longer works as described. In the former CLI workflow, start.py moves through configured coordinates, queries Telegram, records sightings, and generates per-run and combined map reports. Supporting stages include avatar retrieval and location lookup. The repository also includes a separate desktop GUI and Leaflet map assets. Edges reflect calls and integrations visible in excerpts or explicitly documented; unsampled code limits certainty about additional wiring.
Main entry points: start.py CLI orchestrator · json_into_html.py HTML map renderer · combine_data.py Combined report workflow · functions.py Avatar retrieval
Components 19
Collection workflow
- CLI orchestrator
start.py - Coordinate sweep
start.py - Nearby-user query
start.py - Sightings data
start.py
Collection support
- Settings setup
backend/functions.py - Coordinate helpers
backend/functions.py - Avatar retrieval
backend/functions.py - Location lookup
backend/functions.py - JSON combination
backend/functions.py
Reports and maps
- Combined report workflow
backend/combine_data.py - HTML map renderer
backend/json_into_html.py - Leaflet mapping
leaflet/leaflet-src.js - Marker clustering
leaflet/js/leaflet.markercluster.js
Desktop interface
- Desktop GUI
GUI_template.py
Other components
- Operator
- Telegram API
- Telegram profiles
- Nominatim
- OpenStreetMap tiles
Connections 18
- Operator → CLI orchestrator: runs
README.md - CLI orchestrator → Settings setup: creates settings
start.py - CLI orchestrator → Coordinate sweep: builds sweep
start.py - Coordinate sweep → Coordinate helpers: calls
start.py - CLI orchestrator → Nearby-user query: runs queries
start.py - Nearby-user query → Telegram API: queries nearby users
start.py - Nearby-user query → Sightings data: records sightings
start.py - CLI orchestrator → Avatar retrieval: downloads avatars
start.py - Avatar retrieval → Telegram profiles: fetches profile images
backend/functions.py - CLI orchestrator → HTML map renderer: renders report
start.py - CLI orchestrator → Combined report workflow: starts combined report
start.py - Combined report workflow → JSON combination: combines JSON
backend/combine_data.py - Combined report workflow → HTML map renderer: renders combined map
backend/combine_data.py - HTML map renderer → Leaflet mapping: uses map library
backend/json_into_html.py - HTML map renderer → Marker clustering: clusters markers
backend/json_into_html.py - HTML map renderer → OpenStreetMap tiles: loads map tiles
backend/json_into_html.py - Operator → Desktop GUI: opens interface
GUI_template.py - Location lookup → Nominatim: looks up places
backend/functions.py