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

An AppleScript to manage multiple unrelated iWeb sites Apps
I have created an AppleScript to manage unrelated iWeb sites (projects). When I say unrelated, I mean that you may want to create more than one site on different host servers, or even the same host, all of which have nothing to do with each other. iWeb does not allow you to manage unrelated web sites -- it will also Publish/Export all of them at the same time if you have edits in more than one of them. This is slow, and silly.

This AppleScript allows you to manage as many unrelated sites as you want. It will give you a choice of switching from the current site project to another, or letting you create a new site project. It will also check if you have a real iWeb folder in your user's Library/Application Support folder while doing all of this. If you do, it will give you a choice to either name and move the site project to the iWeb_Projects folder (which must be in your user's Documents folder) or move it to the trash, before it continues. It will also deal with spaces in folder names when running the shell part of the script.

It works by creating a symbolic link for an iWeb Projects sub-folder. This iWeb Projects folder will be held in a folder named for the project, which in turn is stored in your user's Documents/iWeb_Projects folder. Make sure you create the iWeb_Projects folder before you run the script, or you will get errors.

You can then publish your site in the normal way with iWeb. One thing to note: iWeb creates an index file which will always point to the site you just published. So if you published to .Mac, your URL would be:
  http://web.mac.com/username/iWeb/
This would then go to the last site published. All you have to the to get to any other sites on .Mac is to add the site name to the end of the URL:
  http://web.mac.com/username/iWeb/Mysite
Good luck, and as usual, I have tested as much as I can ... but remember to make a backup first, and test to make sure it all works for you. Use of this script is at your own risk.

[robg adds: I haven't tested this, beyond making sure the code compiled properly in Script Editor. Please heed the backup advice if you're going to try this one!]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[14,339 views]  

An AppleScript to manage multiple unrelated iWeb sites | 9 comments | Create New Account
Click here to return to the 'An AppleScript to manage multiple unrelated iWeb sites' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript to manage multiple unrelated iWeb sites
Authored by: skirtley on Feb 02, '06 03:08:14PM

I am sorry, but I have not been able to get it to work. I am not familiar to Apple Script, but I do know programming.

I created a folder under Documents called iWeb_Projects. (My Home Directory is a Vault).

I pasted the contents of the txt file into script editor. When I run the script it asks to Swap Projects or Create a New one. It will Then close iWeb if it is open and do nothing. I do notice that the Result in Script Editor says "Enter Name for Project". There is no place to type.

Please provide some assistance. I originally posted the Symbolic Link hint. But I would like to have to option to manage multiple iWeb Domain.Sites.

thanks



[ Reply to This | # ]
An AppleScript to manage multiple unrelated iWeb sites
Authored by: skirtley on Feb 02, '06 03:21:59PM
I changed "on Error" to represent the following.
on error error_message
set New_dilog to error_message
end try
It looks like this was being triggered. I now get the following error message.
"Can't make «class cfol» \"iWeb_Projects\" of «class cfol» \"steve:Documents:\" of application \"Finder\" into type alias."


[ Reply to This | # ]
An AppleScript to manage multiple unrelated iWeb sites
Authored by: mark hunte on Feb 02, '06 05:44:10PM

First, that error handler is important as it was, its used to reset that variable.
Make sure you change it back.

I have not tried the script from a File Vault, but have heard that they can course problems.

Have you tried the script as a different use, without file vault.

---
mh



[ Reply to This | # ]
An AppleScript to manage multiple unrelated iWeb sites
Authored by: mark hunte on Feb 02, '06 05:59:07PM

Ah, realised whats going on.

when i was testing i already had the "iWeb_Projects" folder filled with some projects.

If on the first time you run the script and select swap, there is nothing in the
"iWeb_Projects" folder to swap with. So it errors out.

To get started, select to create a New project first rather than swap.

I will fix this. by telling it to tell you there is nothing to swap to so make a new project first.

But you should be ok from then on Fingers crossed.

remember to change the error handler Back.




---
mh



[ Reply to This | # ]
An AppleScript to manage multiple unrelated iWeb sites
Authored by: mark hunte on Feb 02, '06 07:11:36PM

Ok this that is fixed.

heres the link to the new version

http://uk.geocities.com/markosx@btinternet.com/scripts/iweb_sites_scpt.txt

---
mh



[ Reply to This | # ]
An AppleScript to manage multiple unrelated iWeb sites
Authored by: skirtley on Feb 02, '06 07:15:32PM

I tried a 'test' account with file vault turned off. I created a iWeb_Projects, and it worked as expected. I will try the new script to see if there is any change.

Sorry to have modified your code before. I was just trying to debug where my problem was. Old habits.



[ Reply to This | # ]
An AppleScript to manage multiple unrelated iWeb sites
Authored by: mark hunte on Feb 03, '06 02:21:03AM

OK I will see what I can do for file Vault users.

Also thanks for making me look at the code again, and spot a small issue.

By the way you can change the code as much as you like, My concern
was, that part of the script need to be as is...

will carry on talking over email RE: file vault users. and post the results back here...
If anyone else spots anything else please let me know.

Thanks

---
mh



[ Reply to This | # ]
HELP! I think a made a BIG mistake!
Authored by: muzak75 on May 17, '06 04:23:11AM

I originally had two sites on iWeb that I was working on. I ran the script after making a new iWeb_Projects folder in the appropriate place. I noticed a file got trashed when the script was run. It asked if I wanted to create a new project. I said yes and named it "Test". From then on, when I opened iWeb, there were no sites except a blank one waiting for me to select the first page.

LATER, I found out that it is the "Domain" file in my ~/Library/Application Support/iWeb folder that holds the info for the sites I was working on. Obviously the script overwrote that one and made a new one. Is there ANY way to get this back to it's original state (some kind of an undo or something?). I didn't erase the trash, but none of the files in the trash have an actual "Domain" file. They are all aliases to the new "Domain" file.

Am I screwed?



[ Reply to This | # ]
An AppleScript to manage multiple unrelated iWeb sites
Authored by: markspencer on Apr 23, '06 09:41:44PM

I just installed and ran the script, and found that the script works as promised. Thanks so much for creating it, just what I needed as I am using iWeb for one site to my .mac and one for my own hosted url. Great little solution!



[ Reply to This | # ]