-
Notifications
You must be signed in to change notification settings - Fork 1
/
stratus.py
41 lines (35 loc) · 1.16 KB
/
stratus.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
"""
stratus - v0.1.0
Author: Alex Kalicki (https://github.com/akalicki)
Free unlimited cloud storage!
All work contained in this file is released under the MIT License.
Please contact the copyright holder with further questions.
"""
import readline
from lib import *
def print_help():
print "\nstratus - v0.1.0"
print "---------------------"
print " help - list all commands"
print " quit - exit the program (aliases: exit, logout)"
navigate.print_help()
dbox.print_help()
print ""
print "\nstratus.py - Free unlimited cloud storage!"
print "Enter a command, or type 'help' to get started.\n"
running = True
while running:
user_input = raw_input('> ')
args = user_input.split(' ')
cmd = args[0]
if cmd == 'help' and len(args) == 1:
print_help()
elif cmd in {'exit', 'logout', 'quit'} and len(args) == 1:
running = False
elif cmd in navigate.COMMANDS:
navigate.process_command(args)
elif cmd in dbox.COMMANDS:
dbox.process_command(args)
else:
print "Error: '" + user_input + "' is not defined."
print "Enter a valid command or type 'help' to get started."