bink/README.md
2025-04-23 22:45:05 +00:00

35 lines
1.6 KiB
Markdown

# bink
serverless microblogging for tilde.town! bink is a small project i threw together in one day.
![screenshot](/screenshot.png)
## command usage
`town bink`: show post list
buttons used to navigate the list are similar to `less`. here are the keys you can use:
* c: compose a new post in a text editor
* r: refresh the list
* ctrl-d: scroll down half a page
* ctrl-u: scroll up half a page
* space, page down: scroll down one whole screen
* down arrow, n, j, ctrl-n: go down one line
* up arrow, p, k, ctrl-p: go up one line
* page up: go up one whole screen
* g: go to top
* G: go to bottom
`town bink --help`: returns a link to this page
`town bink this is my post!` or `town bink "this is also a post!"` will write all the words passed into it as a post for everyone else to see
`town bink --pipe`: allow standard input to be the post body, eg. `echo "hello world!" | town bink --pipe`
`town bink --dump`: dumps all post data to a json object
## object logic
each system user that chooses to use bink will have a folder in their home directory called `.bink/`, which will be populated by items named after the epoch-nanoseconds time of creation. the contents of each item are plaintext, and that is the post.
from the path where the object is stored, ex. `/home/nebula/.bink/1745182221128478782`, the user who posted the item and the time it was produced can be inferred. each post object therefore has 3 pieces of data: the post body, the exact time the post was produced, and the user who posted it. the client will iterate over system files by using the `/home/**/.bink/*` glob, collecting all of the user objects without using a central server.