Initial commit.
authorTim Vaughan <plugd@thelambdalab.xyz>
Thu, 28 May 2020 23:45:05 +0000 (01:45 +0200)
committerTim Vaughan <plugd@thelambdalab.xyz>
Thu, 28 May 2020 23:45:05 +0000 (01:45 +0200)
83 files changed:
LICENSE [new file with mode: 0644]
art/agave1.txt [new file with mode: 0644]
art/agave2.txt [new file with mode: 0644]
art/agave3.txt [new file with mode: 0644]
art/aloe1.txt [new file with mode: 0644]
art/aloe2.txt [new file with mode: 0644]
art/aloe3.txt [new file with mode: 0644]
art/baobab1.txt [new file with mode: 0644]
art/baobab2.txt [new file with mode: 0644]
art/baobab3.txt [new file with mode: 0644]
art/bee.txt [new file with mode: 0644]
art/brugmansia1.txt [new file with mode: 0644]
art/brugmansia2.txt [new file with mode: 0644]
art/brugmansia3.txt [new file with mode: 0644]
art/cactus1.txt [new file with mode: 0644]
art/cactus2.txt [new file with mode: 0644]
art/cactus3.txt [new file with mode: 0644]
art/columbine1.txt [new file with mode: 0644]
art/columbine2.txt [new file with mode: 0644]
art/columbine3.txt [new file with mode: 0644]
art/daffodil1.txt [new file with mode: 0644]
art/daffodil2.txt [new file with mode: 0644]
art/daffodil3.txt [new file with mode: 0644]
art/dead.txt [new file with mode: 0644]
art/fern1.txt [new file with mode: 0644]
art/fern2.txt [new file with mode: 0644]
art/fern3.txt [new file with mode: 0644]
art/ficus1.txt [new file with mode: 0644]
art/ficus2.txt [new file with mode: 0644]
art/ficus3.txt [new file with mode: 0644]
art/flytrap1.txt [new file with mode: 0644]
art/flytrap2.txt [new file with mode: 0644]
art/flytrap3.txt [new file with mode: 0644]
art/hemp1.txt [new file with mode: 0644]
art/hemp2.txt [new file with mode: 0644]
art/hemp3.txt [new file with mode: 0644]
art/iris1.txt [new file with mode: 0644]
art/iris2.txt [new file with mode: 0644]
art/iris3.txt [new file with mode: 0644]
art/jackolantern.txt [new file with mode: 0644]
art/jadeplant1.txt [new file with mode: 0644]
art/jadeplant2.txt [new file with mode: 0644]
art/jadeplant3.txt [new file with mode: 0644]
art/lithops1.txt [new file with mode: 0644]
art/lithops2.txt [new file with mode: 0644]
art/lithops3.txt [new file with mode: 0644]
art/moon.txt [new file with mode: 0644]
art/moss1.txt [new file with mode: 0644]
art/moss2.txt [new file with mode: 0644]
art/moss3.txt [new file with mode: 0644]
art/pachypodium1.txt [new file with mode: 0644]
art/pachypodium2.txt [new file with mode: 0644]
art/pachypodium3.txt [new file with mode: 0644]
art/palm1.txt [new file with mode: 0644]
art/palm2.txt [new file with mode: 0644]
art/palm3.txt [new file with mode: 0644]
art/pansy1.txt [new file with mode: 0644]
art/pansy2.txt [new file with mode: 0644]
art/pansy3.txt [new file with mode: 0644]
art/poppy1.txt [new file with mode: 0644]
art/poppy2.txt [new file with mode: 0644]
art/poppy3.txt [new file with mode: 0644]
art/sage1.txt [new file with mode: 0644]
art/sage2.txt [new file with mode: 0644]
art/sage3.txt [new file with mode: 0644]
art/seed.txt [new file with mode: 0644]
art/seedling.txt [new file with mode: 0644]
art/snapdragon1.txt [new file with mode: 0644]
art/snapdragon2.txt [new file with mode: 0644]
art/snapdragon3.txt [new file with mode: 0644]
art/sun.txt [new file with mode: 0644]
art/sunflower1.txt [new file with mode: 0644]
art/sunflower2.txt [new file with mode: 0644]
art/sunflower3.txt [new file with mode: 0644]
art/template.txt [new file with mode: 0644]
delete-confirm.scm [new file with mode: 0755]
delete.scm [new file with mode: 0755]
garden.scm [new file with mode: 0644]
index.gmi [new file with mode: 0644]
plant-new.scm [new file with mode: 0755]
register.scm [new file with mode: 0755]
view.scm [new file with mode: 0755]
water.scm [new file with mode: 0755]

diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..c3e2992
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,16 @@
+ISC License
+
+Copyright (c) 2017, Jacob Funke (original Python version)
+Copyright (c) 2020, Tim Vaughan (simplified Scheme version for RAGS)
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/art/agave1.txt b/art/agave1.txt
new file mode 100644 (file)
index 0000000..fd07ef2
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+    .  ,     ,   .
+    |\ |`,  ||  /|  .,
+    |\v| \v /|v/| |/ |
+     \| \\\/ /| / V /
+       \_| \ / / ,/
+.  , _ .\ \ |,/_/., _ .
+  ^      '        `    '
diff --git a/art/agave2.txt b/art/agave2.txt
new file mode 100644 (file)
index 0000000..d4b3752
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+       ,    ,    .
+    .  |`.  |\  /|  .,
+  . |\ | | /||^| |  /|
+   \ \v| \v /|v/| |/ |
+    \ |\  |/ /| / V  /
+   \^\ \ \ \ / / ,| /
+.  , \ \\ \ |,/_/./ / .
+  ^      '        `    '
diff --git a/art/agave3.txt b/art/agave3.txt
new file mode 100644 (file)
index 0000000..45458e4
--- /dev/null
@@ -0,0 +1,10 @@
+         oo|oo
+        oo|oo
+       , oo|oo   .
+    .  |`. \|\  /|  .,
+  . |\ | | /||^| |  /|
+   \ \v| \v /|v/| |/ |
+    \ |\  |/ /| / V  /
+   \^\ \ \ \ / / ,| /
+.  , \ \\ \ |,/_/./ / .
+  ^      '        `    '
diff --git a/art/aloe1.txt b/art/aloe1.txt
new file mode 100644 (file)
index 0000000..e423c08
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+
+       .     .  .
+       |\.,n/|./|
+        \\\/ /| /
+        '| \ / /
+.  , _ . .\ |,/_ ., _ .
+  ^      '        `    '
diff --git a/art/aloe2.txt b/art/aloe2.txt
new file mode 100644 (file)
index 0000000..bb9875c
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+       .\     .|
+        \\    ||  ._
+     ..\ \\. //. //
+      \ \.\|v ||//
+        \\\ || //
+        '| \ / /
+.  , _ . .\ |,/_ ., _ .
+  ^      '        `    '
diff --git a/art/aloe3.txt b/art/aloe3.txt
new file mode 100644 (file)
index 0000000..a14bf71
--- /dev/null
@@ -0,0 +1,10 @@
+          =\=
+           =|=
+       .\   | .|
+        \\  | ||  ._
+     ..\ \\||//. //
+      \ \.\|v ||//
+        \\\ || //
+        '| \ / /
+.  , _ . .\ |,/_ ., _ .
+  ^      '        `    '
diff --git a/art/baobab1.txt b/art/baobab1.txt
new file mode 100644 (file)
index 0000000..838e548
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+     &&    &   &   &  &&
+     ^ \   | ^    | ^/
+       ^|^  |^  ^|^/
+         |    *  |
+         |. ;   `|
+         |     . |
+.  , _ .(.        ) _ .
+  ^      '        `    '
diff --git a/art/baobab2.txt b/art/baobab2.txt
new file mode 100644 (file)
index 0000000..1058af4
--- /dev/null
@@ -0,0 +1,10 @@
+
+     &&&   &&  &&  &&&
+    &&&&\& & v &   /& &&
+    && \ |  \^ , &/^/&
+         |       |^
+         |    ,  |
+         |. ;    |
+        /      .  \
+.  , _ ( .         )_ .
+  ^      '        `    '
diff --git a/art/baobab3.txt b/art/baobab3.txt
new file mode 100644 (file)
index 0000000..683a01e
--- /dev/null
@@ -0,0 +1,10 @@
+      *     *&     * *
+     &&&  *&&  &&  &&&
+    &*&&\* & * &   /* &&
+    *& \ |  \^ , &/*/&
+        *|       |^
+         |    ,  |
+         |. ;    |
+        /      .  \
+.  , _ ( .         )_ .
+  ^      '        `    '
diff --git a/art/bee.txt b/art/bee.txt
new file mode 100644 (file)
index 0000000..f95ac18
--- /dev/null
@@ -0,0 +1,12 @@
+   _
+  /_)
+(8_))}-  .
+  \_)      '.
+     .--.    .
+    :    '. .'
+     '---'`;
+           .
+        _.'
+      .'
+      '         _
+       '._. , '   `, .
diff --git a/art/brugmansia1.txt b/art/brugmansia1.txt
new file mode 100644 (file)
index 0000000..21388ae
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+        _.
+       //\\   //\
+       | |\\ // \\
+           \V//| |
+            ||
+            ||/
+.  , _ . ., || _ ., _ .
+  ^      '        `    '
diff --git a/art/brugmansia2.txt b/art/brugmansia2.txt
new file mode 100644 (file)
index 0000000..46e2fa4
--- /dev/null
@@ -0,0 +1,10 @@
+
+        _   /n\
+       //.\ || \|
+      //  \\|`//\
+      |  ||\|//  \
+          /\V/|   |
+         |  ||
+            ||/\
+.  , _ . ., || _ ., _ .
+  ^      '        `    '
diff --git a/art/brugmansia3.txt b/art/brugmansia3.txt
new file mode 100644 (file)
index 0000000..3e133d4
--- /dev/null
@@ -0,0 +1,10 @@
+
+        _   /n\
+       //.\^||^\^
+      //  \\|`//\
+      /^ ||\|// ^\^
+      ^   /\V/|^  ^
+         |  ||^
+         ^  ||/\
+.  , _ . ., || _ ., _ .
+  ^      '        `    '
diff --git a/art/cactus1.txt b/art/cactus1.txt
new file mode 100644 (file)
index 0000000..bb8c0cd
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+
+
+          _\_\/
+         -( / )-
+           \_/
+.  , _ . .,@@@ _ ., _ .
+  ^      '        `    '
diff --git a/art/cactus2.txt b/art/cactus2.txt
new file mode 100644 (file)
index 0000000..ac3a66c
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+           +-+,
+       ,+\/|`| \
+       \'  | |'| .,
+        \ `| | |/ )
+         | |'| , /
+         |'| |, /
+.  , _ . |_|_| | ., _ .
+  ^      '        `    '
diff --git a/art/cactus3.txt b/art/cactus3.txt
new file mode 100644 (file)
index 0000000..1792e42
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+           +*+,
+       *+\/|`* \
+       \'  | |'| .,
+        * `| | |/ )
+         | |'| , /
+         |'| |, /
+.  , _ . |_|_| | ., _ .
+  ^      '        `    '
diff --git a/art/columbine1.txt b/art/columbine1.txt
new file mode 100644 (file)
index 0000000..d8b6569
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+
+
+         \ | |  /
+          | \|&|
+          &\/&/
+.  , _ . ., &/ _ ., _ .
+  ^      '        `    '
diff --git a/art/columbine2.txt b/art/columbine2.txt
new file mode 100644 (file)
index 0000000..a163030
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+       \   |   /
+        | &|/ |& /
+        &\ |  / /
+         \| \|&|
+          &\/&/
+.  , _ . ., &/ _ ., _ .
+  ^      '        `    '
diff --git a/art/columbine3.txt b/art/columbine3.txt
new file mode 100644 (file)
index 0000000..a5cbac7
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+            %   %
+      %\   |   /  %
+     %  | &|/ |& /
+       %&\ |  / /%
+         \| \|&|
+          &\/&/
+.  , _ . ., &/ _ ., _ .
+  ^      '        `    '
diff --git a/art/daffodil1.txt b/art/daffodil1.txt
new file mode 100644 (file)
index 0000000..93c4a83
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+
+          -\
+            |/-
+          - |
+           \|
+.  , _ . ., l, _ ., _ .
+  ^      '        `    '
diff --git a/art/daffodil2.txt b/art/daffodil2.txt
new file mode 100644 (file)
index 0000000..20b1d12
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+          -\,
+            |/-
+           \|
+         -| |/-
+          \ | | /-
+           \|/.|
+.  , _ . ., l,/_ ., _ .
+  ^      '        `    '
diff --git a/art/daffodil3.txt b/art/daffodil3.txt
new file mode 100644 (file)
index 0000000..6575df4
--- /dev/null
@@ -0,0 +1,10 @@
+
+              /|<
+         >|\ /
+            |/-|<
+           \|
+       >|-| |/-|<
+          \ | | /-|<
+           \|/.|
+.  , _ . ., l,/_ ., _ .
+  ^      '        `    '
diff --git a/art/dead.txt b/art/dead.txt
new file mode 100644 (file)
index 0000000..c2bad84
--- /dev/null
@@ -0,0 +1,10 @@
+    ______________
+   /              \
+  |                |
+  |                |
+  |     R.I.P.     |
+  |                |
+  |                |
+  |                |
+. |, _\/ .. \. \ /,|_ .
+  ^      '        `    '
diff --git a/art/fern1.txt b/art/fern1.txt
new file mode 100644 (file)
index 0000000..3941b0a
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+
+
+           \|/,
+          .\|/ |/
+           \|/ l/
+.  , _ . ., l /_ ., _ .
+  ^      '        `    '
diff --git a/art/fern2.txt b/art/fern2.txt
new file mode 100644 (file)
index 0000000..8184eec
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+           |
+          \|/   |
+          \|/, \|/
+       .|  \|/,\// .
+       \|/ \|/ |/ |/`
+       \\/,\|/|l///,
+.  , _ .`\,\lv/_//  _ .
+  ^      '        `    '
diff --git a/art/fern3.txt b/art/fern3.txt
new file mode 100644 (file)
index 0000000..bce3121
--- /dev/null
@@ -0,0 +1,10 @@
+
+           %
+           %
+          \|/   %
+          \|/, \%/
+       .%  \|/,\// .
+       \%/ \|/ %/ |/%
+       \\/,\|/|l///,
+.  , _ .`\,\lv/_//  _ .
+  ^      '        `    '
diff --git a/art/ficus1.txt b/art/ficus1.txt
new file mode 100644 (file)
index 0000000..9e57086
--- /dev/null
@@ -0,0 +1,10 @@
+         &  \ &  &
+        &\|,/  |/& &&
+         &|/&  / &    &
+           \  {  |___/_&
+           { {/ /      &
+           `, \{______/_&
+            } }{     \_&
+            }{{
+.  , , -=-~{ .-^- _ _ .
+  ^                    '
diff --git a/art/ficus2.txt b/art/ficus2.txt
new file mode 100644 (file)
index 0000000..e502899
--- /dev/null
@@ -0,0 +1,10 @@
+         &&&\/& &&&
+        &\|,/  |/& &&
+         &&/   /  /_&& &&
+           \  {  |_____/_&
+           {  / /   &  &   &&&
+           `, \{___________/_&&
+            } }{  &\____&
+            }{{     `&\&&
+           {}{         &&
+.  , , -=-~{ .-^- _ _ .
diff --git a/art/ficus3.txt b/art/ficus3.txt
new file mode 100644 (file)
index 0000000..930ffd4
--- /dev/null
@@ -0,0 +1,10 @@
+         &*&\/& *&&
+        &\|,/  |/& *&
+         *&/   /  /_&& &&
+           \  {  |_____/_*
+           {* / /   &  &   *&&
+           `, \{___________/_*&
+            } }{  *\____&
+            }{{     `&\*&
+           {}{         &&
+.  , , -=-~{ .-^- _ _ .
diff --git a/art/flytrap1.txt b/art/flytrap1.txt
new file mode 100644 (file)
index 0000000..7a7c243
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+          C % c
+          (\C/
+.  , _ . ., l, _ ., _ .
+  ^      '        `    '
diff --git a/art/flytrap2.txt b/art/flytrap2.txt
new file mode 100644 (file)
index 0000000..6c3a7b4
--- /dev/null
@@ -0,0 +1,10 @@
+
+           ._,
+    .__,  ,/ |  _,_,,
+   ._\ \, |--/ /\ \ \<
+   '\ \ |  \/  ||\ \,|<
+    '\_+/, || //  \_/`
+      ' \\ ||// ,
+         \\\|/ /
+.  , _ . .\ l,/_ ., _ .
+  ^      '        `    '
diff --git a/art/flytrap3.txt b/art/flytrap3.txt
new file mode 100644 (file)
index 0000000..bd90375
--- /dev/null
@@ -0,0 +1,10 @@
+      % %
+       \|  ._,
+    .__,| ,/ |  _,_,,
+   ._\ \,\|--/ /\ \ \<
+   '\ \ | \\/  ||\ \,|<
+    '\_+/, ||%//  \_/`
+      ' \\ ||// %
+         \\\|/ /
+.  , _ . .\ l,/_ ., _ .
+  ^      '        `    '
diff --git a/art/hemp1.txt b/art/hemp1.txt
new file mode 100644 (file)
index 0000000..6718fb0
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+            ^
+            l%
+          %\| _
+            |/ %
+          %\| /%
+.  , _ . ., l/ _ ., _ .
+  ^      '        `    '
diff --git a/art/hemp2.txt b/art/hemp2.txt
new file mode 100644 (file)
index 0000000..4bea70e
--- /dev/null
@@ -0,0 +1,10 @@
+
+            ^
+           ^+^
+         + ^+^+
+         \+^+^/
+         ^+\|^/^/
+        \+^\|/ ^
+         ^+\|+/+/
+.  , _ . ., l/ _ ., _ .
+  ^      '        `    '
diff --git a/art/hemp3.txt b/art/hemp3.txt
new file mode 100644 (file)
index 0000000..f53149d
--- /dev/null
@@ -0,0 +1,10 @@
+
+            %
+        ~  %+%
+         + %+%+  ~
+     ~   \+%+%/
+         ^%\|%/%/  ~
+      ~ \+^\|/ ^
+         ^+\|+/+/
+.  , _ . ., l/ _ ., _ .
+  ^      '        `    '
diff --git a/art/iris1.txt b/art/iris1.txt
new file mode 100644 (file)
index 0000000..a47c26d
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+       _,   . ,
+      / \ \V / /\
+        |\ \\v/ |`
+        /\ v ||/ \
+          \\v//
+.  , _ . .,\V/ _ ., _ .
+  ^      '        `    '
diff --git a/art/iris2.txt b/art/iris2.txt
new file mode 100644 (file)
index 0000000..9e0b031
--- /dev/null
@@ -0,0 +1,10 @@
+
+           /\
+       /\  |   /\
+       _ | || /
+      / \ \||/ /\
+        |\ \\v/  `
+        /\ v ||/\
+          \\v//
+.  , _ . .,\V/ _ ., _ .
+  ^      '        `    '
diff --git a/art/iris3.txt b/art/iris3.txt
new file mode 100644 (file)
index 0000000..7d232c4
--- /dev/null
@@ -0,0 +1,10 @@
+
+           /\
+      %/\  | % /\
+       _ | || /  %
+      / \ \||/ /\
+      % |\ \\v/  %
+        /\ v ||/\
+       %  \\v//  %
+.  , _ . .,\V/ _ ., _ .
+  ^      '        `    '
diff --git a/art/jackolantern.txt b/art/jackolantern.txt
new file mode 100644 (file)
index 0000000..289b4fd
--- /dev/null
@@ -0,0 +1,10 @@
+            /))        HAPPY
+         __(((__   HALLOWEEN
+       .' _`""`_`'.    
+      /  /\\  /\\  \    
+     |  /)_\\/)_\\  |
+     |  _  _()_  _  |
+     |  \\/\\/\\//  |
+      \  \/\/\/\/  /
+ .  , .'.___..___.' _ ., _ .
+  ^      '        `    '
diff --git a/art/jadeplant1.txt b/art/jadeplant1.txt
new file mode 100644 (file)
index 0000000..1cc1239
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+
+
+          .    ,
+          o%O %,o
+           \%o'
+.  , _ . ., l, _ ., _ .
+  ^      '        `    '
diff --git a/art/jadeplant2.txt b/art/jadeplant2.txt
new file mode 100644 (file)
index 0000000..a2821c7
--- /dev/null
@@ -0,0 +1,10 @@
+
+       %   %   %%
+     %% |O%o| %o %
+     &&O%\o|%|/% /&
+      & &\o%O %,o&
+        O &\%o&
+         ||.|/
+         \\ |
+.  , _ . .|,l, _ ., _ .
+  ^      '        `    '
diff --git a/art/jadeplant3.txt b/art/jadeplant3.txt
new file mode 100644 (file)
index 0000000..a931035
--- /dev/null
@@ -0,0 +1,10 @@
+
+       o   o   %*
+     %* |O%o| *o %
+     *oO%\o|o|/% *&
+      * &\o%O *,o&
+        O *\*o&
+         ||.|/
+         \\ |
+.  , _ . .|,l, _ ., _ .
+  ^      '        `    '
diff --git a/art/lithops1.txt b/art/lithops1.txt
new file mode 100644 (file)
index 0000000..a67f0a5
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+          __ __
+.  , _ . (  |  ) ., _ .
+  ^      '        `    '
diff --git a/art/lithops2.txt b/art/lithops2.txt
new file mode 100644 (file)
index 0000000..08c9678
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+         .__v___
+.  , _ .(   |   )., _ .
+  ^      '        `    '
diff --git a/art/lithops3.txt b/art/lithops3.txt
new file mode 100644 (file)
index 0000000..4e785c0
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+
+
+          *****
+           \V/
+         .__v___
+.  , _ .(   |   )., _ .
+  ^      '        `    '
diff --git a/art/moon.txt b/art/moon.txt
new file mode 100644 (file)
index 0000000..c493b4b
--- /dev/null
@@ -0,0 +1,7 @@
+                _.._
+              .' .-'`
+             /  /
+             |  |
+             \  '.___.;
+              '._  _.'
+                 ``
diff --git a/art/moss1.txt b/art/moss1.txt
new file mode 100644 (file)
index 0000000..947ce65
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+          /\ __
+        _/  /  \
+     _/ /  /    `--.
+  __/ '  _   \_     \
+ /  /   _/ ##- \    \ \
+._ / _ . .#### _|., _ .|
+  ^      '        `    '
diff --git a/art/moss2.txt b/art/moss2.txt
new file mode 100644 (file)
index 0000000..f44714d
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+          /\ __
+        _/##/  \
+     _/ /##/####`--.
+  __/ '  _###\_ ### \
+ /  /  #_/###-#\####\ \
+._ / _#########_|#,#_ .|
+  ^      '        `    '
diff --git a/art/moss3.txt b/art/moss3.txt
new file mode 100644 (file)
index 0000000..fd3e510
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+          /\ __
+        _/##/  \
+     _/ /*#/*#*#`--.
+  __/ '  _###\_ *## \
+ /  /  #_/##*-#\###*\ \
+._ / _###*#*###_|#,#_ .|
+  ^      '        `    '
diff --git a/art/pachypodium1.txt b/art/pachypodium1.txt
new file mode 100644 (file)
index 0000000..f8f896b
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+      _  /  _
+     / \/|// \
+        < >
+       < .>
+      < ` '>
+`  ,  <'    > _ .   _ .
+  ^      '     .  `   '
diff --git a/art/pachypodium2.txt b/art/pachypodium2.txt
new file mode 100644 (file)
index 0000000..74643b1
--- /dev/null
@@ -0,0 +1,10 @@
+      _  /  _
+     /_\/|//u
+     U  | \
+        < >
+        <`>  _/
+       <, > <>
+       < .><.>
+      < ` >'>
+`  ,  <'  o  >_ .   _ .
+  ^   /  ' \   .  `   '
diff --git a/art/pachypodium3.txt b/art/pachypodium3.txt
new file mode 100644 (file)
index 0000000..3474caa
--- /dev/null
@@ -0,0 +1,10 @@
+      _ <,  _
+     <_\/|//\\
+     // | \\ U
+     U // >\)  _
+       u<`>  _/ |
+       <, >/<>\
+       <o.>U.>
+      < ` >'>
+`  ,  <' o   >_ .   _ .
+  ^   /  ' \   .  `   '
diff --git a/art/palm1.txt b/art/palm1.txt
new file mode 100644 (file)
index 0000000..8572e06
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+       _ ,   . _
+      / \`\ / /^\
+     |  /\ ||/ \ |
+       | /\||\ |
+           ||
+.  , _ . .,|_| _ ., _ .
+  ^      '        `    '
diff --git a/art/palm2.txt b/art/palm2.txt
new file mode 100644 (file)
index 0000000..df84c5c
--- /dev/null
@@ -0,0 +1,10 @@
+        _     _
+       ',\ / / '-.
+     /--\ \ / /^\
+     |/ /\ ||/ \,|
+     ` | /\=|\,| `
+        ` |_|  `
+          |_|
+          |_|.
+.  , _ . .|__| _ ., _ .
+  ^      '        `    '
diff --git a/art/palm3.txt b/art/palm3.txt
new file mode 100644 (file)
index 0000000..e4cc2ad
--- /dev/null
@@ -0,0 +1,10 @@
+        _     _
+       ',* /*/ '-.
+     /--\ **/ /^\
+     |/ /\**|/ \,|
+     ` | /\=|\,| `
+        ` |_|  `
+          |_|
+          |_|.
+.  , _ . .|__| _ ., _ .
+  ^      '        `    '
diff --git a/art/pansy1.txt b/art/pansy1.txt
new file mode 100644 (file)
index 0000000..73c87eb
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+
+
+         \  o  /
+         o| |o o
+           \/ /
+.  , _ . ., l/ _ ., _ .
+  ^      '        `    '
diff --git a/art/pansy2.txt b/art/pansy2.txt
new file mode 100644 (file)
index 0000000..4e9acff
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+         o    o
+          \o /_o o
+        o\| /  /__o
+          | |o /o
+           \/ /o
+.  , _ . ., l/ _ ., _ .
+  ^      '        `    '
diff --git a/art/pansy3.txt b/art/pansy3.txt
new file mode 100644 (file)
index 0000000..82de3ee
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+         %    %
+          \% /_% %
+        %\| /  /__%
+          | |% /%
+           \/ /%
+.  , _ . ., l/ _ ., _ .
+  ^      '        `    '
diff --git a/art/poppy1.txt b/art/poppy1.txt
new file mode 100644 (file)
index 0000000..48c1a6e
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+            O
+            |
+           \o
+            |o
+           \/
+.  , _ . ., l, _ ., _ .
+  ^      '        `    '
diff --git a/art/poppy2.txt b/art/poppy2.txt
new file mode 100644 (file)
index 0000000..afb99fe
--- /dev/null
@@ -0,0 +1,10 @@
+
+            O
+          o |
+          | | o
+         o| |&|
+         &\\o/
+           ||o
+          &\/
+.  , _ . ., l, _ ., _ .
+  ^      '        `    '
diff --git a/art/poppy3.txt b/art/poppy3.txt
new file mode 100644 (file)
index 0000000..9ee0091
--- /dev/null
@@ -0,0 +1,10 @@
+
+            %
+          % |
+          | | %
+         %| |&|
+         &\\%/
+           ||%
+          &\/
+.  , _ . ., l, _ ., _ .
+  ^      '        `    '
diff --git a/art/sage1.txt b/art/sage1.txt
new file mode 100644 (file)
index 0000000..b9cd9f1
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+
+
+          '\+/` /`
+          '\|/`|/`
+           \|/ |/`
+.  , _ . . ,l-/`,., _ .
+  ^      '        `    '
diff --git a/art/sage2.txt b/art/sage2.txt
new file mode 100644 (file)
index 0000000..5764d1c
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+          `\'
+           `\'  /`
+       `| '\|/` /`
+       `\|'\|/`|/`
+       ,'\ \|/ |/`
+.  , _ .\|/,l-/`,., _ .
+  ^      '        `    '
diff --git a/art/sage3.txt b/art/sage3.txt
new file mode 100644 (file)
index 0000000..73f9ed1
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+           ++
+          +\+    +
+       +   +\+  /+
+       +| '\|/` /+
+       `\|'\|/`|/`
+       ,'\ \|/ |/`
+.  , _ .\|/,l-/`,., _ .
+  ^      '        `    '
diff --git a/art/seed.txt b/art/seed.txt
new file mode 100644 (file)
index 0000000..4fb4b5c
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+.  , _ . . _ , _ ., _ .
+  ^      '   o    `    '
diff --git a/art/seedling.txt b/art/seedling.txt
new file mode 100644 (file)
index 0000000..3c4b3dd
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+          . ;
+           \|
+.  , _ . ., l, _ ., _ .
+  ^      '        `    '
diff --git a/art/snapdragon1.txt b/art/snapdragon1.txt
new file mode 100644 (file)
index 0000000..8ed5193
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+            +
+            |/
+           \|
+            |/
+           \|
+.  , _ . ., l, _ ., _ .
+  ^      '        `    '
diff --git a/art/snapdragon2.txt b/art/snapdragon2.txt
new file mode 100644 (file)
index 0000000..5295c70
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+            +
+            | ,
+       +  , |/
+       '\  \| ,
+       \|  ,|/ + ,
+       \|/ \|  |/
+.  , _ . \, l,/_ ., _ .
+  ^      '        `    '
diff --git a/art/snapdragon3.txt b/art/snapdragon3.txt
new file mode 100644 (file)
index 0000000..494c2f1
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+            %
+            | %
+       %  % |/
+       %\  \| %
+       \|  ,|/ % %
+       \|/ \|  |/
+.  , _ . \, l,/_ ., _ .
+  ^      '        `    '
diff --git a/art/sun.txt b/art/sun.txt
new file mode 100644 (file)
index 0000000..b408b43
--- /dev/null
@@ -0,0 +1,7 @@
+      .
+   \  |  /
+ '-.;;;;;.-'
+-==;;;;;;;==-
+ .-';;;;;'-.
+   /  |  \
+      '
diff --git a/art/sunflower1.txt b/art/sunflower1.txt
new file mode 100644 (file)
index 0000000..cbe4ade
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+             O
+           \//
+           ||
+            ||/
+           \||
+.  , _ . ., || _ ., _ .
+  ^      '        `    '
diff --git a/art/sunflower2.txt b/art/sunflower2.txt
new file mode 100644 (file)
index 0000000..18233a5
--- /dev/null
@@ -0,0 +1,10 @@
+
+             __
+            (##)
+          &  ||
+           \//&
+           ||
+            ||/&
+          &\||
+.  , _ . ., || _ ., _ .
+  ^      '        `    '
diff --git a/art/sunflower3.txt b/art/sunflower3.txt
new file mode 100644 (file)
index 0000000..d30f7f4
--- /dev/null
@@ -0,0 +1,10 @@
+
+            \||/
+          |--OO--
+         -o-/||\
+          |\//&
+           ||
+            ||/&
+          &\||
+.  , _ . ., || _ ., _ .
+  ^      '        `    '
diff --git a/art/template.txt b/art/template.txt
new file mode 100644 (file)
index 0000000..8c8ac5c
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+.  , _ . .,  , _ ., _ .
+  ^      '        `    '
diff --git a/delete-confirm.scm b/delete-confirm.scm
new file mode 100755 (executable)
index 0000000..04459c7
--- /dev/null
@@ -0,0 +1,19 @@
+;; Account deletion confirmation
+
+(lambda (uri)
+  (import (chicken file)
+          (chicken pathname)
+          (chicken string)
+          uri-common)
+  (let ((query (uri-query uri)))
+    (if (null? query)
+        (print "No account specified.")
+        (begin
+          (serve-document-header (ext->mime "gmi"))
+          (print "Are you sure you want to delete your account?  (This action is irreversible!)")
+          (print "\n=> " (uri->string (update-uri uri
+                                                 path: '(/ "microbotany" "delete.scm")))
+                 " Yes, delete my account.")
+          (print "\n=> " (uri->string (update-uri uri
+                                                 path: '(/ "microbotany" "view.scm")))
+                 " No, take me back to my garden!")))))
diff --git a/delete.scm b/delete.scm
new file mode 100755 (executable)
index 0000000..a259061
--- /dev/null
@@ -0,0 +1,19 @@
+;; Delete account
+
+(lambda (uri)
+  (import (chicken file)
+          (chicken pathname)
+          (chicken string)
+          uri-common)
+  (let ((query (uri-query uri)))
+    (serve-document-header (ext->mime "gmi"))
+    (if (null? query)
+        (print "No account specified.")
+        (let* ((hash (symbol->string (caar query)))
+               (account-file (make-pathname "accounts" hash)))
+          (if (file-exists? account-file)
+              (begin
+                (delete-file account-file)
+                (print "Account successfully deleted."))
+              (print "Attempted to delete non-existent account."))))
+    (print "\n=> /microbotany/ Return to μBotany")))
diff --git a/garden.scm b/garden.scm
new file mode 100644 (file)
index 0000000..ac8f4eb
--- /dev/null
@@ -0,0 +1,289 @@
+(import (chicken random)
+        (chicken time)
+        (chicken time posix)
+        (chicken pathname)
+        (chicken io)
+        (chicken string)
+        (chicken format)
+        srfi-1)
+
+(define rand-double pseudo-random-real)
+
+(define (rand-weighted weights)
+  (let* ((tot (apply + weights)))
+    (let loop ((u (* (rand-double) tot))
+               (rest weights)
+               (idx 0))
+      (if (null? rest)
+          (error "Loop fell through")
+          (let ((head (car rest)))
+            (if (< u head)
+                idx
+                (loop (- u head)
+                      (cdr rest)
+                      (+ idx 1))))))))
+
+(define (rand-choice l . weights)
+  (list-ref l
+            (if (null? weights)
+                (pseudo-random-integer (length l))
+                (rand-weighted weights))))
+
+(define (make-garden user)
+  `((user . ,user)
+    (visits . 0)
+    (created . ,(current-seconds))
+    (age . 0)
+    (last-updated . ,(current-seconds))
+    (species . ,(rand-choice species))
+    (colour . ,(rand-choice colours))
+    (rarity . ,(rand-choice rarities 0.666666667 0.222222222 0.074074074 0.024691358 0.01234568))
+    (last-watered . #f)
+    (stage-idx . 0)))
+
+(define (garden-prop p g)
+  (cdr (assoc p g)))
+
+(define (garden-prop-set! p v g)
+  (alist-update! p v g))
+
+(define (water-garden! g)
+  (garden-prop-set! 'last-watered (current-seconds) g))
+
+(define (garden-stage g)
+  (let ((stage-idx (garden-prop 'stage-idx g)))
+    (if (= stage-idx -1)
+        'dead
+        (list-ref stages stage-idx))))
+
+(define (display-garden g)
+  (let* ((idx (garden-prop 'stage-idx g))
+         (basename (case idx
+                     ((-1) "dead")
+                     ((0) "seed")
+                     ((1) "seedling")
+                     (else
+                      (conc (symbol->string (garden-prop 'species g)) (- (min idx 4) 1))))))
+    (print (with-input-from-file (make-pathname "art" basename "txt") read-string))))
+
+(define (describe-garden g)
+  (let ((idx (garden-prop 'stage-idx g)))
+    (cond
+     ((= idx -1)
+      (print (rand-choice (list-ref stage-descriptions (- (length stage-descriptions) 1)))))
+     ((= idx 4)
+      (print (format (rand-choice (list-ref stage-descriptions 4))
+                     (garden-prop 'colour g)
+                     (garden-prop 'species g))))
+     (else
+      (print (format (rand-choice (list-ref stage-descriptions idx))
+                     (garden-prop 'species g))))')))
+
+(define (display-water-level g)
+  (let* ((last-watered (garden-prop 'last-watered g)))
+    (if last-watered
+        (let* ((now (current-seconds))
+               (1day (* 24 3600))
+               (remaining-pc (quotient (* 100 (- 1day (- now last-watered))) 1day))
+               (filled (quotient remaining-pc 4))
+               (unfilled (- 25 filled)))
+          (print "["
+                 (make-string filled #\~)
+                 (make-string unfilled #\.)
+                 "] " remaining-pc "%"))
+        (print "[" (make-string 25 #\.) "]\n"
+               "Your plant hasn't been watered!"))))
+
+;; Growth
+
+(define (update-garden! g)
+  (let* ((now (current-seconds))
+         (created (garden-prop 'created g))
+         (last-watered (garden-prop 'last-watered g)))
+    (if (not last-watered)
+        (if (> (- now created) (* 3600 24))
+            (garden-prop-set! 'stage-idx -1 g))
+        (let* ((time-since-last-watered (- now last-watered))
+               (last-updated (garden-prop 'last-updated g))
+               (1day (* 24 3600))
+               (5days (* 5 1day))
+               (growing-time (max (- (min now (+ last-watered 1day))
+                                     last-updated)
+                                  0)))
+          (if (> time-since-last-watered 5days)
+              (garden-prop-set! 'stage-idx -1 g)
+              (let* ((new-age (+ (garden-prop 'age g) growing-time))
+                     (new-stage-idx-raw (list-index (lambda (max-age) (> max-age new-age))
+                                                    stage-transition-times))
+                     (new-stage-idx (if new-stage-idx-raw
+                                        new-stage-idx-raw
+                                        (length stage-transition-times))))
+                (garden-prop-set! 'age new-age g)
+                (garden-prop-set! 'stage-idx new-stage-idx g)))))
+    (garden-prop-set! 'last-updated now g)))
+
+
+;;; Data
+
+(define stage-transition-times
+  '(10 20 30 40 50))
+  ;; (list (* 3600 24)
+  ;;       (* 3600 24 3)
+  ;;       (* 3600 24 10)
+  ;;       (* 3600 24 20)
+  ;;       (* 3600 24 30)))
+
+(define stages
+  '(seed seedling young mature flowering seed-bearing))
+
+(define colours
+  '(red orange yellow green blue indigo violet white black gold rainbow))
+
+(define rarities
+  '(common uncommon rare legendary godly))
+
+(define species
+  '(poppy
+    cactus
+    aloe
+    venus\ flytrap
+    jade\ plant
+    fern
+    daffodil
+    sunflower
+    baobab
+    lithops
+    hemp
+    pansy
+    iris
+    agave
+    ficus
+    moss
+    sage
+    snapdragon
+    columbine
+    brugmansia
+    palm
+    pachypodium))
+    
+
+(define mutation
+  '(humming
+    noxious
+    vorpal
+    glowing
+    electric
+    icy
+    flaming
+    psychic
+    screaming
+    chaotic
+    hissing
+    gelatinous
+    deformed
+    shaggy
+    scaly
+    depressed
+    anxious
+    metallic
+    glossy
+    psychedelic
+    bonsai
+    foamy
+    singing
+    fractal
+    crunchy
+    goth
+    oozing
+    stinky
+    aromatic
+    juicy
+    smug
+    vibrating
+    lithe
+    chalky
+    naive
+    ersatz
+    disco
+    levitating
+    colossal
+    luminous
+    cosmic
+    ethereal
+    cursed
+    buff
+    narcotic
+    gnu/linux
+    abraxan))
+
+(define stage-descriptions
+  '(("You're excited about your new seed."
+     "You wonder what kind of plant your seed will grow into."
+     "You're ready for a new start with this plant."
+     "You're tired of waiting for your seed to grow."
+     "You wish your seed could tell you what it needs."
+     "You can feel the spirit inside your seed."
+     "These pretzels are making you thirsty."
+     "Way to plant, Ann!"
+     "'To see things in the seed, that is genius' - Lao Tzu")
+    
+    ("The seedling fills you with hope."
+     "The seedling shakes in the wind."
+     "You can make out a tiny leaf - or is that a thorn?"
+     "You can feel the seedling looking back at you."
+     "You blow a kiss to your seedling."
+     "You think about all the seedlings who came before it."
+     "You and your seedling make a great team."
+     "Your seedling grows slowly and quietly."
+     "You meditate on the paths your plant's life could take.")
+    
+    ("The ~A makes you feel relaxed."
+     "You sing a song to your ~A."
+     "You quietly sit with your ~A for a few minutes."
+     "Your ~A looks pretty good."
+     "You play loud techno to your ~A."
+     "You play piano to your ~A."
+     "You play rap music to your ~A."
+     "You whistle a tune to your ~A."
+     "You read a poem to your ~A."
+     "You tell a secret to your ~A."
+     "You play your favorite record for your ~A.")
+    
+    ("Your ~A is growing nicely!"
+     "You're proud of the dedication it took to grow your ~A."
+     "You take a deep breath with your ~A."
+     "You think of all the words that rhyme with ~A."
+     "The ~A looks full of life."
+     "The ~A inspires you."
+     "Your ~A makes you forget about your problems."
+     "Your ~A gives you a reason to keep going."
+     "Looking at your ~A helps you focus on what matters."
+     "You think about how nice this ~A looks here."
+     "The buds of your ~A might bloom soon.")
+    
+    ("The ~A flowers look nice on your ~A!"
+     "The ~A flowers have bloomed and fill you with positivity."
+     "The ~A flowers remind you of your childhood."
+     "The ~A flowers remind you of spring mornings."
+     "The ~A flowers remind you of a forgotten memory."
+     "The ~A flowers remind you of your happy place."
+     "The aroma of the ~A flowers energize you."
+     "The ~A has grown beautiful ~A flowers."
+     "The ~A petals remind you of that favorite shirt you lost."
+     "The ~A flowers remind you of your crush."
+     "You smell the ~A flowers and are filled with peace.")
+    
+    ("You fondly remember the time you spent caring for your ~A."
+     "Seed pods have grown on your ~A."
+     "You feel like your ~A appreciates your care."
+     "The ~A fills you with love."
+     "You're ready for whatever comes after your ~A."
+     "You're excited to start growing your next plant."
+     "You reflect on when your ~A was just a seedling."
+     "You grow nostalgic about the early days with your ~A.")
+    
+    ("You wish you had taken better care of your plant."
+     "If only you had watered your plant more often.."
+     "Your plant is dead, there's always next time."
+     "You cry over the withered leaves of your plant."
+     "Your plant died. Maybe you need a fresh start.")))
diff --git a/index.gmi b/index.gmi
new file mode 100644 (file)
index 0000000..9a00e89
--- /dev/null
+++ b/index.gmi
@@ -0,0 +1,8 @@
+# μBotany
+
+This is a flagrant and flawed ripoff of Mozz's wonderful Astrobotany, mostly to experiment with what can be done without client-side TLS certificates.
+
+=> register.scm           Register a new account
+=> view.scm               Visit your plant
+
+=> directory.scm          View the garden directory
diff --git a/plant-new.scm b/plant-new.scm
new file mode 100755 (executable)
index 0000000..812d52e
--- /dev/null
@@ -0,0 +1,29 @@
+;; Plant new seed
+;;
+
+(lambda (uri)
+  (import (chicken file)
+          uri-common simple-sha1)
+  (for-each eval (with-input-from-file "garden.scm" read-list))
+  (let ((query (uri-query uri)))
+    (if (null? query)
+        (begin
+          (serve-document-header (ext->mime "gmi"))
+          (print "No account specified.")
+          (print "\n=> /microbotany/ Return to μBotany to create one".))
+        (let ((hash (symbol->string (caar query))))
+          (condition-case
+              (let* ((g (with-input-from-file (make-pathname "accounts" hash) read))
+                     (user (garden-prop 'user g)))
+                (with-output-to-file (make-pathname "accounts" hash)
+                  (lambda ()
+                    (write (make-garden user))))
+                (redirect-permanent (update-uri uri
+                                                path: '(/ "microbotany" "view.scm")
+                                                query: `((,hash . #t)))))
+            (o (exn)
+               (serve-document-header (ext->mime "gmi"))
+               (print "That account does not exist.")
+               (print "\n=> /microbotany/ Return to μBotany to create one".)))))))
+                    
+                            
diff --git a/register.scm b/register.scm
new file mode 100755 (executable)
index 0000000..09e9653
--- /dev/null
@@ -0,0 +1,22 @@
+;; Register a new user
+;;
+
+(lambda (uri)
+  (import (chicken file)
+          uri-common simple-sha1)
+  (for-each eval (with-input-from-file "garden.scm" read-list))
+  (let ((query (uri-query uri)))
+    (if (null? query)
+        (serve-query "User name")
+        (let* ((username (symbol->string (caar query)))
+               (hash (string->sha1sum (conc username
+                                            (number->string (pseudo-random-integer 10000))))))
+          (with-output-to-file (conc "accounts/" hash)
+            (lambda ()
+              (write (make-garden username))))
+          (redirect-permanent (update-uri uri path: '(/ "microbotany" "view.scm")
+                                              query: `((,hash . #t))))))))
+                    
+                            
+
+          
diff --git a/view.scm b/view.scm
new file mode 100755 (executable)
index 0000000..83706b4
--- /dev/null
+++ b/view.scm
@@ -0,0 +1,56 @@
+;; View a garden
+;;
+
+(lambda (uri)
+  (import
+    (chicken condition)
+    (chicken file)
+    uri-common)
+  (for-each eval (with-input-from-file "garden.scm" read-list))
+  (serve-document-header (ext->mime "gmi"))
+  (let ((query (uri-query uri)))
+    (if (null? query)
+        (begin
+          (print "=> register.scm Please register first."))
+        (let ((hash (symbol->string (caar query))))
+          (condition-case
+              (let* ((g (with-input-from-file (make-pathname "accounts" hash) read))
+                     (user (garden-prop 'user g))
+                     (visits (+ 1 (garden-prop 'visits g))))
+                (garden-prop-set! 'visits visits g)
+
+                (print "# " user "'s garden\n")
+                (if (> visits 1)
+                    (begin
+                      (print "Welcome back, " user "!\n")
+                      (print "You have visited your garden " visits " times.\n"))
+                    (begin
+                      (print "Welcome to your new garden, " user "!\n"
+                             "\nTo visit and chieck on your garden, you'll need to use this link:\n"
+                             (uri->string uri) "\n"
+                             "Remember to bookmark it to keep it safe!\n")))
+
+                (update-garden! g)
+                (with-output-to-file (make-pathname "accounts" hash)
+                  (lambda ()
+                    (write g)))
+
+                (print "```")
+                (display-garden g)
+                (print "```")
+                (describe-garden g)
+
+                (print "\nWater level:")
+                (print "```")
+                (display-water-level g)
+                (print "```")
+                (print "\n=> water.scm?" hash " Water plant\n")
+
+                (when (= (garden-prop 'stage-idx g) 5)
+                    (print "=> plant-new.scm?" hash " Plant a new seed\n"))
+
+                (print "=> delete-confirm.scm?" hash " Delete garden (irreversible!)"))
+            (o (exn)
+               (print "This garden no longer exists.\n\n"
+                      "=> register.scm Register to create another.")))))))
+
diff --git a/water.scm b/water.scm
new file mode 100755 (executable)
index 0000000..d2df36c
--- /dev/null
+++ b/water.scm
@@ -0,0 +1,27 @@
+;; Water garden
+;;
+
+(lambda (uri)
+  (import
+    (chicken condition)
+    (chicken file)
+    uri-common)
+  (for-each eval (with-input-from-file "garden.scm" read-list))
+  (let ((query (uri-query uri)))
+    (if (null? query)
+        (begin
+          (print "=> register.scm Please register first."))
+        (let ((hash (symbol->string (caar query))))
+          (condition-case
+              (let* ((g (with-input-from-file (make-pathname "accounts" hash) read)))
+                (water-garden! g)
+                (with-output-to-file (make-pathname "accounts" hash)
+                  (lambda ()
+                    (write g)))
+                (redirect-permanent (update-uri uri
+                                                path: '(/ "microbotany" "view.scm")
+                                                query: `((,hash . #t)))))
+            (o (exn)
+               (print "This garden no longer exists.\n\n"
+                      "=> register.scm Register to create another.")))))))
+