Hi, I dont know if this is the right place to ask. So please point me in the right direction if not.
Is it possible to update an article via an sql-statement? What I want to do:
I have a script wich collects texts from other sources: e.g. /proc/cpuinfo or texts from external websites. And I have an article named: computername Now I want to update the article "computername" with the text from a local file via SQL in a bash script (or a php script...).
Is it possible? Or are there some solutions for this problem?
thanks for any hints.
greetings mario
On Sun, Jul 30, 2006 at 10:57:09AM +0200, Mario Gzuk wrote:
Hi, I dont know if this is the right place to ask. So please point me in the right direction if not.
Is it possible to update an article via an sql-statement? What I want to do:
I have a script wich collects texts from other sources: e.g. /proc/cpuinfo or texts from external websites. And I have an article named: computername Now I want to update the article "computername" with the text from a local file via SQL in a bash script (or a php script...).
Is it possible? Or are there some solutions for this problem?
It would be possible, but it would be a pain, you'd have to have major parts of MediaWiki application logic in your code. You have to take care of MediaWiki's caches, the link tables, recentchanges, etc.
You should use a bot to interact with the wiki, e.g. pywikipediabot http://sourceforge.net/projects/pywikipediabot/
Regards,
jens
Thanks, but I dont think that I need so much because the text is pure text without any markups or links. What I want to do in detail:
Create a article like computers:foo. That will be done by hand. After that The script should only add some text like:
Compuertname: foo Blablabla: bar etc....
Thats all. So maybe there is a way to do that?
greetings mario
Am Sonntag, den 30.07.2006, 12:03 +0200 schrieb Jens Frank:
On Sun, Jul 30, 2006 at 10:57:09AM +0200, Mario Gzuk wrote:
Hi, I dont know if this is the right place to ask. So please point me in the right direction if not.
Is it possible to update an article via an sql-statement? What I want to do:
I have a script wich collects texts from other sources: e.g. /proc/cpuinfo or texts from external websites. And I have an article named: computername Now I want to update the article "computername" with the text from a local file via SQL in a bash script (or a php script...).
Is it possible? Or are there some solutions for this problem?
It would be possible, but it would be a pain, you'd have to have major parts of MediaWiki application logic in your code. You have to take care of MediaWiki's caches, the link tables, recentchanges, etc.
You should use a bot to interact with the wiki, e.g. pywikipediabot http://sourceforge.net/projects/pywikipediabot/
Regards,
jens _______________________________________________ Wikitech-l mailing list Wikitech-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikitech-l
On Sun, Jul 30, 2006 at 03:23:39PM +0200, Mario Gzuk wrote:
Thanks, but I dont think that I need so much because the text is pure text without any markups or links. What I want to do in detail:
Create a article like computers:foo. That will be done by hand. After that The script should only add some text like:
Compuertname: foo Blablabla: bar etc....
Thats all. So maybe there is a way to do that?
Use the bot. MediaWiki uses caches at several levels and you might get out of date data if you just change the text of the revision.
Regards,
jens
If your script is in php and inside MediaWiki, you can just do $a = new Article(Title::newFromText('computers:foo')); $a->doEdit([text here]);
Otherwise try the bot.
Regards, - Dan Li
On 7/30/06, Mario Gzuk mariogzuk@technikz.de wrote:
Thanks, but I dont think that I need so much because the text is pure text without any markups or links. What I want to do in detail:
Create a article like computers:foo. That will be done by hand. After that The script should only add some text like:
Compuertname: foo Blablabla: bar etc....
Thats all. So maybe there is a way to do that?
greetings mario
Am Sonntag, den 30.07.2006, 12:03 +0200 schrieb Jens Frank:
On Sun, Jul 30, 2006 at 10:57:09AM +0200, Mario Gzuk wrote:
Hi, I dont know if this is the right place to ask. So please point me in the right direction if not.
Is it possible to update an article via an sql-statement? What I want to do:
I have a script wich collects texts from other sources: e.g. /proc/cpuinfo or texts from external websites. And I have an article named: computername Now I want to update the article "computername" with the text from a local file via SQL in a bash script (or a php script...).
Is it possible? Or are there some solutions for this problem?
It would be possible, but it would be a pain, you'd have to have major parts of MediaWiki application logic in your code. You have to take care of MediaWiki's caches, the link tables, recentchanges, etc.
You should use a bot to interact with the wiki, e.g. pywikipediabot http://sourceforge.net/projects/pywikipediabot/
Regards,
jens
Wikitech-l mailing list Wikitech-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org