swh.indexer.metadata_dictionary.cff module

class swh.indexer.metadata_dictionary.cff.CffMapping(log_suffix='')[source]

Bases: swh.indexer.metadata_dictionary.base.DictMapping, swh.indexer.metadata_dictionary.base.SingleFileMapping

Dedicated class for Citation (CITATION.cff) mapping and translation

name = 'cff'
filename = b'CITATION.cff'
mapping = {'abstract': 'http://schema.org/description', 'authors': 'http://schema.org/author', 'date-released': 'http://schema.org/datePublished', 'doi': 'http://schema.org/identifier', 'entity.address + entity.city + entity.region + entity.post-code + entity.country': 'http://schema.org/address', 'entity.email': 'http://schema.org/email', 'entity.name': 'http://schema.org/name', 'entity.orcid': 'http://schema.org/identifier', 'keywords': 'http://schema.org/keywords', 'license': 'http://schema.org/license', 'license-url': 'http://schema.org/license', 'person.address + person.city + person.region + person.post-code + person.country': 'http://schema.org/address', 'person.affiliation': 'http://schema.org/affiliation', 'person.email': 'http://schema.org/email', 'person.given-names': 'http://schema.org/givenName', 'person.name-particle + person.family-names + person.name-suffix': 'http://schema.org/familyName', 'person.orcid': 'http://schema.org/identifier', 'reference.type': '@type', 'references': 'https://codemeta.github.io/terms/referencePublication', 'repository': 'https://codemeta.github.io/terms/issueTracker', 'repository-artifact': 'http://schema.org/downloadUrl', 'repository-code': 'http://schema.org/codeRepository', 'title': 'http://schema.org/name', 'url': 'http://schema.org/url', 'version': 'http://schema.org/version'}
string_fields = ['keywords', 'license', 'abstract', 'version', 'doi']

List of fields that are simple strings, and don’t need any normalization.

translate(raw_content)[source]
normalize_authors(d)[source]
normalize_doi(s)[source]
normalize_license(s)[source]
normalize_repository_code(s)[source]
normalize_date_released(s)[source]