# Development notes These are the development notes for the Go version. The idea is to use the help files to implement BULLETIN. ssh `authorized_keys` should look like this: ``` command="/home/bulletin/bin/bulletin -u alice",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty KEY-TYPE KEY ``` Have readline store a history file for the user. Configure at the `accounts.Open` step. Look up how godoc does references to other things. Look up how to run migrations on the db from embedded files. Figure out readline completion. Case sensitive - issue? Building from repl.commands? ## sqlite * sqlite trigger tracing: `.trace stdout --row --profile --stmt --expanded --plain --close` * https://sqlite.org/cli.html * https://www.sqlitetutorial.net/ ## Things to do * Implement each command. * Next: folder commands - ~~CREATE~~, ~~REMOVE~~, MODIFY, ~~INDEX~~, ~~SELECT~~ * Messages: ~~ADD~~, CURRENT, ~~DIRECTORY~~, BACK, CHANGE, FIRST, REMOVE, NEXT, ~~READ~~ * Messages edit: CHANGE, REPLY, FORWARD * Moving messages: COPY, MOVE * Compound commands: SET and SHOW * Mail: MAIL, FORWARD, * Implement batch jobs * ~~Editor - need an embedded editor~~ Implemented using tview; good enough * An EDT inspired [editor](https://sourceforge.net/projects/edt-text-editor/) * [gkilo](https://github.com/vcnovaes/gkilo) * This [kilo editor](https://viewsourcecode.org/snaptoken/kilo/) tutorial * Using giu, a [text-editor](https://serge-hulne.medium.com/coding-a-simple-text-editor-in-go-using-giu-quick-and-dirty-b9b97ab41e4a) (needs cgo, no) * [bubbletea](https://github.com/charmbracelet/bubbletea) seems to be the tui that's winning * Another option is tview - [simpler](https://github.com/rivo/tview). * Handle broadcast messages - have bulletin watch a directory and display files from it. Then have them delete the file if it's older than 5 minutes (allow for failure) * Cleanup help output. * Remove the node/cluster/newsgroup/mailing-list related flags. * Remove BBOARD references. * format with `par w72j1` * Database * trigger to limit values for 'visibility'? * Add some of the early announcements from the sources - see the conversion branch - to the GENERAL folder. * Add a pager * Add commands: * A way to add / delete ssh keys. * A way to manage files? * Commands for a local mail system? * Commands to connect to Mattermost or mastodon? * Commands to manage users. * `SHOW VERSION` - versioninfo doesn't work; what else? * Check db version; notify user if it changes; refuse to write to db if it has. ## Module links * cli - [docs](https://cli.urfave.org/v3/getting-started/) * readline - [docs](https://pkg.go.dev/github.com/chzyer/readline) * xdg - [docs](https://pkg.go.dev/github.com/adrg/xdg) * sqlite - [docs](https://modernc.org/sqlite)