6 (for-each eval (with-input-from-file "garden.scm" read-list))
7 (serve-document-header (ext->mime "gmi"))
8 (let ((query (uri-query uri)))
11 (print "=> register.scm Please register first."))
12 (let ((hash (symbol->string (caar query))))
14 (let* ((g (with-input-from-file (make-pathname "accounts" hash) read))
15 (user (garden-prop 'user g))
16 (visits (+ 1 (garden-prop 'visits g))))
17 (garden-prop-set! 'visits visits g)
19 (print "# " user "'s garden\n")
21 (print "Welcome back, " user "!\n")
23 (print "Welcome to your new garden, " user "!\n"
25 "## !!Important!!\n\n"
26 "To visit and check on your garden, you'll need to use this link:\n"
27 (uri->string uri) "\n"
28 "Remember to bookmark it to keep it safe!\n")))
31 (with-output-to-file (make-pathname "accounts" hash)
40 (print "\nWater level:")
42 (display-water-level g)
46 (print "\n=> water.scm?" hash " Water plant\n")
48 (when (= (garden-prop 'stage-idx g) 5)
49 (print "=> plant-new.scm?" hash " Plant a new seed\n"))
52 "=> help.scm?" hash " Caring for your plant (Instructions)\n"
54 "=> delete-confirm.scm?" hash " Delete garden (Irreversible!)\n"
56 "=> ./ μBotany start page"))
59 (print "This garden no longer exists.\n\n"
60 "=> register.scm Register to create another.")))))))