Commit eed3643f authored by Jason Yeomans's avatar Jason Yeomans
Browse files

room-number.py progress [INCOMPLETE]

parent 89372aec
...@@ -21,26 +21,33 @@ roomNumbers = open('room-numbers', 'r') ...@@ -21,26 +21,33 @@ roomNumbers = open('room-numbers', 'r')
print "[{" print "[{"
# for line in file # for line in file
for line in roomNumbers: pk = 1
curFloorInBuilding = 1
curFloor = 1
print "}, {\n" for line in roomNumbers:
print " \"floor\": " + + ",\n" if not prog.match('[a-zA-Z]',line):
print " \"number\": " + + ",\n" print "}, {\n"
print " \"slug\": \"" + slug_generator() + "\",\n" print " \"floor\": " + curFloor + ",\n"
print " \"room_num\": \"" + + "\",\n" print " \"number\": " + line + ",\n"
print " }," print " \"room_num\": \"" + line + "\",\n"
print " \"model\":\"housing.room\",\n" print " \"slug\": \"" + slug_generator() + "\",\n"
print " \"pk\":\n" print " },"
print " \"model\":\"housing.room\",\n"
print " \"pk\":\n"
pk++
print "}]" print "}]"
""" """
}, {
"fields": { "fields": {
"floor": 8, "floor": 1,
"number": 204, "created": "2015-04-09T19:56:59.594Z",
"slug": "8J6yWD", "number": 101,
"floor_num": "2" "modified": "2015-04-09T19:56:59.598Z",
"room_num": "101",
"slug": "G4xTdX"
}, },
"model":"housing.floor", "model": "housing.room",
"pk":44 "pk": 1
}, {
""" """
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment