This repo consists of bash
scripts (et cetera) for use with madonctl
, the best solution for command line usage of Mastodon available, in my honest opinion.
Don't expect heavily polished stuff here. I generally make things as I go. madonctl
is meant to be easily scriptable, which lends itself well to quick solutions.
Also, I'm working on a set of templates tweaked to my liking. I usually have an active tmux
window of 5 panes, 4 of which are dedicated to madonctl
. Using a fair amount of real estate, I like to keep things simple.
toot
has 3 forms, all of which take input from stdin and can optionally add a single attachment:toot dm [file
URL | path
]
creates a direct message. don't forget to include the mention.toot
status-id | URL
[ file
URL | path
]
will reply with appropriate visibility and mentions.toot [ file
URL | path
]
will create a new toot.
untoot
status-id | URL
deletes toots.mytoots
shows recent mentions.follows
deals with follow requests. For each, you can accept/deny and assuming the former, follow back if you like.follow
status-id | user-id | URL
follows a user.unfollow
status-id | user-id | URL
unfollows a user.fav
status-id | URL
just favorites.boost
status-id | URL
just boosts.favboost
status-id | URL
boosts and favorites.show
status-id
opens a toot in the browser.tootmux
adds my preferred set up to the current tmux window, occupying 60% of the total space:- home stream (30%)
- local stream (30% - 10 lines)
- mentions-only notifications stream (6 lines)
- area for entering commands (2 lines)
- mynotifications.tmpl to use with
--template-file
for notifications.- Bell at the beginning, which
tmux
makes visual. - Trimmed down to remove anything except stuff relevant to mentions. I don't care being notified about reblogs or favorites (but thank you for them!), so none of that is there.
- Emojis for
sensitive: true
(⚠),visibility: direct
(🔒), and whether or not there are attachments (📎). - No names, no attachment links.
- As little as 2 lines (default can be up to 10 times that):
- status-id (reply-to-id as relevant), account and id, link to status
- spoiler (if available) followed by message.
- Bell at the beginning, which
Make sure that $HOME/bin
is in your $PATH
and fill it up with symlinks:
find /path/to/madonctl-scripts/src/scripts -type f -exec ln -s {} ~/bin \;
tl;dr Everything should Just Work™ with Mastodon instances running v2.0.0, which madonctl
should be updated for at this point as well.
As of v2.0.0, id
attributes are not returned as strings instead of integers. Whenever templating is employed, this is now represented as {{.id}}
whereas previously it was {{printf "%.0f" .id}}
. Naturally, if any conditionals are used, the logic will need to be a little different.
Further questions and comments may be addressed to @[email protected]
- Super big thank yous to @[email protected] for not only creating
madonctl
but for being so darn responsive to my many questions and suggestions. Someone give this guy a raise! (actually, there's a donation button on a website related to another project of his) - A special thank you to @[email protected] for the lovely example toot to show off my notifications template. It does seem to suggest that he (and/or me) is a perv, but in fact, it was a lovely picture of mating iguanas. Of course, he still might be a perv, but…
- Thanks to @[email protected] (who is super duper awesome and is always good for a thoughtful, in depth conversation!) for sending me a lovely pic of Alice in Wonderland. She's right, it's too darn cute!