Inital commit. Basic loop running. Logic to switch check in/out, can scan shelf once to store location. Checking books in currently works.
This commit is contained in:
16
main.py
16
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)
|
||||
|
||||
Reference in New Issue
Block a user