Added logic to lookup ISBNs.

This commit is contained in:
dan
2021-06-12 14:15:31 -04:00
parent 086cd1edf9
commit bd149dc7e5

View File

@@ -19,8 +19,9 @@ def processBook(ISBN):
if Mode == 1: if Mode == 1:
r = requests.post(URL+'/checkin/', data={'isbn': ISBN, 'locationid': Shelf, 'userid': UserID}) r = requests.post(URL+'/checkin/', data={'isbn': ISBN, 'locationid': Shelf, 'userid': UserID})
print(r.text) print(r.text)
elif Mode == 3:
r = requests.post(URL+'/lookup/', data={'isbn': ISBN})
print(r.text)
while True: while True:
var = str(input()) var = str(input())
x = var.split('.') x = var.split('.')
@@ -39,6 +40,8 @@ while True:
elif command == 'UPDATE': elif command == 'UPDATE':
os.system('cd ~/libraryClient') os.system('cd ~/libraryClient')
os.system('git pull') os.system('git pull')
elif command == 'LU':
Mode=3
elif command == '': elif command == '':
pass pass
else: else: