Skip to content
Snippets Groups Projects
Commit 94121ad1 authored by Ute Becker's avatar Ute Becker :relaxed:
Browse files

Kalibrierschein für TL1 - deutsch

parent 69dce0dd
No related branches found
No related tags found
No related merge requests found
......@@ -7,18 +7,24 @@ except ImportError:
from ConfigParser import ConfigParser # ver. < 3.0
couch = couchdb.Server('http://a73434.berlin.ptb.de:5984')
db = couch['vl_db'] # existing
config = ConfigParser()
configtl1 = ConfigParser()
ini_values = ConfigParser()
# parse existing file
config.read('tl1.ini')
configtl1.read('tl1.ini')
ini_values.read('inputs.ini')
# read values from a section
cal_cert = config.get('cert', 'cal_cert')
year = config.get('cert', 'year')
no = config.get('cert', 'no')
path=config.get('path', 'path')
cal_cert = ini_values.get('input_cer', 'cal_cert')
year = ini_values.get('input_gen', 'year')
year_str2=year[2:]
no = ini_values.get('input_gen', 'no')
path=configtl1.get('path', 'path')
server=configtl1.get('couch', 'couch')
db_vl=configtl1.get('couch', 'db')
couch = couchdb.Server(server)
db = couch[db_vl] # existing
CertificateDate = str(date.today())
......@@ -124,9 +130,9 @@ obj ='\\object{'+ Object + '}\n'
manufacturer = '\\manufacturer{' + Producer +' }\n'
typ = '\\type{' + Type + '}\n'
serialNo = '\\serialNo{' + Serial + '}\n'
applicant = '\\applicant{{' + Name + '}\n {' + Street + '} \n {' + Zipcode + Town +'}\n {' + Land+'}}\n'
applicant = '\\applicant{{' + Name + '}\n {' + Street + '} \n {' + Zipcode + Town +'}\n {' + Land +'}}\n'
refNo = '\\refNo{ ' + ReferenceNo + '}\n'
calibMark = '\\calibMark{ ' +' ' + Certificate + ' PTB 23}\n'
calibMark = '\\calibMark{ ' +' ' + Certificate + ' PTB ' + year_str2 + '}\n'
calibDate = '\\calibDate{' + MeasurementDate + '}\n'
examiner = '\\examiner{' + Examiner + '}\n'
certificateDate = '\\certificateDate{' + CertificateDate + '}\n'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment