'VISCOSITY': ':math:`\eta`',
    'MELTING_LINE': 'melt',
    'SURFACE_TENSION': ':math:`\sigma`'
}
bibtex_keys = [
    'EOS', 'CP0', 'CONDUCTIVITY', 'VISCOSITY', 'MELTING_LINE',
    'SURFACE_TENSION'
]

fluids_path = os.path.join(web_dir, 'fluid_properties', 'fluids')
if not os.path.exists(fluids_path):
    os.makedirs(fluids_path)

for fluid in CoolProp.__fluids__:

    FG = FluidGenerator(fluid)
    FG.write(fluids_path)

    d.add('name', fluid)
    for key in bibtex_keys:
        try:
            # get the item
            s = CoolProp.CoolProp.get_BibTeXKey(fluid, key)
            s = s.strip()
            if s and any(
                [_s not in bibdata.entries.keys() for _s in s.split(',')]):
                print("problem %s %s %s %s" %
                      (fluid, key, '\t\t\t\t', "|" + s + '|'))
                d.add(key, '')
            else:
                d.add(key, s)
bibtexer = getBibtexParser()

bibtex_map = {'EOS': 'EOS',
              'CP0': ':math:`c_{p0}`',
              'CONDUCTIVITY': ':math:`\lambda`',
              'VISCOSITY': ':math:`\eta`',
              'MELTING_LINE': 'melt'}
bibtex_keys = ['EOS','CP0','CONDUCTIVITY','VISCOSITY','MELTING_LINE']

fluids_path = os.path.join(web_dir,'fluid_properties','fluids')
if not os.path.exists(fluids_path):
    os.makedirs(fluids_path)
    
for fluid in CoolProp.__fluids__:
    
    FG = FluidGenerator(fluid)
    FG.write(fluids_path)
        
    d.add('name', fluid)
    for key in bibtex_keys:
        try:
            # get the item
            s = CoolProp.CoolProp.get_BibTeXKey(fluid,key)
            if s.strip() and s.strip() not in bibdata.entries.keys():
                print 'problem', fluid, key, '\t\t\t\t', "|"+s+'|'
                d.add(key, '')
            else:
                d.add(key, s)
        except ValueError as E:
            d.add(key, '')