@ -16,3 +16,40 @@ Infoboxes are interesting, and there could be plenty more to check.
But the aim of this tool is to be simple, to be used alongside the editor of wikipedia.
But the aim of this tool is to be simple, to be used alongside the editor of wikipedia.
Analysis on an entire wikidata item is out of scope for this tool.
Analysis on an entire wikidata item is out of scope for this tool.
Read the warnings on wikipedia and wikidata for that kind of analysis.
Read the warnings on wikipedia and wikidata for that kind of analysis.
## Usage
Here is a simple example on how this analyzer can be used for the wikipedia article about "Earth":
``` sh
wikipedia-infobox-analyzer
--title Earth
--lang en
--template <infobox_template_file>
```
By default, the tool assumes that you are looking for tools on the English wikipedia, but you can provide the language code of other wikipedia's like `fr`, `de`, `es` and `eo`.
Make sure the passed title matches the article title, and the tool should be able to find the wikidata entry.
The next section will go over what these infobox templates files are, where you can find them on wikipedia, and how you can customize them locally for your wikidata analysis.
## Templates
The wikipedia sites vary a lot when it comes to templates across the different languages.
The goal of this tool is to be universal, but these templates have not been standardized as far as I am aware.
To mitigate this, templates can be customized and expected to be downloaded for your language from wikipedia.
For instance, go to the infobox template for planets on the English wikipedia (https://en.wikipedia.org/wiki/Template:Infobox_planet) and download the source to a file.
Then you can add the following line to that file locally:
``` text
{{... Wikidata|P18|P31|P361|P571}}
```
The program ignores what you put at the `...`.
It permits templates that include a listing of wikidata entries for their templates.
As an example, this is the case on the following template on the Dutch wikipedia (the first word means "uses"):