Accessing Template Fields

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

Accessing Template Fields

Brendan CM
I looked through the API docs I found online, and I didn't see any straightforward way to access template fields on a page through any obvious means.  As an example, I want to access a page, pull in values from a number of different pre-defined wiki-page-template fields.  Is there any way to do this, or am I stuck doing regex on a big blob of text?

Thanks,
Brendan

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: Accessing Template Fields

Dian-3
hi Brendan,
you can try to use the Page Object Model
[http://code.google.com/p/mediawiki-page-object-model/] based on the MW API.


> I looked through the API docs I found online, and I didn't see any
> straightforward way to access template fields on a page through any
> obvious means.  As an example, I want to access a page, pull in values
> from a number of different pre-defined wiki-page-template fields.  Is
> there any way to do this, or am I stuck doing regex on a big blob of text?
>
> Thanks,
> Brendan
> ------------------------------------------------------------------------
>
> _______________________________________________
> Mediawiki-api mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>  


_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: Accessing Template Fields

Brendan CM
I looked into this, and I'm a little confused how it works, as it doesn't seem to do what it says it's supposed to.  Is this extension possibly only compatible with an earlier version of MW?
-Brendan


On Tue, Oct 14, 2008 at 12:36 AM, Dian <[hidden email]> wrote:
hi Brendan,
you can try to use the Page Object Model
[http://code.google.com/p/mediawiki-page-object-model/] based on the MW API.


> I looked through the API docs I found online, and I didn't see any
> straightforward way to access template fields on a page through any
> obvious means.  As an example, I want to access a page, pull in values
> from a number of different pre-defined wiki-page-template fields.  Is
> there any way to do this, or am I stuck doing regex on a big blob of text?
>
> Thanks,
> Brendan
> ------------------------------------------------------------------------
>
> _______________________________________________
> Mediawiki-api mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>


_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api


_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: Accessing Template Fields

Brianna Laugher
In reply to this post by Brendan CM
2008/10/14 Brendan Crosser-McGay <[hidden email]>:
> I looked through the API docs I found online, and I didn't see any
> straightforward way to access template fields on a page through any obvious
> means.  As an example, I want to access a page, pull in values from a number
> of different pre-defined wiki-page-template fields.  Is there any way to do
> this, or am I stuck doing regex on a big blob of text?

I was happily surprised to find out recently that you can parse HTML
tables (and most infobox-style templates get converted to tables)
using Google Spreadsheets:
<http://ouseful.wordpress.com/2008/10/14/data-scraping-wikipedia-with-google-spreadsheets/>

I don't know if there is some way to automate that on the fly, but it
could be worth checking out anyway. I reckon it's pretty neat.

cheers
Brianna

--
They've just been waiting in a mountain for the right moment:
http://modernthings.org/

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api