Small rephrasing and reformatting.
Avoid prompt lines > 72 chars.
This commit is contained in:
parent
7b6d276606
commit
e7d277e239
|
@ -21,10 +21,10 @@ from mastodon import Mastodon
|
||||||
from mastodon.Mastodon import MastodonIllegalArgumentError
|
from mastodon.Mastodon import MastodonIllegalArgumentError
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
print('\nThis app generates Mastodon app credentials needed by Feed2toot.\nfeed2toot_clientcred.txt and feed2toot_usercred.txt will be written in the current dir {cwd}.\nOne connection is initiated to create the app.\nYour password is *not* stored.\n'.format(cwd=getcwd()))
|
print('\nThis script generates the Mastodon application credentials for Feed2toot.\nfeed2toot_clientcred.txt and feed2toot_usercred.txt will be written\nin the current directory: {cwd}.\nA connection is initiated to create the application.\nYour password is *not* stored.\n'.format(cwd=getcwd()))
|
||||||
|
|
||||||
# get the instance
|
# get the instance
|
||||||
instance = input('Mastodon instance url (defaults to https://mastodon.social):')
|
instance = input('Mastodon instance URL (defaults to https://mastodon.social): ')
|
||||||
if not instance:
|
if not instance:
|
||||||
instance = 'https://mastodon.social'
|
instance = 'https://mastodon.social'
|
||||||
elif not instance.startswith('http'):
|
elif not instance.startswith('http'):
|
||||||
|
@ -35,10 +35,10 @@ userok = False
|
||||||
while not userok:
|
while not userok:
|
||||||
user = input('Mastodon login: ')
|
user = input('Mastodon login: ')
|
||||||
if not user:
|
if not user:
|
||||||
print('Your Mastodon username can not be empty')
|
print('Your Mastodon username can not be empty.')
|
||||||
userok = False
|
userok = False
|
||||||
elif '@' not in user or '.' not in user:
|
elif '@' not in user or '.' not in user:
|
||||||
print('Your Mastodon username should be an email')
|
print('Your Mastodon username should be an email.')
|
||||||
userok = False
|
userok = False
|
||||||
else:
|
else:
|
||||||
userok = True
|
userok = True
|
||||||
|
@ -60,6 +60,6 @@ try:
|
||||||
)
|
)
|
||||||
except MastodonIllegalArgumentError as err:
|
except MastodonIllegalArgumentError as err:
|
||||||
print(err)
|
print(err)
|
||||||
sys.exit('\nMy guess is bad login/password\n')
|
sys.exit('\nI guess you entered a bad login or password.\n')
|
||||||
print('The feed2toot app was added to your preferences=>authorized apps page')
|
print('feed2toot was added to your preferences=>authorized apps page.')
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
Loading…
Reference in a new issue