rougail/src/rougail/config.py

22 lines
593 B
Python
Raw Normal View History

2019-11-23 08:17:35 +01:00
# -*- coding: utf-8 -*-
"""
fichier de configuration pour créole
"""
2020-02-16 21:27:42 +01:00
from os.path import join, isfile, abspath, dirname
from pathlib import Path
2019-11-23 08:17:35 +01:00
2020-02-16 21:27:42 +01:00
eoleroot = dirname(abspath(join(__file__, '..', '..')))
2019-11-23 08:17:35 +01:00
# chemin du répertoire source des fichiers templates
patch_dir = join(eoleroot, 'patch')
# repertoire de la dtd
2020-02-16 21:27:42 +01:00
dtddir = '/usr/share/rougail'
if isfile(join(eoleroot, 'data/rougail.dtd')):
dtdfilename = join(eoleroot, 'data/rougail.dtd')
elif isfile('../rougail/data/rougail.dtd'):
dtdfilename = '../rougail/data/rougail.dtd'
2019-11-23 08:17:35 +01:00
else:
2020-02-16 21:27:42 +01:00
dtdfilename = join(dtddir, 'rougail.dtd')