Move some variables around to saner places
This commit is contained in:
parent
f813c8d49e
commit
3e474f1b79
@ -23,7 +23,13 @@ doors = {doorName: DoorController(doorData['ip'],
|
||||
name=doorName, access=doorData['access'])
|
||||
for doorName, doorData in config["doors"].items()}
|
||||
|
||||
fieldnames = "CardNumber,CardFormat,PinRequired,PinCode,ExtendedAccess,ExpiryDate,Forename,Initial,Surname,Email,Phone,Custom1,Custom2,Schedule1,Schedule2,Schedule3,Schedule4,Schedule5,Schedule6,Schedule7,Schedule8".split(",")
|
||||
# mapping of member levels to schedules
|
||||
memberLevels = {"CMS Staff": "7x24",
|
||||
"CMS Weekends Only": "Weekends Only",
|
||||
"CMS Weekdays Only": "Weekdays Only",
|
||||
"CMS Unlimited": "Unlimited",
|
||||
"CMS Nights & Weekends": "Nights and Weekends",
|
||||
"CMS Day Pass": "Unlimited"}
|
||||
|
||||
def getMembershipworksData(folders, columns):
|
||||
""" Pull the members csv from the membershipworks api
|
||||
|
@ -8,14 +8,7 @@ from hashlib import md5
|
||||
import os
|
||||
|
||||
from common import *
|
||||
|
||||
# mapping of member levels to schedules
|
||||
memberLevels = {"CMS Staff": "7x24",
|
||||
"CMS Weekends Only": "Weekends Only",
|
||||
"CMS Weekdays Only": "Weekdays Only",
|
||||
"CMS Unlimited": "Unlimited",
|
||||
"CMS Nights & Weekends": "Nights and Weekends",
|
||||
"CMS Day Pass": "Unlimited"}
|
||||
from hid.DoorController import fieldnames
|
||||
|
||||
def makeMember(member, doorAuth):
|
||||
"""Create an output CSV row for the member"""
|
||||
|
@ -8,6 +8,7 @@ E = ElementMaker(namespace="http://www.hidglobal.com/VertX",
|
||||
nsmap={"hid": "http://www.hidglobal.com/VertX"})
|
||||
ROOT = E_plain.VertXMessage
|
||||
|
||||
fieldnames = "CardNumber,CardFormat,PinRequired,PinCode,ExtendedAccess,ExpiryDate,Forename,Initial,Surname,Email,Phone,Custom1,Custom2,Schedule1,Schedule2,Schedule3,Schedule4,Schedule5,Schedule6,Schedule7,Schedule8".split(",")
|
||||
|
||||
class DoorController():
|
||||
def __init__(self, ip, username, password, name="", access=""):
|
||||
|
Reference in New Issue
Block a user