A semantic search engine for source code https://bitshift.benkurtovic.com/
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.

пре 10 година
пре 10 година
пре 10 година
1234567891011121314151617181920212223242526272829303132
  1. """
  2. Module to contain all the project's Flask server plumbing.
  3. """
  4. from flask import Flask
  5. from flask import render_template, session
  6. from bitshift import assets
  7. from bitshift.database import Database
  8. from bitshift.query import parse_query
  9. app = Flask(__name__)
  10. app.config.from_object("bitshift.config")
  11. app_env = app.jinja_env
  12. app_env.line_statement_prefix = "="
  13. app_env.globals.update(assets=assets)
  14. database = Database()
  15. @app.route("/")
  16. def index():
  17. return render_template("index.html")
  18. @app.route("/search/<query>")
  19. def search(query):
  20. tree = parse_query(query)
  21. database.search(tree)
  22. pass
  23. if __name__ == "__main__":
  24. app.run()