Colophon

Sample colophon data retrieved from Thoth.pub API book publication metadata system.

Code
from thothlibrary import ThothClient
from datetime import datetime
import json

# variables
work ='9bf5f52e-6d99-4d62-bcc5-c57b07efa3f0'

# calling the Thoth GraphQL API
thoth = ThothClient()
response = thoth.work_by_id(work_id=work, raw='true')
data = json.loads(response)

print(data['data']['work']['title'].upper())
print(data['data']['work']['subtitle'].upper())
print('\r')
print(data['data']['work']['imprint']['publisher']['publisherName'])
print(data['data']['work']['place'])
print('\r')
print('First published ' + data['data']['work']['publicationDate'])
print('\r')
print('Copyright © ' + data['data']['work']['copyrightHolder'] + ' ' + data['data']['work']['publicationDate'][:4])
print('Licensed as ' + data['data']['work']['license'])
print('\r')
print('DOI: ' + data['data']['work']['doi'])

PUBLISHING FROM COLLECTIONS USES OF COMPUTATIONAL PUBLISHIGN AND LINKEDOPEN DATA

Open Science Lab - TIB Hannnover

First published 2023-03-30

Copyright © The Authors 2023 Licensed as https://creativecommons.org/licenses/by-sa/4.0/

DOI: https://doi.org/10.5281/zenodo.7701161