From 05ac83019c6c8ad87771c2f573b41d84caa54dcc Mon Sep 17 00:00:00 2001 From: vilmibm Date: Tue, 21 Feb 2023 06:13:51 +0000 Subject: [PATCH] fixes, readme --- cmd/signup/README.md | 21 ++++++++++++++++----- cmd/signup/main.go | 8 +++----- signup/signup.go | 2 +- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/cmd/signup/README.md b/cmd/signup/README.md index 283dede..da4432d 100644 --- a/cmd/signup/README.md +++ b/cmd/signup/README.md @@ -7,16 +7,15 @@ The point of this command is to enable signing up for tilde.town via an ssh conn - [x] interactive guts - [x] logging - [x] write answers to disk - - [ ] take out sidebar - - [ ] add /help + - [x] take out sidebar + - [x] add /help - [ ] make copy clearer (that you say whatever and *then* type verb) - - [ ] enter to send - - [ ] shift+enter for new line (discord/slack style) if possible + - [x] enter to send - [ ] splash screen - put off - [ ] easter egg commands - put off - [ ] inactivity timer(?) - put off - [ ] review tool - - [ ] iterate over answers + - [x] iterate over answers - [ ] accept - [ ] notate - [ ] reject @@ -32,6 +31,18 @@ The point of this command is to enable signing up for tilde.town via an ssh conn ## configuration +On disk assumptions: + +- `/town/var/signups` exists and is owned by user `join` and group `admin` +- `/town/var/signups/log` exists and is owned by user `join` and group `admin` + +Assumes the following has been run: + +```bash +sqlite3 /town/var/signups/signups.db < /town/src/town/sql/create_signups_table.sql +sudo chown join:admin /town/var/signups/signups.db +``` + It assumes, in `sshd_config`: ``` diff --git a/cmd/signup/main.go b/cmd/signup/main.go index 240aa1b..b1eb726 100644 --- a/cmd/signup/main.go +++ b/cmd/signup/main.go @@ -220,7 +220,7 @@ func _main(l *log.Logger, db *signup.DB) error { newCharacter("the shrike", "a little grey bird. it has a pretty song."), func(s *scene) { su.How = string(s.Input.Bytes()) }), newScene("what", heredoc.Doc(` - You sink backwards into the forest. You find yourself floating in darkness. + You sink down into soft mossy floor of the forest. You find yourself floating in darkness. At the far reaches of your vision you can make out a faint neon grid. Around you float pieces of consumer electronic appliances from 1980s Earth. A VCR approaches @@ -230,8 +230,7 @@ func _main(l *log.Logger, db *signup.DB) error { welcome! thank you for coming this far. just two questions left. what about tilde town interests you? what kind of stuff might you want to get up to here? - as usual, just say your answer. when you're satisfied, please [-:-:b]/spin[-:-:-] - around in this void. + as usual, just say your answer. when you're satisfied, please [-:-:b]/nod[-:-:-] `), "hmm did you say something?", newCharacter("the vcr", "a black and grey VCR from 1991"), @@ -252,8 +251,7 @@ func _main(l *log.Logger, db *signup.DB) error { say some links and words out loud, you know the drill. - when you're happy you can submit this whole experience by leaving the - store. just [-:-:b]/open[-:-:-] the door. + when you're happy you can submit this whole experience with a [-:-:b]/nod[-:-:-] `), "just the one last thing please", newCharacter("the mop", "a greying mop with a wooden handle."), diff --git a/signup/signup.go b/signup/signup.go index 0509d03..e136158 100644 --- a/signup/signup.go +++ b/signup/signup.go @@ -63,7 +63,7 @@ func NewDB() (*DB, error) { func (d *DB) InsertSignup(su *TownSignup) error { stmt, err := d.db.Prepare(` - INSERT INTO signups (created, email, how, why, links, extra) VALUES( + INSERT INTO signups (created, email, how, why, links) VALUES( ?, ?, ?, ?, ? ) RETURNING id `)