A search interface for the Performing Patents Otherwise publication as part of the Politics of Patents case study (part of Copim WP6): this parses data from the archive of RTF files and provides additional data from the European Patent Office OPS API. https://patents.copim.ac.uk
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.1KB

  1. # @name: __init__.py
  2. # @creation_date: 2022-09-07
  3. # @license: The MIT License <https://opensource.org/licenses/MIT>
  4. # @author: Simon Bowie <ad7588@coventry.ac.uk>
  5. # @purpose: Initialises the app, SQLAlchemy, and configuration variables
  6. # @acknowledgements:
  7. # https://www.digitalocean.com/community/tutorials/how-to-add-authentication-to-your-app-with-flask-login
  8. # Config stuff adapted from https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-iii-web-forms
  9. from flask import Flask
  10. from flask_moment import Moment
  11. import os
  12. # initiate Moment for datetime functions
  13. moment = Moment()
  14. def create_app():
  15. app = Flask(__name__)
  16. moment.init_app(app)
  17. # blueprint for main parts of app
  18. from .main import main as main_blueprint
  19. app.register_blueprint(main_blueprint)
  20. # blueprint for search parts of app
  21. from .search import search as search_blueprint
  22. app.register_blueprint(search_blueprint)
  23. # blueprint for random parts of app
  24. from .random import random as random_blueprint
  25. app.register_blueprint(random_blueprint)
  26. return app