| 1 |
ninoborges |
8 |
"""
|
| 2 |
|
|
|
| 3 |
|
|
InfoOnlyFieldCreator
|
| 4 |
|
|
|
| 5 |
|
|
Created by
|
| 6 |
|
|
Emanuel Borges
|
| 7 |
|
|
06.16.2009
|
| 8 |
|
|
|
| 9 |
|
|
This program will assist in the creation of the Info-Only fields in Ipro by taking a text file of BegNo,EndNo,
|
| 10 |
|
|
inumerating the pages, and then give you an importable LFP with
|
| 11 |
|
|
IO, (bates page), <Info Only field>,<what you want on the stamp>
|
| 12 |
|
|
|
| 13 |
|
|
You will then import this, making the info only fields in Ipro first.
|
| 14 |
|
|
|
| 15 |
|
|
"""
|
| 16 |
|
|
|
| 17 |
|
|
|
| 18 |
|
|
import FixBatesRange_func
|
| 19 |
|
|
|
| 20 |
|
|
def CreateInfoOnlyFile(pathToFile, pathToOutputFile, infoOnlyField, stampValue):
|
| 21 |
|
|
contents = open(pathToFile).readlines()
|
| 22 |
|
|
outputFile = open(pathToOutputFile,'w')
|
| 23 |
|
|
for line in contents:
|
| 24 |
|
|
line = line.replace("\n","")
|
| 25 |
|
|
begNo, endNo = line.split(",")
|
| 26 |
|
|
batesList = FixBatesRange_func.EnumerateBates(begNo, endNo)
|
| 27 |
|
|
for bates in batesList:
|
| 28 |
|
|
outputFile.write("IO,%s,%s,%s\n"%(bates, infoOnlyField, stampValue))
|
| 29 |
|
|
outputFile.close()
|
| 30 |
|
|
|
| 31 |
|
|
|
| 32 |
|
|
if __name__ == '__main__':
|
| 33 |
|
|
pathToFile = r'\\lisdisdss01\dis23\c_d\83614013\Prod\conf.DAT'
|
| 34 |
|
|
pathToOutputFile = r'\\lisdisdss01\dis23\c_d\83614013\Prod\conf.lfp'
|
| 35 |
|
|
|
| 36 |
|
|
infoOnlyField = '1'
|
| 37 |
|
|
#stampValue = "HIGHLY CONFIDENTIAL - Attorney's Eyes Only"
|
| 38 |
|
|
|
| 39 |
|
|
#pathToFile = r'\\lisdisdss01\DIS19\c_d\39667116\Prod\Mdrummone_CONF.DAT'
|
| 40 |
|
|
#pathToOutputFile = r'\\lisdisdss01\DIS19\c_d\39667116\Prod\Mdrummone_CONF.lfp'
|
| 41 |
|
|
|
| 42 |
|
|
#infoOnlyField = '2'
|
| 43 |
|
|
#stampValue = "CONFIDENTIAL BUSINESS INFORMATION - SUBJECT TO PROTECTIVE ORDER"
|
| 44 |
|
|
|
| 45 |
|
|
stampValue = "CONFIDENTIAL"
|
| 46 |
|
|
CreateInfoOnlyFile(pathToFile, pathToOutputFile, infoOnlyField, stampValue)
|
| 47 |
|
|
|
| 48 |
|
|
|
| 49 |
|
|
|
| 50 |
|
|
## This is a special chunk that shows you how to do this on a database like tria, where ther are foo-0001.001 - foo-0001.092 bates
|
| 51 |
|
|
|
| 52 |
|
|
## for conf
|
| 53 |
|
|
##contents = open(r"\\lisdisdss01\dis23\c_d\82185012\Prod\conf2.dat").readlines()
|
| 54 |
|
|
##>>> outputFile = open(r"\\lisdisdss01\dis23\c_d\82185012\Prod\conf2.lfp",'w')
|
| 55 |
|
|
##>>> for line in contents:
|
| 56 |
|
|
##... line = line.replace("\n","")
|
| 57 |
|
|
##... begNo,EndNo = line.split(",")
|
| 58 |
|
|
##... alpha, beg = begNo.split(".")
|
| 59 |
|
|
##... nul, end = EndNo.split(".")
|
| 60 |
|
|
##... batesList = FixBatesRange_func.EnumerateBates(beg,end)
|
| 61 |
|
|
##... for i in batesList:
|
| 62 |
|
|
##... outputFile.write("IO,"+alpha + "."+i + ",2,CONFIDENTIAL BUSINESS INFORMATION - SUBJECT TO PROTECTIVE ORDER"+"\n")
|
| 63 |
|
|
##...
|
| 64 |
|
|
##>>> outputFile.close()
|
| 65 |
|
|
|
| 66 |
|
|
## for hconf
|
| 67 |
|
|
##>>> contents = open(r"\\lisdisdss01\dis23\c_d\82185012\Prod\hconf2.dat").readlines()
|
| 68 |
|
|
##>>> outputFile = open(r"\\lisdisdss01\dis23\c_d\82185012\Prod\hconf2.lfp",'w')
|
| 69 |
|
|
##>>> for line in contents:
|
| 70 |
|
|
##... line = line.replace("\n","")
|
| 71 |
|
|
##... begNo,EndNo = line.split(",")
|
| 72 |
|
|
##... alpha, beg = begNo.split(".")
|
| 73 |
|
|
##... nul, end = EndNo.split(".")
|
| 74 |
|
|
##... batesList = FixBatesRange_func.EnumerateBates(beg,end)
|
| 75 |
|
|
##... for i in batesList:
|
| 76 |
|
|
##... outputFile.write("IO,"+alpha + "."+i + ",1,HIGHLY CONFIDENTIAL - Attorney's Eyes Only"+"\n")
|
| 77 |
|
|
##...
|
| 78 |
|
|
##>>> outputFile.close()
|
| 79 |
|
|
|