Re: [Wikidata] How to get direct link to image

2017-11-01 Thread Thomas Steiner
Hi Laura,

If a spreadsheet is an option, you can use the WIKICOMMONSLINK function (
https://tomayac.github.io/wikipedia-tools-for-google-spreadsheets/Documentation.html,
select
it in the select box) function of my Google sheets add-on (
https://chrome.google.com/webstore/detail/wikipedia-tools/aiilcelhmpllcgkhhpifagfehbddkdfp?utm_source=permalink
).

Cheers,
Tom
___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


Re: [Wikidata] How to get direct link to image

2017-10-30 Thread Daniel Kinzler
Am 30.10.2017 um 19:10 schrieb Laura Morales:
>> You can also use the Wikimedia Commons API made by Magnus:
> https://tools.wmflabs.org/magnus-toolserver/commonsapi.php
>> It will also gives you metadata about the image (so you'll be able to cite 
>> the author of the image when you reuse it).
> 
> Is the same metadata also available in the Turtle/HDT dump?

Sadly not. We don't have proper structured meta-data yet. That's what the
Structured Data on Commons project is about:



-- 
Daniel Kinzler
Principal Platform Engineer

Wikimedia Deutschland
Gesellschaft zur Förderung Freien Wissens e.V.

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


Re: [Wikidata] How to get direct link to image

2017-10-30 Thread Laura Morales
> You can also use the Wikimedia Commons API made by Magnus:
https://tools.wmflabs.org/magnus-toolserver/commonsapi.php
> It will also gives you metadata about the image (so you'll be able to cite 
> the author of the image when you reuse it).

Is the same metadata also available in the Turtle/HDT dump?

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


Re: [Wikidata] How to get direct link to image

2017-10-30 Thread Envel Le Hir
You can also use the Wikimedia Commons API made by Magnus:
https://tools.wmflabs.org/magnus-toolserver/commonsapi.php

It will also gives you metadata about the image (so you'll be able to cite
the author of the image when you reuse it).

On Mon, Oct 30, 2017 at 6:34 PM, Lucas Werkmeister  wrote:

> The actual value of the statement is just the image name itself (in this
> case “0 A.D. logo.png”), the c.w.o/wiki/ link is only generated for the
> HTML view. You can get the path to the actual file using
> Special:FilePath on Commons; for instance, the RDF export of the entity
> (https://www.wikidata.org/wiki/Special:EntityData/Q161234.ttl) contains
> the statement wd:Q161234 wdt:P18
>  %20Seleucide.jpg>.
>
>
> On 30.10.2017 18:16, Laura Morales wrote:
> > - wikidata entry: https://www.wikidata.org/wiki/Q161234
> > - "logo image" property pointing to: https://commons.wikimedia.org/
> wiki/File:0_A.D._logo.png
> >
> > However... that's a HTML page... How do I get a reference to the .png
> file? In this case https://upload.wikimedia.org/
> wikipedia/commons/1/1c/0_A.D._logo.png
> >
> > Thanks.
> >
> > ___
> > 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
>
___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


Re: [Wikidata] How to get direct link to image

2017-10-30 Thread Lucas Werkmeister
The actual value of the statement is just the image name itself (in this
case “0 A.D. logo.png”), the c.w.o/wiki/ link is only generated for the
HTML view. You can get the path to the actual file using
Special:FilePath on Commons; for instance, the RDF export of the entity
(https://www.wikidata.org/wiki/Special:EntityData/Q161234.ttl) contains
the statement wd:Q161234 wdt:P18
.


On 30.10.2017 18:16, Laura Morales wrote:
> - wikidata entry: https://www.wikidata.org/wiki/Q161234
> - "logo image" property pointing to: 
> https://commons.wikimedia.org/wiki/File:0_A.D._logo.png
>
> However... that's a HTML page... How do I get a reference to the .png file? 
> In this case 
> https://upload.wikimedia.org/wikipedia/commons/1/1c/0_A.D._logo.png
>
> Thanks.
>
> ___
> 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


Re: [Wikidata] How to get direct link to image

2017-10-30 Thread Jan Ainali
Use Special:Filepath.

https://commons.wikimedia.org/wiki/Special:Filepath/0_A.D._logo.png

/Jan Ainali
(skickat på språng så ursäkta min fåordighet)

On Oct 30, 2017 18:16, "Laura Morales"  wrote:

> - wikidata entry: https://www.wikidata.org/wiki/Q161234
> - "logo image" property pointing to: https://commons.wikimedia.org/
> wiki/File:0_A.D._logo.png
>
> However... that's a HTML page... How do I get a reference to the .png
> file? In this case https://upload.wikimedia.org/
> wikipedia/commons/1/1c/0_A.D._logo.png
>
> Thanks.
>
> ___
> 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


Re: [Wikidata] How to get direct link to image

2017-10-30 Thread Jérémie Roquet
2017-10-30 18:16 GMT+01:00 Laura Morales :
> - wikidata entry: https://www.wikidata.org/wiki/Q161234
> - "logo image" property pointing to: 
> https://commons.wikimedia.org/wiki/File:0_A.D._logo.png
>
> However... that's a HTML page... How do I get a reference to the .png file? 
> In this case 
> https://upload.wikimedia.org/wikipedia/commons/1/1c/0_A.D._logo.png

That's not exactly straightforward, given you have to make a query for
every single file (or batch of up to 50 of them), but you can get the
URL through the API. In this case:

https://commons.wikimedia.org/w/api.php?action=query=json=imageinfo=url=File%3A0_A.D._logo.png

Best regards,

-- 
Jérémie

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