One liner for posting a mastodon status from command-line (you need to get a token from preferences/development and put it in a file called `token`):
curl -H "Authorization: Bearer $(cat token)" https://botsin.space/api/v1/statuses --verbose -F status="I like cheese"
@benc I’m also a big fan of cheese.
@benc I was intrigued so I created a little bash script that will open up your editor and let you compose the message:
https://gist.github.com/edsu/aa6f70bb20127b1e18e05dff5e470022
@benc That method is insecure by virtue of putting secrets on the command line. You should instead put the whole header line in a file and use the "-H @..." form.
And do you have to like cheese?
@ThijsLambrecht you can define an environment variable $FOOD for more general use cases
@benc
😀😀😀
Sushi it is!
@benc That’s one status I may as well leave on an infinite loop.