diff --git a/README.md b/README.md index 3e58534..9952ded 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,15 @@ commands: - `request` (invokved on town as `town request-gitea` or `town request-gemini`), a helper command for requesting certain featuers be enabled for your town account - `stats` (invoked as `town stats`), a command that prints out information about the town and its users in JSON. - `visit` an experimental command for "visiting" a user. +- `signup` command that powers `ssh join@tilde.town` +- `welcome` command that powers `ssh welcome@tilde.town` +- `review` a TUI for town admins to review signups + +There are also sundry helpers and scripts under `cmd/`. + +A lot of this behavior (for example, `stats`) is exposed as a library. if you want to make some stuff for town and want to work in Go feel free to import this and use it. ## TODO -- [ ] expose `stats` as a library -- [ ] add a command for contributing scripts to the launcher's index - [ ] consider bringing the launcher's index of commands into this git repo so it can be tracked - [ ] add a Makefile - diff --git a/cmd/review/main.go b/cmd/review/main.go index eb335b7..d8e9e4d 100644 --- a/cmd/review/main.go +++ b/cmd/review/main.go @@ -233,6 +233,9 @@ func _main() error { reviewForm.AddButton("submit", func() { currSignup := signups[signupIx] cleanEmail := reviewForm.GetFormItemByLabel("clean email").(*tview.InputField).GetText() + defer func() { + cleanEmailInput.SetText("") + }() currSignup.CleanEmail = cleanEmail decision := models.SignupRejected @@ -338,8 +341,14 @@ func _main() error { } emailVal := signups[signupIx].Email providedEmailView.SetText(emailVal) - cleanEmailInput.SetPlaceholder( - strings.TrimSpace(strings.ReplaceAll(emailVal, "\n", " "))) + /* + TODO the placeholder doesn't appear to become the default text which is + what I wanted it to do. Just taking this out so the blank box beckons + input. Also, it seems like the AcceptanceFunc didn't work since a blank + value got through. + cleanEmailInput.SetPlaceholder( + strings.TrimSpace(strings.ReplaceAll(emailVal, "\n", " "))) + */ decisionFI.SetCurrentOption(1) pages.SwitchToPage("review") app.SetFocus(cleanEmailInput) diff --git a/cmd/stats/README.md b/cmd/stats/README.md index 5213320..44de1d3 100644 --- a/cmd/stats/README.md +++ b/cmd/stats/README.md @@ -1,6 +1,6 @@ # townstats -This program dumps information about tilde.town in the [Tilde Data Protocol](http://protocol.club/~datagrok/beta-wiki/tdp.html). +Code for dumping information about tilde.town in the [Tilde Data Protocol](http://protocol.club/~datagrok/beta-wiki/tdp.html). # author @@ -8,4 +8,4 @@ vilmibm, based on python work by [datagrok](https://datagrok.org) # license -gplv3+ \ No newline at end of file +gplv3+