Move some variables around to saner places

This commit is contained in:
Adam Goldsmith 2018-10-18 20:13:34 -04:00
parent f813c8d49e
commit 3e474f1b79
3 changed files with 9 additions and 9 deletions

View File

@ -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

View File

@ -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"""

View File

@ -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=""):