A small Python script to pick lyrics, which I can use for our company lunch-game "LyricsPop".
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

35 lines
1.0 KiB

#!/usr/bin/env python
# -*- encoding: utf-8 -*-
from flask import Flask
import logging
# ----------------------------------------------------------------------
# Start up
# ----------------------------------------------------------------------
_log = logging.getLogger('lyrics')
app = Flask(__name__)
app.config['SIDEBAR'] = []
# ----------------------------------------------------------------------
# Import and register blueprints
# ----------------------------------------------------------------------
from lyrics.blueprints.index import index
blueprints = [(index, '/', 'Index')]
for (blueprint, path, title) in blueprints:
_log.debug('{blueprint} => "{path}" as "{title}"'.format(
blueprint=blueprint, path=path, title=title))
app.register_blueprint(blueprint, url_prefix=path)
app.config['SIDEBAR'].append((title, path))
# ----------------------------------------------------------------------
# Start as application
# ----------------------------------------------------------------------
if __name__ == '__main__':
app.run()