Antonin:

The query is http://tinyurl.com/yanppn5k and the possible result could be this: https://es.wikipedia.org/wiki/Anexo:Reservas_nacionales_de_Chile#Reservas_nacionales_de_Chile

(columns in es.wiki: photo, year of declaration, name, region, province, area)

I want include an icon to Commons if the category exists, and a link to "upload photo" to link an UploadWizard in Commons with the &cat=<cat name> if exists in Commons. (somewhat like as WLM listing in some national contests).

In wikitext, it maybe:

|-
| [[FIle:xxx.jpg|80px|link=]]
| {{{name}}} {{#if:{{{commons cat|[[:commons:Category:{{{commons cat}}}|Commons]]}}
| {{{year}}}
| {{{region}}}
| {{{province}}}
| {{{area protected}}}
| [[File:Missing image icon with camera and upload arrow.svg|80px|link=https://commons.wiki....&cat={{{commons cat}}}]]

Kindly

On Mon, Apr 16, 2018 at 9:25 AM, Antonin Delpeuch (lists) <lists@antonin.delpeuch.eu> wrote:
I don't see why it would be impossible… Could you share your query and
give the wikicode you would like to generate for a sample row?

Antonin

On 16/04/2018 14:19, Dennis Tobar wrote:
> Antonin:
>
> Thanks for share your query. I want to create a row with name, year of
> creation, area protected (in hectare), a photo, the Commons category (if
> exists) and the legal decree that creates the protected area, so I see
> that seems impossible to do it with a few concats :)
>
> I already have the query and the data from Wikidata, so this isn't the
> key problem.
>
>
>
> On Mon, Apr 16, 2018 at 8:40 AM, Antonin Delpeuch (lists)
> <lists@antonin.delpeuch.eu <mailto:lists@antonin.delpeuch.eu>> wrote:
>
>     Hi,
>
>     It is possible to use templates in Listeria table cells, by tweaking
>     your SPARQL query so that it returns the appropriate wikicode:
>
>     https://www.wikidata.org/wiki/User:Pintoch/orgid
>     <https://www.wikidata.org/wiki/User:Pintoch/orgid>
>
>     If you have templates which depend on multiple variables in your SPARQL
>     query, I suppose you could take advantage of the fact that the pipe
>     characters in wiki tables can also be used to separate template
>     arguments: you could generate parts of the template in various
>     consecutive SPARQL variables and they would all be rendered as one
>     template in a cell (but the headers would go out of sync).
>
>     But that's a ugly hack - I would be interested in a cleaner way too.
>
>     Antonin
>
>     On 16/04/2018 13:30, Dennis Tobar wrote:
>     > Hi:
>     >
>     > I'm working on protected areas in Chile and I want to get the list
>     using
>     > Listeriabot but in a "special format" using templates. I tried to find
>     > some example without luck.
>     >
>     > Does anyone know a working example of Listeriabot + template to render
>     > the rows?.
>     >
>     > Kindly,
>     >
>     > --
>     > Dennis Tobar Calderón
>     > Ingeniero en Informática UTEM
>     >
>     >
>     > _______________________________________________
>     > Wikidata mailing list
>     > Wikidata@lists.wikimedia.org <mailto:Wikidata@lists.wikimedia.org>
>     > https://lists.wikimedia.org/mailman/listinfo/wikidata
>     <https://lists.wikimedia.org/mailman/listinfo/wikidata>
>     >
>
>
>     _______________________________________________
>     Wikidata mailing list
>     Wikidata@lists.wikimedia.org <mailto:Wikidata@lists.wikimedia.org>
>     https://lists.wikimedia.org/mailman/listinfo/wikidata
>     <https://lists.wikimedia.org/mailman/listinfo/wikidata>
>
>
>
>
> --
> Dennis Tobar Calderón
> Ingeniero en Informática UTEM
>
>
> _______________________________________________
> Wikidata mailing list
> Wikidata@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikidata
>


_______________________________________________
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata



--
Dennis Tobar Calderón
Ingeniero en Informática UTEM