Thursday, August 16, 2007

iWeb and umlaut characters

My partner created a web-site with iWeb 2.0 for our son.
Because we don't need the .Mac features we decided to publish the website to a shared-hosting provider.
Unfortunately the provider has a FTP-Filename restriction: there are only alpha-numeric filenames (and '-','_') allowed. iWeb however creates file and folder names with german umlaut, exclamation marks and other unwanted characters.
I have decided to write a little command line utility wich translates the whole iWeb-Site to match the provider
constraints.
After a few hours of code-writing the tool has the following features:
  1. Rename files and directory to match the alpha-numeric rules.

  2. Replace the old filenames in the content of files with type *.html, *.js, *.xml with the new filenames (e.g links, javascript)

  3. Gather MD5 checksum and modified-date for every file. This information is stored in a file named iWebTranslator.config in
    the parent directory.

  4. Backup modifed-date for every file with the same MD5-checksum as before ( this is useful for a FTP-transfer
    to only transfer modified dates).


Example:

iWeb Site Name: TestSite
iWeb Publish Folder: /PATH/TO/Sites

Steps to Publish Site:
  1. Delete the folder /PATH/TO/Sites/TestSite if it already exists.
  2. Publish Site to Folder /PATH/TO/Sites within iWeb.
  3. Run iWebTranslator via Terminal: java -jar iWebTranslator.jar /PATH/TO/Sites/TestSite
  4. Upload Folder via FTP (e.g. via Transmit Synchronization/Mirror method).

The Application can be downloaded at: Download HERE

23 comments:

Anonymous said...

Dude, you're the man! I've had so much problems with this. Very sad to see that apple would release something with such a vital fetaure as åäö-translation missing.

Anonymous said...

found a error:

Exception in thread "main" java.io.FileNotFoundException: /Webseite/Website/
at com.sschoenb.iWebTranslator.Translator.translate(Translator.java:34)
at com.sschoenb.iWebTranslator.TranslatorApp.main(TranslatorApp.java:19)
tim-afkens-computer:~/desktop timafken$


'?????????

stefan said...

Hi tim,
it seams that you dont provide the correct path as cmd line argument. I think the correct terminal command for you might be: java -jar iWebTranslator.jar /Webseite/Website

Anonymous said...

There is a problem with *.mov Files. Maybe you can fix that?

Anonymous said...

Stefan,

THANK YOU! you saved me tons of headaches. The tool works as described.

TIP: The path to the directory should be inspected with the "Information" option of that directory in the Finder. In my (german) mac the directory reads "Web-Sites", however Information says "Sites" (must be an alias).

My admiration - Mike

Anonymous said...

Thank you - but I can't start the program (I'm an absolutely beginner and don't know Java etc.)
I get the error-message - Unable to access jarfile iWebTranslator.jar
Maybe someone can help
intorgus@web.de

Anonymous said...

okay - I solved the problem! :-)

Anonymous said...

Your wonderfull program solve only a part of my problem, because I have also a site in russian.
Maybe you can send me the source-code of your program, so I can try to make it for cyrillic letters also.

Anonymous said...

Hi Gebby,

I am facing the same problem you did. Would you be so kind and share the solution?


frau

stefan said...

i'm currently working on a solution that supports a custom charset mapping. This solves the cyrililic to latin mapping. this new version will be tested by gebbi (maybe at the moment).
i will publish this new version as soon as possible.
if someone is interrested in: i'm working on a gui for iwebtranslator too.

dLux said...

Hi Stefan,

It seems that your software somehow removes the blog-archive.xml, the blog-main.xml and the rss.xml, or at least fails to save it somehow.

Besides this, it seems to be working, but it makes that quite unusable...

Do you have any idea why it does it?

dLux said...

It removes a few other files as well. One html file is also disappeared which did not contain any accented characters...

stefan said...

Hi dLux,

I can't reproduce this.
Can you please provide me
more information:
Which version have you used.
iWebTranslator.sh or iWebTranslatorGUI.app ?
If you use iWebTranslator.sh try to execute it with the -verbose flag and pipe the output to a file.
e.g. iWebTranslator.sh -verbose PATH/TO/FOLDER > log.txt
.You can mail me the log.

dLux said...

Hi Stefan,

I don't know your email address. Please drop me an email to dlux@dlux.hu.

I can send the whole site to you for testing. For me the log seems to be very normal.

Anonymous said...

Stefan,
amazing! Thanks a lot for your wonderful application. It solved not only my "Einträge" problem but also the annoying FTP synchronization problem with the file modify dates - very cool!!! Used the new GUI and it worked just fine. Nochmals tausend Dank!
Sebastian

Anonymous said...

GREAAAT .. ;-) ... thx ... in Swissgerman exist's many äöü

great tool

Kind Regards
Alex

Anonymous said...

Thank you thank you thank you! What a nice little app. You saved my day! And since you provided the new GUI I did not have to do all the voodoo tricks with the terminal. Keep up the good work!

Joerg, Germany

Anonymous said...

downloadlink is broken...
:-(
please email me at
martinn at comhem dot se

Anonymous said...

A wonderful little program. It solved the notorious "Einträge" problem in my iWeb blog. (The Apple developpers should be tared and feathered for this!). Thanks for GUI version, as I'm not familiar with java.

Anonymous said...

It works great, except for my Quicktime movies. Neither prompt will play them. I just get a error page with the following

Not Found

The requested URL /our_work____•_files/Web offload - Plan Comm_1.mov was not found on this server

Any ideas?

Thanks so much - it's a great app.

-Patrick

Anonymous said...

Hi Stefan,

this App is really nice. I was about to give up with iWeb and tried some other programs, like Sandvox, RapidWeaver and Goldfish, but none of these was exactely as useful as iWeb to me.
So at last I found your tool which really helped me. So, many many thanks!

Sebastian

Mani said...

A good info that i have never heard
thanks keep posting more like these...
Chennai-Coimbatore

Bala said...

Great info thanks for sharing


Data entry Operator