mastodon-create-account
v0.0.4
Published
create a user account from cmd line or function call
Downloads
12
Readme
Create a mastodon user account when you're on the local server.
It's a slow kludge at the moment.
Command Line
$ sudo npm install -g mastodon-create-account
$ sudo mastodon-create-account test7 [email protected]
success, I think
account-details-test7.json written
$ cat account-details-test7.json
{
"username": "test7",
"email": "[email protected]",
"pw": "/aasdfasdfasdfhiEH",
"id": 680
}
Library
$ npm install --save mastodon-create-account
const acct = require('mastodon-create-account')
acct.create_local_account('test7', '[email protected]')
.then(data => {
// use data.pw, etc...
})
Permissions
Works as root or someone who can sudo to the mastodon user.
For example, if you want to run this as user botmaster
, put this in /etc/sudoers:
botmaster ALL = (mastodon) ALL
It's slow
Calls the ruby code on a pipe. Crazy, I know.
Slow because of how ruby bundle works. I bet with a tiny bit of ruby knowledge it could be made fast, by like saving the bundle or something.