2009/9/20 Karl Ostmo <kostmo(a)gmail.com>om>:
Hello API wizards,
I'd like to generate article titles matching some generator criteria (e.g.
generator=embeddedin&geititle=Template:US state) and the first few
characters of the article title (e.g. "Al" to match Alaska or Alabama).
I have looked at the "list=search" function or using the "prefix"
available on some queries (e.g. allpages), but it seems that these are only
useful in generating the initial title set, not for operating on titles
produced by a different generator.
Alternatively, maybe the "search" or "allpages" query could be used
generator, but then I'm not sure how to filter those results based on
whether they have an "embeddedin" template. Any ideas?
What you're looking for isn't possible with generators. You're gonna
have to filter the result set yourself. Of course, if you're using a
module that returns its results sorted by title, you can use that
knowledge to stop grabbing new results when you hit "Am", since
everything starting with "Al" is listed before "Am". Similarly, you
could look at the structure of a module's query-continue parameter and
see if there's a title involved there, which you could then replace
with "Al" to jump directly to the first title starting with "Al". Of
course the latter is hacky and doesn't work for each module, and it's
advisable to thoroughly test whether it really gets you the same
Roan Kattouw (Catrope)