[Home]WikiSuggestions/ImportTextfile

UseModWiki | WikiSuggestions | RecentChanges | Preferences

Import textfile into wiki

For automated insertion of text into existing wiki-pages, and creation of new pages.

Example: I get some daily statistics via email (from a cronjob). I would like to publish these automatically on my wiki. So procmail could save such a mail to a textfile, then call the import-script. This script would put the text into the wiki as a new page,

with a name like "Xyz-Stats-2001-05-13", then insert a link to this new page on the main stats page.

Ok, I sort-of solved this myself with an external script which creates commands like
echo 'title=Test1&oldtime=992012345&text=Test1+abc%0d%0aXYZ&Save=Y' | lynx -post_data http://www.mydomain.de/cgi-bin/wiki.pl
This will put the text "Test1 abcCRLFXYZ" on the wiki-page "Test1". Not really elegant, but it works...

--HaJoGurt

Can someone help me how to do this ? 02.05.2004 TomGries

I contend that this solution is elegant, exactly because it combines existing tools to solve the problem. It's the UnixWay.

-- DanMuller

Use a placeholder like %stats% and to process it call one of the file opening functions. I've used this for WikiPatches/CSSskins -- Tarquin

Or if your running ActiveState? perl: lwp-request "http://www.mydomain.de/cgi-bin/wiki.pl?title=Test1&oldtime=992012345&text=Test1+abc%0d%0aXYZ&Save=Y" Bachmann?


UseModWiki | WikiSuggestions | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited November 2, 2007 4:29 pm by MarkusLude (diff)
Search: