| 1 |
nino.borges |
623 |
"""
|
| 2 |
|
|
RL_FamiliesromLFP
|
| 3 |
|
|
|
| 4 |
|
|
This program is a version of the Families from LFP that formats the final dat file
|
| 5 |
|
|
gathering families from LFP data, into a file from Relativity's way of organizing
|
| 6 |
|
|
families.
|
| 7 |
|
|
"""
|
| 8 |
|
|
|
| 9 |
|
|
import os
|
| 10 |
|
|
|
| 11 |
|
|
class FamilyCreator():
|
| 12 |
|
|
def __init__(self,outputFileName):
|
| 13 |
|
|
self.outputFile = open(outputFileName,'w')
|
| 14 |
|
|
self.sourceFamilyMatrix = {}
|
| 15 |
|
|
self.boxFamilyMatrix = {}
|
| 16 |
|
|
self.folderFamilyMatrix = {}
|
| 17 |
|
|
self.docFamilyMatrix = {}
|
| 18 |
|
|
|
| 19 |
|
|
def DetermineDocClass(self,designator, value):
|
| 20 |
|
|
if designator == "S":
|
| 21 |
|
|
pass
|
| 22 |
|
|
|
| 23 |
|
|
def AddToMatrix(self,designator,value):
|
| 24 |
|
|
if designator == "S":
|
| 25 |
|
|
self.sourceFamilyMatrix = {}
|
| 26 |
|
|
self.boxFamilyMatrix = {}
|
| 27 |
|
|
self.folderFamilyMatrix = {}
|
| 28 |
|
|
self.docFamilyMatrix = {}
|
| 29 |
|
|
|
| 30 |
|
|
if __name__=='__main__':
|
| 31 |
|
|
contents = open(r"C:\temp\hw_test.lfp").readlines()
|
| 32 |
|
|
for line in contents:
|
| 33 |
|
|
line = line.split(",")
|
| 34 |
|
|
bates = line[1]
|
| 35 |
|
|
designator = line[2]
|
| 36 |
|
|
designator = designator.strip()
|
| 37 |
|
|
if designator:
|
| 38 |
|
|
## A new something
|
| 39 |
|
|
fc.StartNewGroup(designator,bates)
|
| 40 |
|
|
else:
|
| 41 |
|
|
## another page of something
|
| 42 |
|
|
pass |