add user signature
This commit is contained in:
parent
389665eda6
commit
b138921886
|
@ -1 +1,2 @@
|
|||
toot.json
|
||||
venv/
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
Mastodon.py==1.5.1
|
||||
emoji~=1.6.3
|
||||
click==8.1.3
|
12
toot
12
toot
|
@ -1,10 +1,10 @@
|
|||
#!/usr/bin/python3
|
||||
#!/usr/bin/env python3
|
||||
import click
|
||||
import emoji
|
||||
import getpass
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
|
||||
import click
|
||||
import emoji
|
||||
from mastodon import Mastodon
|
||||
|
||||
@click.command()
|
||||
|
@ -31,12 +31,12 @@ def toot(status, creds):
|
|||
status = emoji.emojize(status, use_aliases=True)
|
||||
|
||||
# check status length and post status
|
||||
if len(status) > 500:
|
||||
if len(status) > 5000:
|
||||
print("Status is too long, try again")
|
||||
elif len(status) == 0:
|
||||
print("Did you type a status?")
|
||||
else:
|
||||
print(mastodon.toot(status)["uri"])
|
||||
print(mastodon.toot(f"{status}\n~{getpass.getuser()}")["uri"])
|
||||
|
||||
if __name__=='__main__':
|
||||
toot()
|
||||
|
|
Loading…
Reference in New Issue