summaryrefslogtreecommitdiff
path: root/config.scm
diff options
context:
space:
mode:
authorMatthew Fennell <matthew@fennell.dev>2026-04-16 08:15:35 +0100
committerMatthew Fennell <matthew@fennell.dev>2026-04-16 08:15:35 +0100
commit5dce88bcad0a1263984b71fa19ef26393d781960 (patch)
treecf3289fbedb56a7cb566a50b73788c8f44f64bc1 /config.scm
Initial commit
Diffstat (limited to 'config.scm')
-rw-r--r--config.scm27
1 files changed, 27 insertions, 0 deletions
diff --git a/config.scm b/config.scm
new file mode 100644
index 0000000..46d0bf2
--- /dev/null
+++ b/config.scm
@@ -0,0 +1,27 @@
+;;; SPDX-FileCopyrightText: 2026 Matthew Fennell <matthew@fennell.dev>
+;;;
+;;; SPDX-License-Identifier: AGPL-3.0-or-later
+
+(include "secrets.scm")
+(include "util.scm")
+
+(define default-venues '(botwell-green-leisure-centre))
+(define default-activities '(badminton-40min badminton-60min))
+(define default-dates '(sat sun))
+(define default-checkout #t)
+(define default-user matthew)
+
+(define (default-scorer booking)
+ (let ((score (lambda (cond amount) (if cond amount 0))))
+ (+
+ (score (rob-friendly? booking) 4)
+ (score (badminton-60min? booking) 2)
+ (score (sat? booking) 1)
+ (score (unreasonable-time? booking) -8)
+ )))
+
+(define (rob-friendly? booking)
+ (between-hours? booking "13:00" "18:00"))
+
+(define (unreasonable-time? booking)
+ (not (between-hours? booking "10:00" "22:00")))