Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gowee/lccal-worker
Auto-generated 📅 iCal/ics (calendar) for Leetcode Contests on Cloudflare Workers
https://github.com/gowee/lccal-worker
cloudflare-workers ical leetcode leetcode-contest leetcode-contests svg
Last synced: 3 months ago
JSON representation
Auto-generated 📅 iCal/ics (calendar) for Leetcode Contests on Cloudflare Workers
- Host: GitHub
- URL: https://github.com/gowee/lccal-worker
- Owner: Gowee
- License: apache-2.0
- Created: 2020-04-23T11:41:34.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T14:30:34.000Z (about 2 years ago)
- Last Synced: 2023-03-06T00:41:13.471Z (almost 2 years ago)
- Topics: cloudflare-workers, ical, leetcode, leetcode-contest, leetcode-contests, svg
- Language: TypeScript
- Homepage:
- Size: 714 KB
- Stars: 12
- Watchers: 2
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE_APACHE
Awesome Lists containing this project
README
# lccal-worker
A script that generates 📅 [iCal/ics](https://tools.ietf.org/html/rfc5545) for Leetcode (Bi)Weekly Contests, deployed on Cloudflare Workes: [https://lccal-worker.bamboo.workers.dev/ical?download](https://lccal-worker.bamboo.workers.dev/ical).
## iCal generator
**Endpoint**: [`/ical`](https://lccal-worker.bamboo.workers.dev/ical)A subscribable [iCal/ics](https://tools.ietf.org/html/rfc5545) file.
For example, add `https://lccal-worker.bamboo.workers.dev/ical` to Google Calendar via https://calendar.google.com/calendar/r/settings/addbyurl. Then it will get updated automatically when there are new contests.
Most other calendar services also support subscribing by URL: https://duck.com/?q=how+to+subscribe+ical+by+url .
## SVG generator
**Endpoint**: [`/svg`](https://lccal-worker.bamboo.workers.dev/svg)An auto-generated SVG for fun.
| Name | Description |
| ------ | ------------------------------------------------- |
| width | The size of the generated SVG. `300` by default. |
| height | The size of the generated SVG. `auto` by default. |For example:
[![SVG](https://lccal-worker.bamboo.workers.dev/svg?width=180&limit=5)](https://lccal-worker.bamboo.workers.dev/svg?width=300&limit=5)
[![SVG](https://lccal-worker.bamboo.workers.dev/svg?width=180&offset=5&limit=5&timezone=Asia/Shanghai)](https://lccal-worker.bamboo.workers.dev/svg?width=300&height=auto&offset=5&limit=5®ion=CN&timezone=Asia/Shanghai)
.## Other params
The following URL query params are for both of the two endpoint above.| Name | Description |
| -------- | ------------------------------------------------------------------------------------- |
| offset | N-th contests, in descending order of time, to start. `0` by default. |
| limit | The number of contests to get. `10` by default. |
| region | LeetCode's data region, either `US` or `CN`. `US` by default. |
| timezone | Timezone to use in calendar. `Asia/Shanghai` by default when `region=CN`. `UTC` O.W. |
| download | When present and not `false` or `0`, instruct the browser to save the generated file. |