Browse Source

Update index.py

pull/18/head
James Mc Dermott 3 years ago
committed by GitHub
parent
commit
6be905a61d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 5 deletions
  1. +9
    -5
      scripts/index.py

+ 9
- 5
scripts/index.py View File

@@ -85,17 +85,21 @@ def required():
times, c, g, details = get_data()
return parser, (options, arguments), (c, g), (times, details)


def flow(options, rooms, info):
times, details = info[0:2]
def requesting_booking(options, rooms, details):
if options.book and len(details) < 5:
booking_option(rooms, details)
def displaying_info(options, rooms, details, times):
if options.lookup:
lookup_option(options, rooms, details, times)
elif options.now:
now_option(options, rooms, times)

def flow(options, rooms, info):
times, details = info[0:2]
requesting_booking(options, rooms, details)
displaying_info(options, rooms, details, times)

def main():
parser, (options, arguments), rooms, info = required()
flow(options, rooms, info)


Loading…
Cancel
Save