27 lines
618 B
Python
27 lines
618 B
Python
import os
|
|
|
|
# CONFIG
|
|
APPDIR = os.path.dirname( os.path.realpath(__file__) )
|
|
DATADIR = '%s/datas' % APPDIR
|
|
CONFDIR = '%s/config' % APPDIR
|
|
# FOLDER = DATADIR
|
|
|
|
MODEL_IGNORE = []
|
|
with open(".modelignore", "r") as file:
|
|
for line in file:
|
|
MODEL_IGNORE.append(line.strip())
|
|
|
|
|
|
|
|
conf_files = os.listdir( CONFDIR )
|
|
COLS = {
|
|
'': [ 'id', 'name', 'write_date', 'write_uid.name' ], # default
|
|
}
|
|
|
|
for file in conf_files:
|
|
if os.path.isfile( os.path.join(CONFDIR,file) ):
|
|
if file.endswith('.tsv'):
|
|
# eprint( 'Conf file: ', file )
|
|
f = open( os.path.join(CONFDIR,file), 'r' )
|
|
COLS[file[:-4]] = f.read().split()
|
|
f.close() |