Question
I have a lot of text files I want to upload into TWiki but NOT as attachments. I want to upload them into a Topic's main content area. Is there a way to do this?
Environment
--
RickVonRichter - 22 Dec 2004
Answer
Well, one way is to simply copy them into the relevant
twiki/data/SomeWeb directory from the filesystem. You'll want to make them all have good filenames like
WikiNames.txt
They won't have any revision history or metadata (like forms, last author, etc.) until the first within-twiki edit is saved.
--
MattWilkie - 23 Dec 2004
Or you can use some
CurlTool or
CPAN:LWP
magic.
Also, not sure,
TWikiShellContrib might be useful as well.
Yet another solution: Use a modified
GenericWikiToTWikiAddOn, or a specific one like
DolphinToTWikiAddOn.
--
PeterThoeny - 23 Dec 2004
Or a cshell wrapper around
EditTWikiExternalEditorAddOn ? something like:
#!/bin/tcsh -f
set web="MyWeb"
foreach f ( MyList OfFiles AllWith AWikiWord ForTheirName)
echo "Uploading $f"
cat > do_one.csh << EOF
#!/bin/tcsh -f
cp $f \$1
EOF
chmod a+x do_one.csh
setenv EDITOR do_one.csh
edittwiki $web.$f
end
--
GillesEricDescamps - 15 Mar 2005