Catmandu::Importer::Wikidata(3pm) | User Contributed Perl Documentation | Catmandu::Importer::Wikidata(3pm) |
Catmandu::Importer::Wikidata - Import from Wikidata
version 0.06
catmandu convert Wikidata --ids Q1,P227 catmandu convert Wikidata --site dewiki --title Wahnsinn echo Q1 | catmandu convert Wikidata echo Wahnsinn | catmandu convert Wikidata --site dewiki echo dewiki:Wahnsinn | catmandu convert Wikidata echo Q1 | catmandu convert Wikidata --fix 'retain_field("labels")'
This Catmandu::Importer queries Wikidata for entities, given by their Wikidata identifier ("Q...", "P...") or by a title in some know Wikidata site, such as the English Wikipedia ("enwiki"). The entities are either specified as options ("ids", "site", and/pr "title") or as line-separated input values. By default, the raw JSON structure of each Wikidata entity is returned one by one. Entities not found are returned with the "missing" property set to 1 like this:
{ "id": "Q7", "missing": "1" }
To further process the JSON structure Catmandu::Wikidata contains several Catmandu fixes, e.g. to only retain a selected language.
This importer extends Catmandu::Importer::getJSON, so it can be configured with options "agent", "timeout", "headers", "proxy", and "dry". Additional options include:
Jakob Voß
This software is copyright (c) 2014 by Jakob Voß.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
2022-06-09 | perl v5.34.0 |