https://github.com/umstek/powercuts-schedule-lk
https://github.com/umstek/powercuts-schedule-lk
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/umstek/powercuts-schedule-lk
- Owner: umstek
- License: mit
- Created: 2022-04-02T08:01:09.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-05-01T04:07:22.000Z (over 3 years ago)
- Last Synced: 2024-11-17T15:20:59.547Z (12 months ago)
- Language: TypeScript
- Size: 22.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Power-cuts schedule fetching automation
Strictly for educational purposes only.
## Running as CLI
1. `npm i -g zx`
2. `chmod +x ceb.mjs`
3. `./ceb.mjs --from 2022-02-03 --to 2022-02-05 --acctNo 9999999999`
## Running as a cloudflare worker
This doesn't work when hosted, probably because of the cloudflare worker CPU time limitation. This is only 10ms per request, and loading an external website, specially a Sri Lankan government website might be taking more than that. However, the offline version works with `pnpm start`.
## Experimental stack
+ Language: TypeScript (+JavaScript)
+ Code formatter: Prettier
+ Dependency Manager: pnpm
+ Transpiler/bundler: swc/spack
+ Hosting: CloudFlare workers
+ Frameworks:
+ Miniflare - (Cloudflare workers emulator)
+ Hono - Edge/Workers web framework
+ Telegraf - Telegram bot framework
+ VCS/Provider: Git/GitHub