[Mediawiki-api] how to use api commands in batch mode ?

Sam Korn smoddy at gmail.com
Thu May 14 14:03:50 UTC 2009


On Thu, May 14, 2009 at 2:58 PM, Colonna Francois
<colonna at lct.jussieu.fr> wrote:
>
> Le jeudi 14 mai 2009 à 09:19 -0400, Brad Jorsch a écrit :
>> On Wed, May 13, 2009 at 11:12:06AM +0200, Colonna Francois wrote:
>> > Hello,
>> > is it possible to get directly on disk the xml file produced by the api
>> > command below
>> >
>> > api.php?action=query&generator=allpages&gapnamespace=0&gaplimit=1000&format=xml
>> >
>> > using lynx -dump for example (I don't know how to do it) or an other
>> > batch mode procedure ?
>>
>> Use wget, curl, or any other program that downloads a URL and saves it
>> to disk.
>
> I tried wget
>
>
> http://localhost/~wiki/mediawiki/api.php?action=query&generator=allpages&gapnamespace=0&gaplimit=100&format=xml
>
> it results in :
[snip]

The & character has a special meaning on the command-line.  Try
putting quotation marks around the url, so

wget 'http://localhost/~wiki/mediawiki/api.php?action=query&generator=allpages&gapnamespace=0&gaplimit=100&format=xml'

Sam

-- 
Sam
PGP public key: http://en.wikipedia.org/wiki/User:Sam_Korn/public_key



More information about the Mediawiki-api mailing list