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.

50 satır
1.7KB

  1. # @name: conversations.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: conversations route for Section 2: Archive Conversations
  6. # @acknowledgements:
  7. from flask import Blueprint, render_template
  8. import markdown
  9. conversations = Blueprint('conversations', __name__)
  10. @conversations.route('/conversations/')
  11. def index():
  12. with open('content/section_2/conversations.md', 'r') as f:
  13. text = f.read()
  14. text = markdown.markdown(text)
  15. return render_template('conversations-overview.html', text=text)
  16. # route for Martha Gowans page
  17. @conversations.route('/conversations/i-martha-gowans')
  18. def martha():
  19. with open('content/section_2/I-Martha-gowans.md', 'r') as f:
  20. text = f.read()
  21. text = markdown.markdown(text)
  22. return render_template('text.html', text=text)
  23. # route for Sewing the Archive page
  24. @conversations.route('/conversations/sewing-the-archive')
  25. def sewing():
  26. with open('content/section_2/sewing-the-archive.md', 'r') as f:
  27. text = f.read()
  28. text = markdown.markdown(text)
  29. return render_template('text.html', text=text)
  30. # route for Caribbean Quiilt page
  31. @conversations.route('/conversations/caribbean-quilt')
  32. def caribbean():
  33. with open('content/section_2/caribbean-quilt.md', 'r') as f:
  34. text = f.read()
  35. text = markdown.markdown(text)
  36. return render_template('text.html', text=text)
  37. # route for Women on the Move page
  38. @conversations.route('/conversations/women-on-the-move')
  39. def women():
  40. with open('content/section_2/women-on-the-move.md', 'r') as f:
  41. text = f.read()
  42. text = markdown.markdown(text)
  43. return render_template('text.html', text=text)