diff --git a/main.py b/main.py index 74bdd18..721640a 100644 --- a/main.py +++ b/main.py @@ -7,6 +7,7 @@ import requests # print(r.text) URL = 'http://library.dandhost.com' +# URL = 'http://127.0.0.1:8000' UserID = 1 Card = 1 @@ -23,15 +24,22 @@ def processBook(ISBN): while True: var = str(input()) x = var.split('.') - if x[0] == 'LOC': + command = x[0] + if command == 'LOC': Shelf = x[1] print('Switching shelf to shelf #' + Shelf) - elif x[0] == 'CI': + elif command == 'CI': Mode = 1 - elif x[0] == 'CO': + print('Mode Check in') + elif command == 'CO': Mode = 2 - elif x[0] == 'CARD': + print('Mode Check out') + elif command == 'CARD': Card = 1 + elif command == 'UPDATE': + pass + elif command == '': + pass else: ISBN = x[0] print(ISBN)