shithub: masto9

ref: c6ef27f226f6a5817532a02c1fb273f1631a564e
dir: /README.md/

View raw version
# masto9

A simple mastodon client for 9front.

## Usage

`masto9 DOMAIN [COMMAND] [DATA]`

Available commands:

- `home` to view your notifications. Abbrev `h`
- `toot 'TEXT'` to post a new textual toot. Abbrev `t`
- `tootwithfile ['TEXT'] FILEPATH` to post a new toot with a file and optional text. . Abbrev `tf`
- `reply ID` to reply to a toot. Abbrev `r`
- `notifications` to view your notifications. Abbrev `n`
- `mentions` to view your mentions. Abbrev `m`
- `fav|unfav|boost|unboost ID` to act on a toot. Abbrev `f|uf|b|ub`
- `more ID` to view the timeline starting from a toot
- `debug ID` to view a toot JSON

if no COMMAND is provided masto9 defaults to `home`.

### Installation

Clone the repo, `mk install`.

### Token

You will need to create a token for your account https://docs.joinmastodon.org/client/token/ and add it to factotum:

```
echo 'proto=pass service=mastodon server=INSTANCE_HOSTNAME pass=TOKEN user=USERNAME' > /mnt/factotum/ctl
```

### Plumbing rules

For convenience add some plumb rules to `$home/lib/plumbing` right before `include basic` line:

```
type	is text
data	matches 'Favorite\[([0-9]+)\]'
plumb	to mastodon
plumb	client window masto9 DOMAIN fav $1 && read

type	is text
data	matches 'Boost\[([0-9]+)\]'
plumb	to mastodon
plumb	client window masto9 DOMAIN boost $1 && read

type	is text
data	matches 'Reply\[([0-9]+)\]'
plumb	to mastodon
plumb	client window masto9 DOMAIN reply $1
```