-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
42 lines (36 loc) · 1.99 KB
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import os
from flask import Flask
from pygments.lexers import *
import config
__author__ = 'ohaz'
app = Flask(__name__)
lexers = {'python': Python3Lexer, 'nasm': NasmLexer, 'autoit': AutoItLexer,
'blitzbasic': BlitzBasicLexer, 'blitzmax': BlitzMaxLexer, 'monkey': MonkeyLexer,
'cpp': CppLexer, 'c': CLexer, 'ini': IniLexer,
'nginx': NginxConfLexer, 'pacman': PacmanConfLexer, 'css': CssLexer,
'less': LessCssLexer, 'sass': SassLexer, 'd': DLexer,
'json': JsonLexer, 'yaml': YamlLexer, 'diff': DiffLexer,
'c#': CSharpLexer, 'f#': FSharpLexer, 'vbnet': VbNetLexer,
'erlang': ErlangLexer, 'brainfuck': BrainfuckLexer, 'fortran': FortranLexer,
'go': GoLexer, 'bnf': BnfLexer, 'glshader': GLShaderLexer,
'gnuplot': GnuplotLexer, 'postscript': PostScriptLexer, 'haskell': HaskellLexer,
'vhdl': VhdlLexer, 'hexdump': HexdumpLexer, 'html': HtmlLexer,
'xml': XmlLexer, 'coffee': CoffeeScriptLexer, 'dart': DartLexer,
'javascript': JavascriptLexer, 'typescript': TypeScriptLexer,
'scala': ScalaLexer, 'commonlisp': CommonLispLexer, 'makefile': MakefileLexer,
'bbcode': BBCodeLexer, 'tex': TexLexer, 'matlab': MatlabLexer,
'objectivec': ObjectiveCLexer, 'objectivecpp': ObjectiveCppLexer,
'swift': SwiftLexer, 'ada': AdaLexer, 'delphi': DelphiLexer,
'perl': PerlLexer, 'php': PhpLexer, 'prolog': PrologLexer,
'cython': CythonLexer, 'numpy': NumPyLexer, 'python2': PythonLexer,
'ruby': RubyLexer, 'rust': RustLexer, 'lua': LuaLexer,
'bash': BashLexer, 'ps': PowerShellLexer, 'mysql': MySqlLexer,
'postgres': PostgresLexer, 'sql': SqlLexer, 'tcl': TclLexer,
'vim': VimLexer, 'http': HttpLexer, 'irc': IrcLogsLexer, 'java': JavaLexer
}
auth_key = config.auth_key
basepath = os.path.dirname(os.path.realpath(__file__))
app.secret_key = config.secret_key
debug = config.debug
host = config.host
port = config.port