Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A script to convert an iWeb site into a template Apps
I created this Python script to automatically convert a site in iWeb into a template, and install it in the iWeb application. The following description is taken from the comments at the top of the script:
This script will convert an iWeb site into an iWeb template and install it. The usage is fairly simple. Just create a site in iWeb with the name that you want the template to have. The site should should have each of the standard pages (i.e. About Me, Welcome, Photos, etc.). Once you have a site that looks the way you want, open the Terminal application and run:
  site2template site-name
where site-name is the name of the site you want to convert to a template.
The only thing you have to do manually is create the thumbnails. Read the comments at the top of the script for more information.

[robg adds: I haven't tested this one. You'll want to save the script without the .txt extension, and remember to make it executable with chmod a+x site2template.]
    •    
  • Currently 1.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[24,289 views]  

A script to convert an iWeb site into a template | 11 comments | Create New Account
Click here to return to the 'A script to convert an iWeb site into a template' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to convert an iWeb site into a template
Authored by: colman on Mar 03, '06 09:28:48AM

Seems to work nicely. If you're too lazy you don't need to generate the thumbnails at all.



[ Reply to This | # ]
A script to convert an iWeb site into a template
Authored by: PCheese on Mar 04, '06 01:24:05AM

I recommend quitting iWeb and duplicating it before running this script or might have to reinstall it as I did. I'm not sure what went wrong; perhaps I shouldn't have named my new template "blog". Later, following the steps I just mentioned it worked beautifully (I named it something other than "blog" that time).



[ Reply to This | # ]
A script to convert an iWeb site into a template
Authored by: ephramz on Mar 05, '06 11:39:13AM
Ah, thank god! Or thank Kesmit for putting this together. This was a sorely lacking feature in iWeb, that should've been in v 1.0, but will hopefully be in 2.0.

Works quite well once I put a link to my iWeb installed in a non-standard place. The script assumes it is in /Applications so if in the terminal you do


cd /Applications
ln -s /whereever you have iWeb stored/iWeb.app .
it should run fine.

One thing that didn't quite work with the script, but I'm not sure how easy it would be to do, is in trying to create a dateless blog (since the blogs give much nicer picture shows, and the only apparent way to reveal the comments of iPhoto's images) I tried to make a blog template with the text in the date field of he entry deleted, turned to white, and completely transparent. After creating a template from this and then making a new page from it, it removed the date (or at least made it invisible) from the actually entry page, but it was still completely visible on the archive and main list page.

Thanks again Kesmit!

[ Reply to This | # ]

Please Please please please please HELP!
Authored by: olanro on Mar 06, '06 01:35:48PM

Im desesperated, I can't get this script to work correctly, could some one please put a step by step tutorial... Im sure im not the only one with this problem. When I finally could make the txt an executable unix file after googling for hours now when I Type in the terminal site2template OK (ok it's my site name) i get this "command not found" Please I would really appreciate any help guys IM totaly lost here. THANK'S!



[ Reply to This | # ]
Please Please please please please HELP!
Authored by: willg4pb on Mar 10, '06 08:56:56AM

I too would love to be able to use this script, but I am totally new to Python and terminal.

Any advice on how to run this script would be greatly appreciated.

Thanks
Will



[ Reply to This | # ]
Please Please please please please HELP!
Authored by: ephramz on Mar 13, '06 07:02:08AM
You should check a primer on using the Terminal/Unix in Mac OS X, but basically save the file to somewhere you can find easily, making sure it doesn't have the .txt extension. You can do a "Get info" in the finder and make sure "Hide extension" is unchecked to remove the .txt if it's there.

So say you save it in Applications, do the following in the terminal;


cd /Applications
chmod a+x site2template
./site2template OK
you probably need the "./" in front of the site2template since the terminal only searches certain places to find executables by default and whereever you saved it was not one of these directories. The "./" basically means "look in the directory I'm currently in"

Hope that helps.

[ Reply to This | # ]
Please Please please please please HELP!
Authored by: willg4pb on Mar 13, '06 07:33:57AM

Thanks for your help :)

Will



[ Reply to This | # ]
Assistance needed
Authored by: ono on May 31, '06 06:18:28AM

i followed the instructions and the terminal app worked fine. but now when i open
iWeb and try to create a new page no templates are recognized. it is just an empty
box. although i inspected the package and all the templates are visible (including
the ones i created called "custom") but aren't being recognized by iWeb.

any suggestions anyone?



[ Reply to This | # ]
Assistance needed
Authored by: ono on May 31, '06 06:52:09AM

i reinstalled the 1.1.1 update and all the original templates are no recognized. however, the custom templates are not.



[ Reply to This | # ]
terminal error
Authored by: wailet on Mar 20, '10 02:41:14AM

Can someone please help me with this?

I saved the python script without .txt
I made all the pages with Iweb
I ran terminal: cd /Applications
chmod a+x site2template
./site2template wailet

When I run the terminal I get the following lines:

./site2template: line 1: {rtf1ansiansicpg1252cocoartf1038cocoasubrtf250: command not found
./site2template: line 2: syntax error near unexpected token `}'
./site2template: line 2: `{\fonttbl\f0\fmodern\fcharset0 Courier;}'

What am I doing wrong?




[ Reply to This | # ]
doesn't work for me
Authored by: wailet on Mar 20, '10 03:39:32AM

I've tried to make this work but I keep running into problems.
When I run the script I get the following message:

/Applications/site2template ; exit;
/Applications/site2template: line 1: syntax error near unexpected token `('
/Applications/site2template: line 1: `Python 3.1.1 (r311:74543, Aug 24 2009, 18:44:04) '

Does anyone has any suggestions?



[ Reply to This | # ]