#!c:\Program Files\Python39\python.exe # -*- coding: UTF-8 -*- ''' $RCSfile: main.py,v $ $Revision$ $Author: markus $ $Date$ The BioCASE querytool ''' import os exec(open(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir, 'lib', 'biocase', 'adjustpath.py'))).read()) exec(open(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir, 'lib', 'biocase', 'appinit.py'))).read()) from biocase.configtool.general import templateDir, log, printOverHTTP from biocase.datasources import getDsaList from biocase.tools.templating import PageMacro from biocase.tools.update import update_hint # use the main.html template to select a datasource first tmpl = PageMacro('Content', PageMacro.DELMODE) tmpl.load('Content', os.path.join(templateDir, '_main.html')) # get list of available dsa's DsaList = getDsaList() log.debug("DSA list from datasource directory: %s" % str(DsaList)) # fill template DsaTmplList = [{'dsa': dsa.name} for dsa in DsaList] tmpl.expand('Content', 'datasourcelist', DsaTmplList) tmpl['update_hint'] = update_hint() # # print HTML ! # printOverHTTP(tmpl)