mirror of
https://github.com/openzim/zimit.git
synced 2025-12-31 04:23:15 +00:00
24 lines
516 B
Python
24 lines
516 B
Python
try:
|
|
import ConfigParser as configparser
|
|
except ImportError:
|
|
import configparser
|
|
import logging.config
|
|
import os
|
|
|
|
from zimit import main
|
|
|
|
here = os.path.dirname(__file__)
|
|
|
|
ini_path = os.environ.get('ZIMIT_INI')
|
|
if ini_path is None:
|
|
ini_path = os.path.join(here, 'local.ini')
|
|
|
|
# Set up logging
|
|
logging.config.fileConfig(ini_path)
|
|
|
|
# Parse config and create WSGI app
|
|
config = configparser.ConfigParser()
|
|
config.read(ini_path)
|
|
|
|
application = main(config.items('DEFAULT'), **dict(config.items('app:main'
|
|
)))
|