mirror of https://github.com/cheat/cheat.git
2to3
This commit is contained in:
parent
5a026dfb41
commit
98b254b799
12
cheat
12
cheat
|
@ -82,7 +82,7 @@ def edit_cheatsheet(cheat, cheatsheets):
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
elif len(sys.argv) < 3:
|
elif len(sys.argv) < 3:
|
||||||
print ('Must provide a cheatsheet to edit/create')
|
print('Must provide a cheatsheet to edit/create')
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
# if the cheatsheet already exists, open it for editing
|
# if the cheatsheet already exists, open it for editing
|
||||||
|
@ -109,7 +109,7 @@ def edit_cheatsheet(cheat, cheatsheets):
|
||||||
def help(cheatsheets):
|
def help(cheatsheets):
|
||||||
"Displays the program help"
|
"Displays the program help"
|
||||||
|
|
||||||
print dedent('''
|
print(dedent('''
|
||||||
Usage: cheat [OPTIONS] <keyphrase>
|
Usage: cheat [OPTIONS] <keyphrase>
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
|
@ -126,9 +126,9 @@ def help(cheatsheets):
|
||||||
cheat -l
|
cheat -l
|
||||||
|
|
||||||
Available keyphrases:
|
Available keyphrases:
|
||||||
''').strip()
|
''').strip())
|
||||||
|
|
||||||
print list_cheatsheets(cheatsheets)
|
print(list_cheatsheets(cheatsheets))
|
||||||
|
|
||||||
|
|
||||||
def list_cheatsheets(cheatsheets):
|
def list_cheatsheets(cheatsheets):
|
||||||
|
@ -185,7 +185,7 @@ def main():
|
||||||
|
|
||||||
# list cheatsheets and exit
|
# list cheatsheets and exit
|
||||||
if keyphrase in ['-l', '--list']:
|
if keyphrase in ['-l', '--list']:
|
||||||
print list_cheatsheets(cheatsheets)
|
print(list_cheatsheets(cheatsheets))
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
# if the user wants to edit a cheatsheet
|
# if the user wants to edit a cheatsheet
|
||||||
|
@ -205,7 +205,7 @@ def main():
|
||||||
|
|
||||||
# if it does not, say so
|
# if it does not, say so
|
||||||
else:
|
else:
|
||||||
print ('No cheatsheet found for %s.' % keyphrase)
|
print('No cheatsheet found for %s.' % keyphrase)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in New Issue