Example #1
0
def run(fsphinx_config='',
        sim_config='',
        from_dir='',
        port='',
        no_debug=False):
    if fsphinx_config:
        cl = FSphinxClient.FromConfig(fsphinx_config)
    else:
        cl = None
    if sim_config:
        sim_cl = SimClient.FromConfig(sim_config)
    else:
        sim_cl = None
    if no_debug:
        autoreload = False
    else:
        autoreload = True
    if from_dir:
        app = CloudMiningApp.from_directory(from_dir,
                                            cl=cl,
                                            sim_cl=sim_cl,
                                            autoreload=autoreload)
    else:
        app = CloudMiningApp(cl, sim_cl, autoreload=autoreload)
    if port:
        app.set_port(port)
    if no_debug:
        app.debug = False
        app.template_caching = True
    app.run()
Example #2
0
def run(fsphinx_config='', sim_config='', from_dir='', port='', no_debug=False):
    if fsphinx_config:
        cl = FSphinxClient.FromConfig(fsphinx_config)
    else:
        cl = None
    if sim_config:
        sim_cl = SimClient.FromConfig(sim_config)
    else:
        sim_cl = None
    if no_debug:
        autoreload = False
    else:
        autoreload = True
    if from_dir:
        app = CloudMiningApp.from_directory(from_dir, cl=cl, sim_cl=sim_cl, autoreload=autoreload)
    else:
        app = CloudMiningApp(cl, sim_cl, autoreload=autoreload)
    if port:
        app.set_port(port)
    if no_debug:
        app.debug = False
        app.template_caching = True
    app.run()
Example #3
0
# you can reorder the facets and change default look here
# name must match the sphinx client facet names
app.set_ui_facets(
    dict(name='author', description='AUTHORS', color='blue', visualization='counts'),
    dict(name='keyword', description='KEYWORDS', color='black'),
    dict(name='venue', description='VENUE', color='green', visualization='counts'),
    dict(name='year', description='YEAR', color='red', visualization='rose'),
)

# instance name and description which appears in the front page
app.set_ui_instance(
    instance_name='DBLP', 
    description='''<p>Search over 1.7M <strong>computer science publications</strong> from <a href="http://dblp.uni-trier.de/db">DBLP</a>
    enhanced with <a href="http://citeseerx.ist.psu.edu/">CiteSeerX</a>.</p>'''
)

# read templates from this directory first
app.override_template('./views')

# all assets at /public/ will be read here
app.set_public_dir('./public')

# add a custom stylesheet
app.add_stylesheets('/public/custom.css')

# if called from the command line will start HTTP server
# otherwise it will honor cgi or fastcgi protocol
if __name__ == '__main__':
    app.run()
Example #4
0
         visualization='counts'),
    dict(name='keyword', description='KEYWORDS', color='black'),
    dict(name='venue',
         description='VENUE',
         color='green',
         visualization='counts'),
    dict(name='year', description='YEAR', color='red', visualization='rose'),
)

# instance name and description which appears in the front page
app.set_ui_instance(
    instance_name='DBLP',
    description=
    '''<p>Search over 2.4M <strong>computer science publications</strong> from <a href="http://dblp.uni-trier.de/db">DBLP</a>
    enhanced with <a href="http://citeseerx.ist.psu.edu/">CiteSeerX</a>.</p>'''
)

# read templates from this directory first
app.override_template('./views')

# all assets at /public/ will be read here
app.set_public_dir('./public')

# add a custom stylesheet
app.add_stylesheets('/public/custom.css')

# if called from the command line will start HTTP server
# otherwise it will honor cgi or fastcgi protocol
if __name__ == '__main__':
    app.run()