Blocker.day

Blocker.day is a Cloudflare Worker that generates a unique .ics calendar feed of random (but deterministic) blocks of unavailable time.

Blocker.day can quickly populate an otherwise empty or sparse calendar or scheduling app, including Cal.com and SavvyCal.

Features

Updates for Codex

  1. remove SEED_VALUE_ONLY and corresponsing code
  2. update (shorten) the names of corresponsing variables to: DAYS, HOURS, NAME, PROBABILITY, SEED
  3. remove any code that sets SEED using URL filepath or filename
  4. set DAYS, HOURS, PROBABILITY, and/or SEED using URL query string (if present)
  5. allow HOURS to be set to 0.5 (to enable time blocks that are 30 minutes in length)
  6. add SEED_VIA_URL variable; if TRUE then SEED varable is determined by URL query (if present); default is false

Add or Subscribe

Add or subscribe to blocker.day in your calendar or scheduling app:

blocker.day/calendar
blocker.day/calendar.ics
blocker.day/calendar.ics?days=7&hours=4&probability=0.40

The .ics file extention is optional. DAYS, HOURS, and PROBABILITY can be set in the URL query string.

Deploy

Deploy your own Cloudflare Worker to change all settings (using environment variables) including TIMEZONE, NAME, SEED, and, SEED_VIA_URL.

Option 1: Deploy to Cloudflare

Deploy to Cloudflare

Option 2: Manual Deployment

  1. Clone this repo:
git clone https://github.com/andesco/blocker.day.git
cd blocker.day
  1. Customize default variables in wrangler.toml as needed. Example:
BLOCK_PROBABILITY = "0.25"
TIMEZONE = "America/Vancouver"
BLOCK_HOURS = "4"
TOTAL_DAYS = "21"
  1. Install Cloudflare’s Wrangler CLI, login, and deploy:
npm install -g wrangler
wrangler login
wrangler deploy

Usage

Add or subscribe to a calendar using your worker subdomain, a custom subdomain, or blocker.day:

https://appname.username.workers.dev/calendar

https://subdomain.personal.com/calendar

http://blocker.day/calendar

Calendar feeds generate consistent blocks of time based on the seed being used. To get a new set of randomized (but deterministic) blocks of time, update your Cloudflare Worker environment variables:

Variables

Variable Description Default
DAYS number of days:
1–21
14
HOURS hours in each block of time:
0.5, 1, 2, 3, 4, 6, 8, 12, 24
3
TIMEZONE IANA timezone:
timezone identifier
America/Toronto
NAME calendar/event name displayed in apps Blocker.day
PROBABILITY probability of a time block:
0.00–1.00
0.50
SEED default seed value default-seed-value
SEED_VIA_URL set SEED using URL query (
true, false
false