morphbr@718: #!/usr/bin/env python morphbr@718: morphbr@718: __author__ = "Artur Duque de Souza" morphbr@718: __author_email__ = "artur.souza@indt.org.br" morphbr@718: __license__ = "GPL" morphbr@718: __version__ = "0.3" morphbr@718: __thanks__ = "Gustavo Sverzut Barbieri" morphbr@718: morphbr@718: import sys morphbr@718: import os renatofilho@800: import mimetypes morphbr@718: import logging as log morphbr@718: from lib.server import serve_forever, load_plugins_transcoders morphbr@718: renatofilho@800: mimetypes.init() morphbr@718: log_level = log.INFO morphbr@718: for p in sys.argv[1:]: morphbr@718: if p == "-v" or p == "--verbose": morphbr@718: log_level -= 10 morphbr@718: morphbr@718: log.basicConfig(level=log_level, morphbr@718: format=("### %(asctime)s %(name)-18s \t%(levelname)-8s " morphbr@718: "\t%(message)s"), morphbr@718: datefmt="%Y-%m-%d %H:%M:%S") morphbr@718: morphbr@723: if not os.path.exists(".transcoded"): morphbr@723: os.mkdir(".transcoded") morphbr@723: morphbr@718: pd = os.path.join("plugins", "transcoders") morphbr@718: load_plugins_transcoders(pd) morphbr@718: serve_forever()