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
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. with open('content/section_3/intro-hidden.md', 'r') as f:
  15. text = f.read()
  16. text = markdown.markdown(text)
  17. return render_template('text.html', text=text)
  18. # route for expanding theme page
  19. @hidden.route('/hidden/expanding/')
  20. def expanding():
  21. with open('content/section_3/expanding.md', 'r') as f:
  22. text = f.read()
  23. text = markdown.markdown(text)
  24. results = solr.get_number_random_records('expanding', 10)
  25. return render_template('theme.html', text=text, results=results)
  26. # route for active theme page
  27. @hidden.route('/hidden/active/')
  28. def active():
  29. with open('content/section_3/active.md', 'r') as f:
  30. text = f.read()
  31. text = markdown.markdown(text)
  32. results = solr.get_number_random_records('active', 10)
  33. return render_template('theme.html', text=text, results=results)
  34. # route for secret theme page
  35. @hidden.route('/hidden/secret/')
  36. def secret():
  37. with open('content/section_3/secret.md', 'r') as f:
  38. text = f.read()
  39. text = markdown.markdown(text)
  40. results = solr.get_number_random_records('secret', 10)
  41. return render_template('theme.html', text=text, results=results)
  42. # route for leaking theme page
  43. @hidden.route('/hidden/leaking/')
  44. def leaking():
  45. with open('content/section_3/leaking.md', 'r') as f:
  46. text = f.read()
  47. text = markdown.markdown(text)
  48. results = solr.get_number_random_records('leaking', 10)
  49. return render_template('theme.html', text=text, results=results)
  50. # route for working theme page
  51. @hidden.route('/hidden/working/')
  52. def working():
  53. with open('content/section_3/working.md', 'r') as f:
  54. text = f.read()
  55. text = markdown.markdown(text)
  56. results = solr.get_number_random_records('working', 10)
  57. return render_template('theme.html', text=text, results=results)
  58. # route for resourceful theme page
  59. @hidden.route('/hidden/resourceful/')
  60. def resourceful():
  61. with open('content/section_3/resourceful.md', 'r') as f:
  62. text = f.read()
  63. text = markdown.markdown(text)
  64. results = solr.get_number_random_records('resourceful', 10)
  65. return render_template('theme.html', text=text, results=results)