2022-02-03 13:10:29 +01:00
|
|
|
import os
|
2022-01-17 23:56:27 +01:00
|
|
|
|
|
|
|
# CONFIG
|
2022-02-03 13:10:29 +01:00
|
|
|
APPDIR = os.path.dirname( os.path.realpath(__file__) )
|
|
|
|
DATADIR = '%s/datas' % APPDIR
|
|
|
|
CONFDIR = '%s/config' % APPDIR
|
2022-02-06 02:43:41 +01:00
|
|
|
# FOLDER = DATADIR
|
2022-02-03 13:10:29 +01:00
|
|
|
|
2022-01-17 23:56:27 +01:00
|
|
|
MODEL_IGNORE = []
|
|
|
|
with open(".modelignore", "r") as file:
|
|
|
|
for line in file:
|
|
|
|
MODEL_IGNORE.append(line.strip())
|
|
|
|
|
|
|
|
|
2022-02-03 13:10:29 +01:00
|
|
|
|
|
|
|
conf_files = os.listdir( CONFDIR )
|
2022-02-05 21:20:58 +01:00
|
|
|
COLS = {
|
2022-02-05 21:59:11 +01:00
|
|
|
'': [ 'id', 'name', 'write_date', 'write_uid.name' ], # default
|
2022-02-05 21:20:58 +01:00
|
|
|
}
|
|
|
|
|
2022-02-03 13:10:29 +01:00
|
|
|
for file in conf_files:
|
2022-02-05 21:05:19 +01:00
|
|
|
if os.path.isfile( os.path.join(CONFDIR,file) ):
|
2022-02-05 21:10:10 +01:00
|
|
|
if file.endswith('.tsv'):
|
2022-02-05 21:20:58 +01:00
|
|
|
# eprint( 'Conf file: ', file )
|
2022-02-05 21:05:19 +01:00
|
|
|
f = open( os.path.join(CONFDIR,file), 'r' )
|
2022-02-05 21:20:58 +01:00
|
|
|
COLS[file[:-4]] = f.read().split()
|
2022-02-03 13:10:29 +01:00
|
|
|
f.close()
|