Usage
Tweet TemplatesΒΆ
Token values for the tweet templates will come from a simplified package dictionary. In these, any collection values (i.e. lists and dictionaries) have been replaced with the number of items, the author list has been significantly shortened, and any long strings will be shortened to fit into the tweet character limit (currently set at 140).
For example, if the package dictionary is:
{
'author': 'Dippy Diplodocus, Sophie Stegosaurus',
'author_email': None,
'dataset_category': ['Citizen Science'],
'doi': 'DOI_VALUE',
'license_title': 'Creative Commons Attribution',
'organization': {'description': '', 'name': 'nhm', 'is_organization': True, 'state': 'active'},
'resources': [
{'mimetype': 'image/jpeg', 'name': 'resource_1.jpg', 'format': 'JPEG'},
{'mimetype': 'image/jpeg', 'name': 'resource_2.jpg', 'format': 'JPEG'}
],
'title': 'Dataset Name'
}
Then the tokenised dictionary would be:
{
'author': 'Diplodocus et al.', # just the surname of the first author
# author_email was None so it's excluded
'dataset_category': 1, # lists are counted
'doi': 'DOI_VALUE', # simple string values stay the same
'license_title': 'Creative Commons Attribution',
'organization': 4, # dicts are also counted
'resources': 2,
'title': 'Dataset Name'
}
And if you had defined the tweet template as:
New dataset: "{{ title }}" by {{ author }} ({{ resources }} resources).
Your tweet would then read:
New dataset: "Dataset Name" by Diplodocus et al. (2 resources)