Commons: url of a image

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Commons: url of a image

Piotr Pazola
Hi,

I use Text_Wiki package to parse database of polish wikipedia. I need some information about commons, i.e.: i've got something like that: [[Image:Violin case.jpg|thumb|right|200px|Skrzypce w futerale|]] and i wanna link it to: http://upload.wikimedia.org/wikipedia/commons/thumb/c/c0/Violin_case.jpg/200px-Violin_case.jpg. What I need is the unknown part of url string: "/c/c0/", how could I establish it? I've been looking for any data quering wiki's database, but i don't see useful information, unfortunately.

Thank you.

Greets,
Piter.
_______________________________________________
Wikitech-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Commons: url of a image

Filip Maljković
Piotr Pazola wrote:
> Hi,
>
> I use Text_Wiki package to parse database of polish wikipedia. I need some information about commons, i.e.: i've got something like that: [[Image:Violin case.jpg|thumb|right|200px|Skrzypce w futerale|]] and i wanna link it to: http://upload.wikimedia.org/wikipedia/commons/thumb/c/c0/Violin_case.jpg/200px-Violin_case.jpg. What I need is the unknown part of url string: "/c/c0/", how could I establish it? I've been looking for any data quering wiki's database, but i don't see useful information, unfortunately.
>  
There's Special:Filepath that could help you. But you have to do it all
manually unless you create an extension.
Filip
_______________________________________________
Wikitech-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Commons: url of a image

Mormegil
In reply to this post by Piotr Pazola
Hi!

> I use Text_Wiki package to parse database of polish wikipedia. I need some information about commons, i.e.: i've got something like that: [[Image:Violin case.jpg|thumb|right|200px|Skrzypce w futerale|]] and i wanna link it to: http://upload.wikimedia.org/wikipedia/commons/thumb/c/c0/Violin_case.jpg/200px-Violin_case.jpg. What I need is the unknown part of url string: "/c/c0/", how could I establish it? I've been looking for any data quering wiki's database, but i don't see useful information, unfortunately.

Those are the first two characters from the MD5 hash of the name, take
a look at includes/Image.php.

-- [[cs:User:Mormegil | Petr Kadlec]]
_______________________________________________
Wikitech-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Commons: url of a image

Tomer Chachamu
In reply to this post by Piotr Pazola
I think it's the md5 of "Violin_case.jpg".
http://pajhome.org.uk/crypt/md5/ shows "Violin_case.jpg" ->
"c08f6840732b9d9c6c7d7b6e71f04616"
and "Tetris.jpeg" -> "f80e1fb8ec92fbd63688b29ad53a9af"
so http://uncyclopedia.org/wiki/Image:Tetris.jpeg
is at http://uncyclopedia.org/images/c/cf/Tetris.jpeg
which is correct!

However, this behaviour may change in the future (I think it's
unlikely) so you should probably look at the MediaWiki code. Also,
thumbnails aren't made just because you visit the URL.

http://uncyclopedia.org/images/thumb/c/cf/Tetris.jpeg/180px-Tetris.jpeg
http://uncyclopedia.org/images/thumb/c/cf/Tetris.jpeg/190px-Tetris.jpeg

So maybe you need to call some MediaWiki code for it to be generated.

On 5/29/06, Piotr Pazola <[hidden email]> wrote:

> Hi,
>
> I use Text_Wiki package to parse database of polish wikipedia. I need some information about commons, i.e.: i've got something like that: [[Image:Violin case.jpg|thumb|right|200px|Skrzypce w futerale|]] and i wanna link it to: http://upload.wikimedia.org/wikipedia/commons/thumb/c/c0/Violin_case.jpg/200px-Violin_case.jpg. What I need is the unknown part of url string: "/c/c0/", how could I establish it? I've been looking for any data quering wiki's database, but i don't see useful information, unfortunately.
>
> Thank you.
>
> Greets,
> Piter.
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> http://mail.wikipedia.org/mailman/listinfo/wikitech-l
>
_______________________________________________
Wikitech-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Commons: url of a image

Minh Nguyen-2
For thumbnails, you can use thump.php, for instance
<http://meta.wikimedia.org/w/thumb.php?f=Wikipedia-word.png&w=174>.

Tomer Chachamu wrote:

> I think it's the md5 of "Violin_case.jpg".
> http://pajhome.org.uk/crypt/md5/ shows "Violin_case.jpg" ->
> "c08f6840732b9d9c6c7d7b6e71f04616"
> and "Tetris.jpeg" -> "f80e1fb8ec92fbd63688b29ad53a9af"
> so http://uncyclopedia.org/wiki/Image:Tetris.jpeg
> is at http://uncyclopedia.org/images/c/cf/Tetris.jpeg
> which is correct!
>
> However, this behaviour may change in the future (I think it's
> unlikely) so you should probably look at the MediaWiki code. Also,
> thumbnails aren't made just because you visit the URL.
>
> http://uncyclopedia.org/images/thumb/c/cf/Tetris.jpeg/180px-Tetris.jpeg
> http://uncyclopedia.org/images/thumb/c/cf/Tetris.jpeg/190px-Tetris.jpeg
>
> So maybe you need to call some MediaWiki code for it to be generated.
>
> On 5/29/06, Piotr Pazola <[hidden email]> wrote:
>> Hi,
>>
>> I use Text_Wiki package to parse database of polish wikipedia. I need some information about commons, i.e.: i've got something like that: [[Image:Violin case.jpg|thumb|right|200px|Skrzypce w futerale|]] and i wanna link it to: http://upload.wikimedia.org/wikipedia/commons/thumb/c/c0/Violin_case.jpg/200px-Violin_case.jpg. What I need is the unknown part of url string: "/c/c0/", how could I establish it? I've been looking for any data quering wiki's database, but i don't see useful information, unfortunately.
>>
>> Thank you.
>>
>> Greets,
>> Piter.

--
Minh Nguyen <[hidden email]>
AIM: trycom2000; Jabber: [hidden email]; Blog: http://mxn.f2o.org/

_______________________________________________
Wikitech-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/wikitech-l