]> git.gir.st - subscriptionfeed.git/blob - app/__main__.py
don't rely on calc(max()) css to get video to display
[subscriptionfeed.git] / app / __main__.py
1 #!/bin/sh
2 ''':'
3 . "`dirname "$0"`/../venv/bin/activate"
4 # uncomment if you aren't using /etc/yt/config.ini:
5 #export YT_CONFIG=/opt/yt/config/config.ini
6
7 exec python3 "$0" "$@"
8 ':'''
9
10 if __package__ is None: # called as ./__main__.py
11 import sys, os
12 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
13
14 from app import app
15
16 if __name__ == '__main__':
17 import sys
18 if '--routes' in sys.argv:
19 for rule in app.url_map.iter_rules():
20 print(f"{rule.endpoint}\t{rule.rule}")
21 sys.exit(0)
22 app.run(debug=True, port=8000, host="0.0.0.0")
Imprint / Impressum