Skip to content

Instantly share code, notes, and snippets.

View MKyhos's full-sized avatar

Malte Kyhos MKyhos

View GitHub Profile
@MKyhos
MKyhos / buergerbot.rb
Created August 18, 2021 20:59 — forked from pbock/buergerbot.rb
Bürgerbot: Refreshes the Berlin Bürgeramt page until an appointment becomes available, then notifies you.
#!/usr/bin/env ruby
require 'watir-webdriver'
def log (message) puts " #{message}" end
def success (message) puts "+ #{message}" end
def fail (message) puts "- #{message}" end
def notify (message)
success message.upcase
system 'osascript -e \'Display notification "Bürgerbot" with title "%s"\'' % message
rescue StandardError => e