Skip to content

Commit

Permalink
added annotators
Browse files Browse the repository at this point in the history
  • Loading branch information
saracarl committed Jun 17, 2019
1 parent a3e40d6 commit d8ee449
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/iiif/manifests/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ def get_zip(self, manifest, version):
readux_url = settings.HOSTNAME
#annotations = Annotation.objects.filter(canvas__manifest__id=manifest.id)
annotators = User.objects.filter(annotation__canvas__manifest__id=manifest.id).distinct()
annotators_string = ', '.join([str(i.owner_id) for i in annotators])
annotators_string = "\nAnnotated by " + annotators_string
annotators_string = ', '.join([str(i.name) for i in annotators])
annotators_string = "Annotated by: " + annotators_string +"\n\n"
# get the owner_id for each/all annotations
# dedup the list of owners (although -- how to order? alphabetical or by contribution count or ignore order) .distinct()
# turn the list of owners into a comma separated string of formal names instead of user ids
readme = "Annotation export from Readux %(version)s at %(readux_url)s\nedition type: Readux IIIF Exported Edition\nexport date: %(now)s UTC\n\n" % locals()
volume_data = "volume title: %(title)s\nvolume author: %(author)s\nvolume date: %(date)s\nvolume publisher: %(publisher)s\npages: %(page_count)s \n\n" % locals()
volume_data = "volume title: %(title)s\nvolume author: %(author)s\nvolume date: %(date)s\nvolume publisher: %(publisher)s\npages: %(page_count)s \n" % locals()
boilerplate = "Readux is a platform developed by Emory University’s Center for Digital Scholarship for browsing, annotating, and publishing with digitized books. This zip file includes an International Image Interoperability Framework (IIIF) manifest for the digitized book and an annotation list for each page that includes both the encoded text of the book and annotations created by the user who created this export. This bundle can be used to archive the recognized text and annotations for preservation and future access.\n\n"
explanation = "Each canvas (\"sc:Canvas\") in the manifest represents a page of the work. Each canvas includes an \"otherContent\" field-set with information identifying that page's annotation list. This field-set includes an \"@id\" field and the label field (\"@type\") \"sc:AnnotationList\". The \"@id\" field contains the URL link at which the annotation list was created and originally hosted from the Readux site. In order to host this IIIF manifest and its annotation lists again to browse the book and annotations outside of Readux, these @id fields would need to be updated to the appropriate URLs for the annotation lists on the new host."
readme = readme + volume_data + boilerplate + explanation + annotators_string
readme = readme + volume_data + annotators_string + boilerplate + explanation
zf.writestr('README.txt', readme)

# Next write the manifest
Expand Down

0 comments on commit d8ee449

Please sign in to comment.