.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Catmandu::Importer::Wikidata 3pm" .TH Catmandu::Importer::Wikidata 3pm "2021-01-07" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Catmandu::Importer::Wikidata \- Import from Wikidata .SH "VERSION" .IX Header "VERSION" version 0.06 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& 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 \*(Aqretain_field("labels")\*(Aq .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This Catmandu::Importer queries Wikidata for entities, given by their Wikidata identifier (\f(CW\*(C`Q...\*(C'\fR, \f(CW\*(C`P...\*(C'\fR) or by a title in some know Wikidata site, such as the English Wikipedia (\f(CW\*(C`enwiki\*(C'\fR). The entities are either specified as options (\f(CW\*(C`ids\*(C'\fR, \f(CW\*(C`site\*(C'\fR, and/pr \f(CW\*(C`title\*(C'\fR) or as line-separated input values. By default, the raw \s-1JSON\s0 structure of each Wikidata entity is returned one by one. Entities not found are returned with the \f(CW\*(C`missing\*(C'\fR property set to \f(CW1\fR like this: .PP .Vb 1 \& { "id": "Q7", "missing": "1" } .Ve .PP To further process the \s-1JSON\s0 structure Catmandu::Wikidata contains several Catmandu fixes, e.g. to only retain a selected language. .SH "CONFIGURATION" .IX Header "CONFIGURATION" This importer extends Catmandu::Importer::getJSON, so it can be configured with options \f(CW\*(C`agent\*(C'\fR, \f(CW\*(C`timeout\*(C'\fR, \f(CW\*(C`headers\*(C'\fR, \f(CW\*(C`proxy\*(C'\fR, and \f(CW\*(C`dry\*(C'\fR. Additional options include: .IP "api" 4 .IX Item "api" Wikidata \s-1API\s0 base \s-1URL.\s0 Default is \f(CW\*(C`http://www.wikidata.org/w/api.php\*(C'\fR. .IP "ids" 4 .IX Item "ids" A list of Wikidata entitiy/property ids, such as \f(CW\*(C`Q42\*(C'\fR and \f(CW\*(C`P19\*(C'\fR. Use comma, vertical bar, or space as separator. Read from input stream if no ids, nor titles are specified. .IP "site" 4 .IX Item "site" Wiki site key for referring to Wikidata entities by title. Default is \&\f(CW\*(C`enwiki\*(C'\fR for English Wikipedia. A list of supported site keys can be queried as part of (unless is fixed). .IP "title" 4 .IX Item "title" Title of a page for referring to Wikidata entities. A title is only unique within a selected \f(CW\*(C`site\*(C'\fR. One can also prepend the site key to a title separated by colon, e.g. \f(CW\*(C`enwiki:anarchy\*(C'\fR for the entity that is titled \&\*(L"anarchy\*(R" in the English Wikipedia. Read from input stream if no titles, nor ids are specified. .SH "AUTHOR" .IX Header "AUTHOR" Jakob Voß .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2014 by Jakob Voß. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.