swh.indexer.metadata_dictionary.dart module#

swh.indexer.metadata_dictionary.dart.name_to_person(name)[source]#
class swh.indexer.metadata_dictionary.dart.PubspecMapping(log_suffix='')[source]#

Bases: YamlMapping, SingleFileIntrinsicMapping

name = 'pubspec'#
filename: bytes | Pattern[bytes] = b'pubspec.yaml'#
mapping = {'author': rdflib.term.URIRef('http://schema.org/author'), 'author.email': rdflib.term.URIRef('http://schema.org/email'), 'authors': rdflib.term.URIRef('http://schema.org/author'), 'authors.email': rdflib.term.URIRef('http://schema.org/email'), 'description': rdflib.term.URIRef('http://schema.org/description'), 'homepage': rdflib.term.URIRef('http://schema.org/url'), 'issue_tracker': rdflib.term.URIRef('https://codemeta.github.io/terms/issueTracker'), 'keywords': rdflib.term.URIRef('http://schema.org/keywords'), 'license': rdflib.term.URIRef('http://schema.org/license'), 'name': rdflib.term.URIRef('http://schema.org/name'), 'platforms': rdflib.term.URIRef('http://schema.org/runtimePlatform'), 'repository': rdflib.term.URIRef('http://schema.org/codeRepository'), 'version': rdflib.term.URIRef('http://schema.org/version')}#
string_fields: List[str] = ['repository', 'keywords', 'description', 'name', 'issue_tracker', 'platforms', 'license']#

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

uri_fields: List[str] = ['homepage']#

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

normalize_license(s)[source]#
translate_author(graph: Graph, root, s) None[source]#
translate_authors(graph: Graph, root, authors) None[source]#