$def with (author) $if author.enumeration: $ name = author.name + ", " + author.enumeration $else: $ name = author.name $ auri = "http://openlibrary.org" + author.key $ agent_type = author.foaf_agent() $def display(tag, value): $if isinstance(value, list): $for x in value: <$tag>$x $elif value: <$tag>$value $:display("foaf:name", name) $:display("rdg2:variantNameForThePerson", author.alternate_names) $:display("rdg2:biographicalInformation", author.bio) $:display("rdg2:titleOfThePerson", author.title) $if author.birth_date: $author.birth_date $if author.death_date: $author.death_date $if 'isni' in author.remote_ids: $if 'wikidata' in author.remote_ids: $if 'viaf' in author.remote_ids: $if author.wikipedia: Wikipedia $for link in author.links: $link.title $ photos = [p for p in author.photos if p > 0] $for photo in photos: $ auphoto = "https://covers.openlibrary.org/b/id/" + str(photo) + "-M.jpg" $author.last_modified.isoformat() $author.created.isoformat() $author.revision