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.

__init__.py 1.8KB

2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 (contents and frontmatter)
  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 interventions parts of app (Section 1: Archive Interventions)
  24. from .interventions import interventions as interventions_blueprint
  25. app.register_blueprint(interventions_blueprint)
  26. # blueprint for hidden parts of app (Section 2: Hidden in plain sight)
  27. from .hidden import hidden as hidden_blueprint
  28. app.register_blueprint(hidden_blueprint)
  29. # blueprint for conversations parts of app (Section 3: Archive Conversations)
  30. from .conversations import conversations as conversations_blueprint
  31. app.register_blueprint(conversations_blueprint)
  32. # blueprint for making parts of app (Section 4: Making of)
  33. from .making import making as making_blueprint
  34. app.register_blueprint(making_blueprint)
  35. # blueprint for data parts of app
  36. from .data import data as data_blueprint
  37. app.register_blueprint(data_blueprint)
  38. return app