How kholidfu/twitsaham works
twitsaham is a small Python script for fetching IHSG history, calculating technical-analysis series, saving a chart, and uploading that image to Twitter. Running app.py imports pandasaham.py, whose module-level dl() runs once, then calls dl() again; each run downloads and analyzes the data. The README describes Moving Average and Bollinger Bands; the sampled code calculates a 12-day rolling mean and 20-day Bollinger Bands. It saves ihsg.png rather than displaying the chart. The arrows reflect the sampled code, including its two download calls.
Main entry points: pandasaham.py IHSG download and analysis · app.py Twitter workflow · table.csv History CSV
Components 8
Orchestration
- Twitter workflow
app.py
Data analysis
- IHSG download and analysis
pandasaham.py - History CSV
table.csv - Chart image
External integrations
- Yahoo Finance
- Matplotlib
- Twitter API
Other components
- Script runner
Connections 9
- Script runner → Twitter workflow: runs
- Twitter workflow → IHSG download and analysis: imports; calls dl
- IHSG download and analysis → Yahoo Finance: fetches history
- Yahoo Finance → IHSG download and analysis: returns CSV data
- IHSG download and analysis → History CSV: writes; reads
- IHSG download and analysis → Matplotlib: plots series
- IHSG download and analysis → Chart image: saves chart
- Twitter workflow → Chart image: opens image
- Twitter workflow → Twitter API: uploads media