botany

I found a fun little script called 'botany' pre-installed here on tilde.team.
Apparently it works like a Tamagotchi -- I need to check in each day to water
my seed, then a great plant will eventually grow out of it. Quite a few people
on this server have plants. I'm not sure how to view them though.

At first I wanted to hack it to make my plant larger. I found a JSON file but
that is just an automatic export that is not used for anything. Then I found a
Python Pickle file, but that turned out to be hard to work with. I also found
the sqlite file, but for some reason sqlite3 is telling me that's not a database.

Then I wanted to show off my plant. At first I tried using PHP passthru() to run
botany-viewer right from PHP, but that actually runs under the context of php-fpm
user, so it did not show my plant. There isn't an obvious way to let PHP run
under my user context... but then I realized there's no need for that!

I set up a little cron job that runs `botany-viewer` on an hourly basis and saves it
into my web directory. Then my plant can be viewed at the right URL. I went one step
further and used some PHP on my homepage to render the plant as preformatted text. Nice.

[homepage](https://tilde.team/~nic/)

tags: tilde.team, botany