Notes on how to upload large HTML directories onto TWiki
This problem came about when I used MATLAB and Photoshop to create a web page with a large number of images which I was loathe to upload to TWiki one by one.
- Make a TWiki page which will act as the root html file. Example: RRLegCompliance
- In a text editor, open up the HTML code and do global replaces on the HTML links. Linked files will go into
%ATTACHURL%/
so prepend this in all of the internal links. Example:
<A href="%ATTACHURL%/pages/xx.html"><IMG src="%ATTACHURL%/thumbnails/xx.jpg" border="0" alt="xx"></A>
s:background="../images/background.jpg"::g
s:../index.html:../../../../bin/view/Main/RRLegCompliance:g
The SED script deletes the background image from each page and replaces the link to the root page with a link to the TWiki page.
- Use SFTP to upload the subdirectories onto BDML in the directory /home/httpd/twiki/pub/Main/PageName where PageName is the TWiki name of the page.
- Test out the links and fix anything you forgot to change...
--
JonathanKarpick - 21 Oct 2004