Template parameter output?

View: New views
3 Messages — Rating Filter:   Alert me  

Template parameter output?

by Magnus Manske-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I was thinking about a new API function:

For a given Wikitext or article, return a list of all used templates
(direct and nested), together with the used key/value pairs.

Nested templates could be passed in the nested structure, or as a list
with parent id information. (I'd prefer the latter, since it's easier
to parse if you don't need the nesting tree)

Output could offer a format "RDF". Yay cheap semantic web! :-)

Anyone working on something like that? Anyone interested in
writing/using it? (I'm sure there's plenty of applications to use it
with; I have a few myself)

Cheers,
Magnus

_______________________________________________
Mediawiki-api mailing list
Mediawiki-api@...
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

Re: Template parameter output?

by Max Semenik :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 07.07.2008, 16:48 Magnus wrote:

> I was thinking about a new API function:

> For a given Wikitext or article, return a list of all used templates
> (direct and nested), together with the used key/value pairs.

> Nested templates could be passed in the nested structure, or as a list
> with parent id information. (I'd prefer the latter, since it's easier
> to parse if you don't need the nesting tree)

> Output could offer a format "RDF". Yay cheap semantic web! :-)

> Anyone working on something like that? Anyone interested in
> writing/using it? (I'm sure there's plenty of applications to use it
> with; I have a few myself)

> Cheers,
> Magnus

Having templates and their parameters for my bot is cute, but frankly
much more practical is to modify them. Since the manipulation should
happen inside the bot, this feature isn't really interesting for me.

Though my interests are limited to AWB's style of operations.

--
Best regards,
  Max Semenik ([[User:MaxSem]])


_______________________________________________
Mediawiki-api mailing list
Mediawiki-api@...
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

Re: Template parameter output?

by VasilievVV :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Magnus Manske managed to write:

> I was thinking about a new API function:
>
> For a given Wikitext or article, return a list of all used templates
> (direct and nested), together with the used key/value pairs.
>
> Nested templates could be passed in the nested structure, or as a list
> with parent id information. (I'd prefer the latter, since it's easier
> to parse if you don't need the nesting tree)
>
> Output could offer a format "RDF". Yay cheap semantic web! :-)
>
> Anyone working on something like that? Anyone interested in
> writing/using it? (I'm sure there's plenty of applications to use it
> with; I have a few myself)
>
> Cheers,
> Magnus
You may use parsetree from action=expandtemplates for it.
--VasilievVV


_______________________________________________
Mediawiki-api mailing list
Mediawiki-api@...
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
LightInTheBox - Buy quality products at wholesale price!