Today's lap swim schedule at Baltimore's Waverly and Towson Ys in the terminal.
Schedules are scraped with Playwright, logged to stdout, and cached in a local json file for the day. The app is ran automatically by launchd on login and every 5 minutes.
- macOS
jqinstalled via Homebrew at /opt/homebrew/bin/jq- Node.js installed via
nvmat ~/.nvm lapswiminstalled at ~/Code
- Clone
lapswim - Install dependencies
npm i- Copy the sample plist file to your user agent directory and rename it
cp ./src/local.lapswim.plist.sample ~/Library/LaunchAgents/local.lapswim.plist- Edit the
ProgramandStandardErrorPathkey values in ~/Library/LaunchAgents/local.lapswim.plist so the paths correspond to your machine - Load the plist file with launchd
launchctl load ~/Library/LaunchAgents/local.lapswim.plist- Set an alias in your terminal config file
# .zshrc, .bashrc, etc
alias swim='node ~/Code/lapswim/src/lapswim.mjs'- Open a new terminal and run the
swimalias to get today's lap swim times!
swim
> Saturday, December 2
>
> Waverly
> -------
> 7:00am-8:15am (3 lanes)
> 8:15am-12:30pm (1 lane)
> 12:30pm-6:30pm (3 lanes)
>
> Towson
> ------
> 7:00am-8:30am (6 lanes)
> 8:30am-12:00pm (4 lanes)
> 12:00pm-6:45pm (4 lanes)
>
> https://ymaryland.org/locations/weinbergy/weinbergschedules
> https://ymaryland.org/locations/orokaway/orokawascheduleslaunchdtutorial- launchd.plist man page
- https://8thlight.com/insights/tutorial-add-a-menu-bar-extra-to-a-macos-app
- Tauri menubar app template - Vite and Vue, app shows in dock and
alt + tab - Build a Menubar app with Tauri
- Build A Menu Bar App With Python & Rumps (no audio)
- Create a mac menu bar app in SwiftUI with MenuBarExtra
- Building macOS Menu Bar Stocks App Using SwiftUI
- Building a ChatGPT macOS toolbar app using SwiftUI
- Creating Menu Bar App in macOS Using AppKit
- SwiftUI
- AppKit
- Electron Tray tutorial
Open a PR!
Brian Zelip, https://zelip.me
GPLv3