Chandra Sekhar B | 1 Oct 2010 03:27

Where are the tempaltes ?

  Hi,

I have the xml dump of wikipedia. I am trying to locate tables. And a 
few tables that I found have their column names specified in templates.

Can someone tell me where in the XML file do I look for templates ?

I have the file "pages-articles.xml.bz2 6.1 GB" downloaded from 
http://download.wikimedia.org/enwiki/20100916/ which says it contains 
the templates.

Thanks
Chandra Sekhar
Platonides | 3 Oct 2010 00:32
Picon

Re: Where are the tempaltes ?

Chandra Sekhar B wrote:
>   Hi,
> 
> I have the xml dump of wikipedia. I am trying to locate tables. And a 
> few tables that I found have their column names specified in templates.
> 
> Can someone tell me where in the XML file do I look for templates ?
> 
> I have the file "pages-articles.xml.bz2 6.1 GB" downloaded from 
> http://download.wikimedia.org/enwiki/20100916/ which says it contains 
> the templates.
> 
> Thanks
> Chandra Sekhar

Templates are in the template namespace, which means, they will begin by
Template:
{{table}} will include the content of [[Template:Table]]
{{Wikipedia:table}} will include the content of [[Wikipedia:Table]]
{{:table}}  will include the content of [[Table]]
Jeff M | 4 Oct 2010 03:09

Wikipedia Main

This Query seems to work well for the Wictionary, however I would like something for the main Wikipedia. How can I change it:
http://en.wiktionary.org/w/api.php?action=query&prop=revisions&rvprop=content&titles=bacteria


Also, is there a way to make the Wictionary automatically go to the recommended definition lookup (bacterium)?



Thanks!
Jeff

_______________________________________________
Mediawiki-api mailing list
Mediawiki-api <at> lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Roan Kattouw | 4 Oct 2010 10:25
Picon

Re: Wikipedia Main

2010/10/4 Jeff M <jeff <at> jeffcomputers.com>:
> This Query seems to work well for the Wictionary, however I would like
> something for the main Wikipedia. How can I change it:
> http://en.wiktionary.org/w/api.php?action=query&prop=revisions&rvprop=content&titles=bacteria
>
You can just change 'wiktionary' to 'wikipedia' and change 'bacteria'
to the name of the page you want to query, and you should be fine.

> Also, is there a way to make the Wictionary automatically go to the
> recommended definition lookup (bacterium)?
>
No, because the recommended definition is only mentioned in the text,
not stored in some database table. The software can't find out what
the recommended definition is unless it understands English.

Roan Kattouw (Catrope)
Christian Koncilia | 4 Oct 2010 11:27
Picon
Gravatar

Query PageID for Links (prop=links)

Hi,

I would like to get a list of all links. Basically, this query produces the
expected result:

http://en.wikipedia.org/w/api.php?action=query&titles=Active_Worlds&prop=lin
ks

However, I would like to get the PageID for each link (instead of or
together with the name). Is there a simple way to do this?

Best regards,
	Christian
Christian Koncilia | 4 Oct 2010 11:31
Picon
Gravatar

Re: Query PageID for Links (prop=links)

Sorry, correct link should be  ...&prop=links (instead of prop=lin)

-----Ursprüngliche Nachricht-----
Von: mediawiki-api-bounces <at> lists.wikimedia.org
[mailto:mediawiki-api-bounces <at> lists.wikimedia.org] Im Auftrag von Christian
Koncilia
Gesendet: Montag, 04. Oktober 2010 11:27
An: 'MediaWiki API announcements & discussion'
Betreff: [Mediawiki-api] Query PageID for Links (prop=links)

Hi,

I would like to get a list of all links. Basically, this query produces the
expected result:

http://en.wikipedia.org/w/api.php?action=query&titles=Active_Worlds&prop=lin
ks

However, I would like to get the PageID for each link (instead of or
together with the name). Is there a simple way to do this?

Best regards,
	Christian

_______________________________________________
Mediawiki-api mailing list
Mediawiki-api <at> lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Roan Kattouw | 4 Oct 2010 11:53
Picon

Re: Query PageID for Links (prop=links)

2010/10/4 Christian Koncilia <christian.koncilia <at> gmx.net>:
> Hi,
>
> I would like to get a list of all links. Basically, this query produces the
> expected result:
>
> http://en.wikipedia.org/w/api.php?action=query&titles=Active_Worlds&prop=lin
> ks
>
> However, I would like to get the PageID for each link (instead of or
> together with the name). Is there a simple way to do this?
>
http://en.wikipedia.org/w/api.php?action=query&titles=Active_Worlds&generator=links&prop=info

Roan Kattouw (Catrope)
Christian Koncilia | 4 Oct 2010 13:36
Picon
Gravatar

Re: Query PageID for Links (prop=links)

Thanks Roan! This is exactly what I was looking for...

Bye
	Christian

-----Ursprüngliche Nachricht-----
Von: mediawiki-api-bounces <at> lists.wikimedia.org
[mailto:mediawiki-api-bounces <at> lists.wikimedia.org] Im Auftrag von Roan
Kattouw
Gesendet: Montag, 04. Oktober 2010 11:54
An: MediaWiki API announcements & discussion
Betreff: Re: [Mediawiki-api] Query PageID for Links (prop=links)

2010/10/4 Christian Koncilia <christian.koncilia <at> gmx.net>:
> Hi,
>
> I would like to get a list of all links. Basically, this query 
> produces the expected result:
>
> http://en.wikipedia.org/w/api.php?action=query&titles=Active_Worlds&pr
> op=lin
> ks
>
> However, I would like to get the PageID for each link (instead of or 
> together with the name). Is there a simple way to do this?
>
http://en.wikipedia.org/w/api.php?action=query&titles=Active_Worlds&generato
r=links&prop=info

Roan Kattouw (Catrope)

_______________________________________________
Mediawiki-api mailing list
Mediawiki-api <at> lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Prateek | 4 Oct 2010 19:46
Favicon

Query about domains of disambiguation pages

Hello All,

For disambiguation pages like these


Is there support in the API to get information about the domain to which the page belongs like "Insects", "Theatre","Sports and Games" and such? I couldn't locate it by myself, hence asking for help.


Cricket may also refer to:
Insects

Cricket (insect), family Gryllidae, also known as "true crickets" 
Tettigoniidae, known as katydids or bush-crickets

Theatre
Cricket (musical), a musical by Andrew Lloyd Webber and Tim Rice

Sports and games
Cricket (darts), a game using the standard 20-number dartboard


Thanks,

Best Regards

Prateek
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api <at> lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Roan Kattouw | 4 Oct 2010 22:32
Picon

Re: Query about domains of disambiguation pages

2010/10/4 Prateek <prateek <at> knoesis.org>:
> Hello All,
>
> For disambiguation pages like these
> http://en.wikipedia.org/wiki/Cricket_(disambiguation)
> Is there support in the API to get information about the domain to which the
> page belongs like "Insects", "Theatre","Sports and Games" and such? I
> couldn't locate it by myself, hence asking for help.
The software does not treat disambig pages specially. If you're really
just interested in the link targets, you can use prop=links to obtain
them like you would with any normal page.

Roan Kattouw (Catrope)

Gmane