Barghvim = Bargh (برق / Power) + Taqvim (تقویم / Calendar)
A tiny Go service that fetches planned power outages from the official API (برق من) and exposes them as an iCalendar (.ics) feed. Subscribe once, and see all upcoming blackouts directly in your Google, Apple, or Outlook calendar.
- Pulls planned outages for your bill number (شناسه قبض) using your API token
- Converts Shamsi (جلالی) dates to Gregorian
- Serves an
.icsfeed ready to import into any calendar app
You’ll see events like:
Planned Power Outage
⏰ 2025-09-07, 09:00 → 11:00
directly in your calendar.
Subscribe in Google Calendar, Apple Calendar, Outlook, etc.
https://barghvim.vercel.app/v1/<bill_number>/cal.ics?token=<your_token>
Example:
https://barghvim.vercel.app/v1/1234567890/cal.ics?token=eyJhbGciOi...
- Replace
<bill_number>with your real شناسه قبض - Replace
<your_token>with your برق من API token - Token is valid ~6 months; renew and update the URL when needed
Barghvim is stateless.
- No data, bill numbers, or tokens are stored anywhere.
- Everything is fetched live from the برق من API and returned as an
.icsfeed. - Your subscription URL is private — anyone with the link can view it, so don’t share it publicly.
Contributions are welcome!
- Fork the repo
- Create a new branch (
git checkout -b feature/your-feature) - Commit changes (
git commit -m 'Add new feature') - Push to your fork (
git push origin feature/your-feature) - Open a Pull Request
Issues, bug reports, and ideas are also appreciated.
- Repo: github.com/mokhajavi75/barghvim
- Live: barghvim.vercel.app