Added logic to lookup ISBNs.
This commit is contained in:
7
main.py
7
main.py
@@ -19,8 +19,9 @@ def processBook(ISBN):
|
||||
if Mode == 1:
|
||||
r = requests.post(URL+'/checkin/', data={'isbn': ISBN, 'locationid': Shelf, 'userid': UserID})
|
||||
print(r.text)
|
||||
|
||||
|
||||
elif Mode == 3:
|
||||
r = requests.post(URL+'/lookup/', data={'isbn': ISBN})
|
||||
print(r.text)
|
||||
while True:
|
||||
var = str(input())
|
||||
x = var.split('.')
|
||||
@@ -39,6 +40,8 @@ while True:
|
||||
elif command == 'UPDATE':
|
||||
os.system('cd ~/libraryClient')
|
||||
os.system('git pull')
|
||||
elif command == 'LU':
|
||||
Mode=3
|
||||
elif command == '':
|
||||
pass
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user