项目
在 GitHub 查看
jason5ng32/OhEarningsCal
关于
在日历应用中订阅美国股票的财报日期
效率与自动化实测星标增长
- 24小时
- 0
- 7天
- +1
- 15天
- +1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文OhEarningsCal
Subscribe to US stock earnings dates from your calendar app. This started as a tool I built for myself — I'd rather glance at my calendar than open a brokerage app — and turned out useful enough to open-source.
Just use it
Visit https://earnings.beavern.com/, pick a calendar, copy the link, then add it as a calendar subscription in your app of choice.
The calendars cover the US market only, in a rolling window of ±30 days around today (anything further out isn't accurate enough to matter).
Calendars
| File | Contents |
|---|---|
all.ics |
Every company that reports earnings in the window |
nasdaq100.ics |
Nasdaq-100 constituents |
sp500.ics |
S&P 500 constituents |
dow30.ics |
Dow Jones Industrial Average constituents |
customstock.ics |
A custom watchlist driven by the CUSTOM_STOCKS env var |
selected.ics |
Union of the four above, deduplicated |
Self-hosting
- Fork this repo
- Settings → Pages → Source → switch to GitHub Actions
- Settings → Secrets and variables → Actions → Variables → add:
SHOULD_GEN_SELECTED=true/falseSHOULD_GEN_ALL=true/falseCUSTOM_STOCKS= comma-separated tickers, e.g.PDD,BABA,TCEHY(leave empty to skipcustomstock.ics)
- Wait for the next scheduled run, or kick off Actions → Update earnings calendar → Run workflow manually.
Automation
| Workflow | Schedule | What it does |
|---|---|---|
earnings.yml |
Daily 04:34 / 16:34 UTC | Fetch earnings → build ics → deploy to GitHub Pages |
indices.yml |
Mondays 06:17 UTC | Refresh index constituents from Wikipedia, commit data/indices/ |
Earnings data is cached in GitHub Actions cache, never in git — main only carries source code and the index constituents.
Local development
pnpm install
cp .env.example .env # edit env vars
pnpm fetch:indices # first run / when refreshing constituents
pnpm fetch # pull yesterday + next 30 days into data/earnings/
pnpm gen # write docs/ics/*.ics
pnpm dev # http://localhost:18302
Convenience endpoints on the dev server:
GET /dev/fetch— trigger onefetchGET /dev/fetch-indices— trigger onefetch:indicesGET /dev/gen— trigger onegen
Layout
src/
├── lib/ # shared helpers (date, paths, http, fs)
├── config/ # env parsing, index metadata
├── fetch/ # data sources: Nasdaq earnings, Wikipedia constituents
├── process/ # filter + dedupe earnings rows
├── generate/ # build .ics files
├── cli/ # entrypoints (fetch / fetch-indices / gen)
└── server.js # local dev server
data/
├── earnings/ # daily JSON cache (gitignored, GH Actions cache between runs)
└── indices/ # index constituents, refreshed weekly (in git)
docs/
├── index.html # static landing page
├── CNAME
└── ics/ # generated .ics files (gitignored, written by build)
探索相关项目
加载中…