summaryrefslogtreecommitdiffstats
path: root/export
diff options
context:
space:
mode:
authorsubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-05-13 05:59:40 +0100
committersubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-05-13 05:59:40 +0100
commita4edfca30e254aa5135a059870ebd60219874087 (patch)
tree702260858e4fb84e946602b996d80ebd213735ef /export
parent90da85e8563298a23e860db08db952f9a6b46f2d (diff)
downloadtroggle-a4edfca30e254aa5135a059870ebd60219874087.tar.gz
troggle-a4edfca30e254aa5135a059870ebd60219874087.tar.bz2
troggle-a4edfca30e254aa5135a059870ebd60219874087.zip
[svn] Got QM pages working.
Started scripts for exporting to old expo format. Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8269 by aaron @ 3/12/2009 2:22 PM
Diffstat (limited to 'export')
-rw-r--r--export/__init__.py0
-rw-r--r--export/tocavetab.py79
-rw-r--r--export/tologbooks.py0
-rw-r--r--export/toqms.py0
4 files changed, 79 insertions, 0 deletions
diff --git a/export/__init__.py b/export/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/export/__init__.py
diff --git a/export/tocavetab.py b/export/tocavetab.py
new file mode 100644
index 0000000..5be866c
--- /dev/null
+++ b/export/tocavetab.py
@@ -0,0 +1,79 @@
+import troggle.expo.models as models
+from django.conf import settings
+
+import csv
+import re
+import os
+
+##format of CAVETAB2.CSV is
+KatasterNumber = 0
+KatStatusCode = 1
+Entrances = 2
+UnofficialNumber = 3
+MultipleEntrances = 4
+AutogenFile = 5
+LinkFile = 6
+LinkEntrance = 7
+Name = 8
+UnofficialName = 9
+Comment = 10
+Area = 11
+Explorers = 12
+UndergroundDescription = 13
+Equipment = 14
+QMList = 15
+KatasterStatus = 16
+References = 17
+UndergroundCentreLine = 18
+UndergroundDrawnSurvey = 19
+SurvexFile = 20
+Length = 21
+Depth = 22
+Extent = 23
+Notes = 24
+EntranceName = 25
+TagPoint = 26
+OtherPoint = 27
+DescriptionOfOtherPoint = 28
+ExactEntrance = 29
+TypeOfFix = 30
+GPSpreSA = 31
+GPSpostSA = 32
+Northing = 33
+Easting = 34
+Altitude = 35
+Bearings = 36
+Map = 37
+Location = 38
+Approach = 39
+EntranceDescription = 40
+PhotoOfLocation = 41
+Marking = 42
+MarkingComment = 43
+Findability = 44
+FindabilityComment = 45
+
+##format of CAVETAB2.CSV is
+headers=['KatasterNumber','KatStatusCode','Entrances','UnofficialNumber','MultipleEntrances','AutogenFile','LinkFile','LinkEntrance','Name','UnofficialName',
+ 'Comment','Area','Explorers','UndergroundDescription','Equipment','QMList','KatasterStatus','References','UndergroundCentreLine','UndergroundDrawnSurvey',
+ 'SurvexFile','Length','Depth','Extent','Notes','EntranceName','TagPoint','OtherPoint','DescriptionOfOtherPoint','ExactEntrance','TypeOfFix','GPSpreSA',
+ 'GPSpostSA','Northing','Easting','Altitude','Bearings','Map','Location','Approach','EntranceDescription','PhotoOfLocation','Marking','MarkingComment',
+ 'Findability','FindabilityComment']
+headersDict={}
+x=0
+for column in headers:
+ headersDict[x]=column
+ x+=1
+print headersDict
+
+def writeCaveTab(path):
+ outfile=file(path,'w')
+ cavewriter=csv.writer(outfile)
+ cavewriter.writerows
+ for cave in Cave.objects.all():
+ caverow[KatasterNumber]=cave.kataster_number
+ caverow[KatStatusCode]=cave.katasternumber
+
+def addCell(caverow, attribute):
+ caverow[attribute]=cave.attribute
+
diff --git a/export/tologbooks.py b/export/tologbooks.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/export/tologbooks.py
diff --git a/export/toqms.py b/export/toqms.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/export/toqms.py