Question
Background:
We've been using twiki for about 6 months and it's very helpful.
I'm currently working on getting the output of an internal report tool into twiki. The report tool creates about 1000 files. I've been able to successfully "brute force" import them into Twiki by just naming the output files as .txt and copying then over to the twiki machine.
Now they want version control
Question:
What is the easiest way to add version control to documents "imported" into twiki?
I've looked at source, and I
could just use rcs manually myself, but i'm looking if there is any easier (and more correct) way to do this.
thanx,
ophir
.
- TWiki version: sept 2001
- Web server: apache
- Server OS: solaris (7 i think)
- Web browser: na
- Client OS: na
--
OphirPrusak - 01 Apr 2002
Answer
We are doing something similar...! We have several machines at customer sites that we track configuration changes. We have a ksh script that goes out and collects the data, formats it, copies it the the appropriate TWiki web (directory), and executes a check-in. The version information is tracked correctly, but I don't think the
WebChanges and
WebStatistics are updated.
The check-in portion of the script looks something like this:
#!/bin/ksh
## change to report directory
cd /opt/customer/reports
## cycle through files, copy to TWiki, and check in...
for FILE in *.txt ## sample filename: brazil.ApplicationIni.txt
do
WEB=${FILE%%.*} ## extracts machine (web) name
TOPIC=${FILE#*.} ## trims off machine name
cp $FILE /opt/TWiki/data/${WEB}/${TOPIC}
/usr/local/bin/ci -q -l -m"Automated Update" -t-none -w$(whoami) /opt/TWiki/data/${WEB}/${TOPIC}
done
Hope this helps!
--
BearLimvere - 02 Apr 2002
.