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.

29 lines
797B

  1. # @name: hidden.py
  2. # @creation_date: 2022-10-27
  3. # @license: The MIT License <https://opensource.org/licenses/MIT>
  4. # @author: Simon Bowie <ad7588@coventry.ac.uk>
  5. # @purpose: hidden route for Section 3: Hidden in plain sight
  6. # @acknowledgements:
  7. from flask import Blueprint, render_template
  8. from . import solr
  9. import markdown
  10. hidden = Blueprint('hidden', __name__)
  11. # route for hidden page
  12. @hidden.route('/hidden/')
  13. def index():
  14. return render_template('index.html')
  15. # route for active theme page
  16. @hidden.route('/hidden/active/')
  17. def active():
  18. with open('content/section_3/active.md', 'r') as f:
  19. text = f.read()
  20. text = markdown.markdown(text)
  21. results = solr.get_number_random_records('active', 10)
  22. return render_template('theme.html', text=text, results=results)