[Mediawiki-l] maintinence script to append a new section to a page

Rich Evans revansx at yahoo.com
Tue Dec 23 04:42:37 UTC 2008


Hi Jidanni,

I thought I knew how to implement your idea, but I am stuck. 
[fyi: I am using a WAMP 2.0 from Webdeveloper (community edition)]

at the command prompt (in my mediawiki folder), when I type: 
"php index.php > test.txt", i get a nice html dump of the page as I would expect into the file "test.txt"

however, when I type: 
"php index.php?title=Main&action=raw > test.txt", I get an error that says, "Could not open input file"

this is not the behaviour I expected.

I have used cURL to do retrieve http requests before, will I have to do that locally to get the "action=raw" response?

a better question is, what tool did you have in mind when you referred to the GET command?

I'm sure its a fabulous solution if I can get the mechanics of the GET figured out.

Thanks in advance,
 - Rich (revansx)





----- Original Message ----
From: "jidanni at jidanni.org" <jidanni at jidanni.org>
To: mediawiki-l at lists.wikimedia.org
Sent: Thursday, December 18, 2008 6:45:07 PM
Subject: Re: [Mediawiki-l] maintinence script to append a new section to a page

>>>>> "RE" == Rich Evans <revansx at yahoo.com> writes:

RE> Hey folks, I currently use the "importTextFile.php" maintinence
RE> script to automate the creation of new articles, but now I would
RE> like to use it to automate the addition of "new sections" added to
RE> the bottom of an existing article

Perhaps use
$ GET ...title=myarticlename\&action=raw > file
$ cat newjunk >> file
And then run importTextFile on file.

If there might be [[Category:...]] already at the bottom, instead make
a perl script to insert your addition just before it.

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l at lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l



      



More information about the MediaWiki-l mailing list