I've written 'toot', a very simple command-line utility to allow Mastodon posts to be sent from the command-line: https://www.npmjs.com/package/toot
@nolan couldn't believe my luck!
:grinning:
@glynn_bird thank you
@glynn_bird Awesome, and it looks like I'm the first one to open an issue for it. :D
@kdy Excellent! I'll take a look :grinning:
@kdy Fixed in version 1.0.1. Do your npm install again and you should be good to go.
@glynn_bird Yup, it works! Thanks!
@glynn_bird for a more featureful command line tool, see tootstream https://github.com/magicalraccoon/tootstream
@LogicalDash thanks! I'll check it out.
@glynn_bird @brunpi fail ? :p
@Sieo @glynn_bird
ça peut aider ton pote our son truc, non ?
@glynn_bird @brunpi ouais, à voir, je vais lui en parler :-)
@glynn_bird @Gargron are you aware of any tool to post the same thing both to mastodon and to bird site (am i a blasphemer for asking for such a thing?)
@glynn_bird would be great to have it in Telegram too
@gael totally agree. It's super handy to have command-line access to these tools if you're:
a) someone who is on command-line all day , and or
b) wants to automate the messages programmatically
@glynn_bird god's work ;)
@glynn_bird great sample use case
@glynn_bird It'd be cool if it could print out some recent timeline toots :D
if there's ever a terminal interface for Mastodon it'll be (paradoxically) easier for me to get my wife to use it, because she's so shell-oriented it isn't funny
@glynn_bird Cool, thanks. Just installed & used it for my very first toot. @gordonbrander@mastodon.social
@glynn_bird I've obviously done something odd - I've tried installing and running your package, but it's returning an error:
/usr/bin/env: node: No such file or directory
Any suggestions? What do I need to tell you to help you help me?
@glynn_bird OK, I've poked about randomly, but am way out of my depth. I can't make this work, and don't know what to tell you beyond what I've said already. So let me know what you need me to tell you to help diagnose this.
Cheers.
First of all this is an 'npm' module. So it assumes you've got Node.js installed. https://nodejs.org/en/
If you get that far, you should be able to do
npm install -g toot
or
sudo npm install -g toot
After that just run 'toot' and follow the on-screen instructions. Feel free to DM me screenshots.
@glynn_bird I'm on Ubuntu - can I install node.js with an apt-get? (I'm about to Google for that as well)
@glynn_bird I've done a sudo apt-get install nodejs and it says:
nodejs is already the newest version.
nodejs set to manually installed.
@ColinTheMathmo so doing `npm -v` gives you?
@ColinTheMathmo let me try on my virtual ubuntu machine
@ColinTheMathmo I just did
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
(from the instructions in the page I sent you)
and got
node -v
v6.10.2
npm -v
3.10.10
and then
sudo npm install -g toot
worked just fine
@glynn_bird OK, trying that.
@glynn_bird So far so good - stand by ...
@glynn_bird Bingo! Thank you for your help! It looks like it was version skew, so you might want to put the version check somewhere.
But that's working - thank you.
@ColinTheMathmo great news! :smiley: I think Ubuntu ships with an ancient version of Node.
@glynn_bird That would explain it. I am, however, always worried about instructions that have one curl a file directly through bash.
But it's sorted.
@ColinTheMathmo I know. "pipe this unknown thing to sudo bash". Nightmare.
@glynn_bird That's why I prefer to apt-get, and sometimes even to simply download and sha256 to check fingerprints.
Am I overly cautious? Probably, but I am literally paid to be paranoid.
@ColinTheMathmo you are quite right to be paranoid.
@glynn_bird thank you, that's cool!
@glynn_bird I love that the "toot" name wasn't taken on npm. How lucky can you get? :)