Пример #1
0
def setup_app(command, conf, vars):
    """Place any commands to setup fedoratagger here"""
    load_environment(conf.global_conf, conf.local_conf)
    setup_schema(command, conf, vars)
    bootstrap.bootstrap(command, conf, vars)
Пример #2
0
    os.environ['PYTHON_EGG_CACHE'] = '/usr/local/turbogears/tagger/python-eggs'

from paste.deploy import appconfig
from pylons import config
from fedoratagger.config.environment import load_environment

try:
    conf = appconfig('config:/usr/local/turbogears/tagger/production.ini')
    print "Using production configuration"
except Exception, e:
    print "*" * 75
    print "    USING DEVELOPMENT CONFIGURATION"
    print "*" * 75
    conf = appconfig('config:' + os.path.abspath('development.ini'))

load_environment(conf.global_conf, conf.local_conf)

import fedoratagger.model as m
m.metadata.create_all(bind=config['pylons.app_globals'].sa_engine)

print """
 ____________________________
< welcome to the tagger shell >
 ----------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\\
                ||----w |
                ||     ||

Пример #3
0
def setup_app(command, conf, vars):
    """Place any commands to setup fedoratagger here"""
    load_environment(conf.global_conf, conf.local_conf)
    setup_schema(command, conf, vars)
    bootstrap.bootstrap(command, conf, vars)
Пример #4
0
#!/usr/bin/env python

import warnings
warnings.catch_warnings()
warnings.simplefilter("ignore")

from os.path import abspath, sep
import simplejson

from paste.deploy import appconfig
from pylons import config
from fedoratagger.config.environment import load_environment

prefix = abspath(sep.join(__file__.split(sep)[:-1]))
conf = appconfig('config:%s/development.ini' % prefix)

load_environment(conf.global_conf, conf.local_conf)

import fedoratagger.model as m
m.metadata.create_all(bind=config['pylons.app_globals'].sa_engine)

from fedoratagger.lib.utils import dump2json
print simplejson.dumps(dump2json())