Esempio n. 1
0
def main():
    configure_logger()
    config = ConfigParser()
    config.read('kompost.ini')
    config = dict(config.items('kompost'))
    target = config['target']
    src = config['src']
    socket.setdefaulttimeout(int(config.get('timeout', 10)))
    config['media'] = os.path.abspath(os.path.join(target, 'media'))
    config['generic'] = os.path.join(src, 'generic.mako')
    config['cats'] = os.path.join(src, 'category.mako')
    config['icons'] = ('pen.png', 'info.png', 'thumbsup.png',
                       'right.png', 'flash.png')
    config['metadata'] = os.path.join(target, 'metadata.json')
    generate(config)
    pdf(config)
Esempio n. 2
0
def main():
    configure_logger()
    if len(sys.argv) > 1:
        ini = sys.argv[1]
    else:
        ini = "kompost.ini"
    os.environ["CURDIR"] = os.getcwd()
    config = Config(codecs.open(ini, "r", "utf8"))
    config = dict(config.items("kompost"))
    target = config["target"]
    src = config["src"]
    socket.setdefaulttimeout(int(config.get("timeout", 10)))
    config["media"] = os.path.abspath(os.path.join(target, "media"))
    config["generic"] = os.path.join(src, "generic.mako")
    config["cats"] = os.path.join(src, "category.mako")
    config["icons"] = ("pen.png", "info.png", "thumbsup.png", "right.png", "flash.png")
    config["metadata"] = os.path.join(target, "metadata.json")
    generate(config)
    pdf(config)
Esempio n. 3
0
def main():
    configure_logger()
    if len(sys.argv) > 1:
        ini = sys.argv[1]
    else:
        ini = "kompost.ini"
    os.environ['CURDIR'] = os.getcwd()
    config = Config(codecs.open(ini, "r", "utf8"))
    config = dict(config.items('kompost'))
    target = config['target']
    src = config['src']
    socket.setdefaulttimeout(int(config.get('timeout', 10)))
    config['media'] = os.path.abspath(os.path.join(target, 'media'))
    config['generic'] = os.path.join(src, 'generic.mako')
    config['cats'] = os.path.join(src, 'category.mako')
    config['icons'] = ('pen.png', 'info.png', 'thumbsup.png', 'right.png',
                       'flash.png')
    config['metadata'] = os.path.join(target, 'metadata.json')
    generate(config)
    pdf(config)