author | renatofilho |
Tue Jul 17 23:17:09 2007 +0100 (2007-07-17) | |
branch | trunk |
changeset 788 | 357b301e2d23 |
parent 718 | 3fbcd3d9b2d1 |
child 800 | 2b1824e138b1 |
permissions | -rw-r--r-- |
morphbr@718 | 1 |
#!/usr/bin/env python |
morphbr@718 | 2 |
|
morphbr@718 | 3 |
__author__ = "Artur Duque de Souza" |
morphbr@718 | 4 |
__author_email__ = "artur.souza@indt.org.br" |
morphbr@718 | 5 |
__license__ = "GPL" |
morphbr@718 | 6 |
__version__ = "0.3" |
morphbr@718 | 7 |
__thanks__ = "Gustavo Sverzut Barbieri" |
morphbr@718 | 8 |
|
morphbr@718 | 9 |
import sys |
morphbr@718 | 10 |
import os |
morphbr@718 | 11 |
import logging as log |
morphbr@718 | 12 |
from lib.server import serve_forever, load_plugins_transcoders |
morphbr@718 | 13 |
|
morphbr@718 | 14 |
log_level = log.INFO |
morphbr@718 | 15 |
for p in sys.argv[1:]: |
morphbr@718 | 16 |
if p == "-v" or p == "--verbose": |
morphbr@718 | 17 |
log_level -= 10 |
morphbr@718 | 18 |
|
morphbr@718 | 19 |
log.basicConfig(level=log_level, |
morphbr@718 | 20 |
format=("### %(asctime)s %(name)-18s \t%(levelname)-8s " |
morphbr@718 | 21 |
"\t%(message)s"), |
morphbr@718 | 22 |
datefmt="%Y-%m-%d %H:%M:%S") |
morphbr@718 | 23 |
|
morphbr@723 | 24 |
if not os.path.exists(".transcoded"): |
morphbr@723 | 25 |
os.mkdir(".transcoded") |
morphbr@723 | 26 |
|
morphbr@718 | 27 |
pd = os.path.join("plugins", "transcoders") |
morphbr@718 | 28 |
load_plugins_transcoders(pd) |
morphbr@718 | 29 |
serve_forever() |