WebExport 1.0: Comments

This is the comment thread for WebExport 1.0, including all releases.

42 Responses to “WebExport 1.0: Comments”

  1. Td Says:

    Hi,
    First I had to say "Bravo", cause WE is the best iPhoto plugin to export pictures the way we want them to be.
    But as I always want to do my best, I've got some questions to improve my template.
    I want my template to be an HTML table with 5.3 cells by gallery page. I managed to add the td tags, but I didn't the way to add the \tr tr tags every 5 pictures. So is there a tag in cell i can use it for, or what is the exact syntax for the if tag used with p_index as string to compare to a multiply of 5 - didn't work - I'm know there is the prev and the next function to change the gallery or the photo page. But is there a function which gives the link to all the gallry pages using their number as label? or is there as the if tag a for tag so I can make it myself in my template.
    Last question I'd lyke my pictures pages to have tiny thumbs of the prev and the net picts. How I'm supposed to call the image function?
    I've also noticed a few strange things. First if my pictures has keywords in Iphoto, webexport shows some errors of linking. In the documentation you use has_prev and has_next but they don't work I had to use others found in another template.
    Final Point, can you always set the picture author to a space or the gallery author, because it shows up some errors which are not important when not using the autor tag and it will be easier when making a gallery of 30 pictures with the same author.
    Thanks
    PS I m using a macmini G4 with tiger - las update- and iPhoto 5.x

  2. Daniel Staudigel Says:

    I'll answer your question in a few parts, since I only have small chunks of time.
    The first thing is that in "i" defines the photo you are currently on, and "r" is a list of all photos that will be processed by cells. So, if you have an statement, this condition will evaluate to true only on the first image of a row:
    ((i-r[0])%3==0) and on the last of a row: ((i-r[0])%3==2). You will run into problems if there is an non-even (in this case, multiple of 3) number of photos, because then the last-of-last-row won't be executed.

    In general, tables are deprecated (there used to be a table() command in CHTML), so my first suggestion is to use CSS, which is much more flexible and cool. Take a look at Compact.weTemplate (in the templates page), it will show you how to make a CSS "table" that has fixed number of columns.

    If popular support wants it, I may think about implementing a equivalent to but for producing tables. I much prefer CSS, though.

    The other questions, which appear to be potential bugs, I'll get to those later today, when I have some time with my compiler.

    Thanks for the comments!

  3. Td Says:

    Thanks for your answer, I will try to use CSS table, hope i just need some practice.
    About the photo with keywords not working I was wrong, in fact the issue comes from the way picture are organised and where they are picked up to be exported. Those limking errors only appears when the picts are taken from the whole library or from smart albums, if they are called so in English, - purple icon- but there is no error when getting from a usual album -blue icon-, actually.
    Hope it's help.

  4. Daniel Staudigel Says:

    Allright, let me know if I\'ve misunderstood your questions. With respect to the CSS/HTML stuff, there are some awesome tutorials on how to make photo galleries with CSS, search for \"float tutorial\" on Google.

    There is a function which returns a link to a gallery, given an index: gallery_link(i), where i is the gallery you want a link to. The variable \"gallery\" also points towards the current gallery.

    With respect to the image() command (this is in the advanced docs too), the command structure is like this:

    image(maxw,maxh,location=\"\",style=\"nice\",i=p_index):

    Where style should usually be \"nice\" unless you want to fill in maxw and maxh (clip the image to size), and i is the index of the photo you want. So, giving p_index-1 or p_index+1 would give you the next and previous images. The current version of image() DOES NOT LOOP. If you do negative numbers or above p_count, it will probably generate a weird error. This will get fixed in the next version (along with the annoying META errors), for now use conditional blocks, which you should anyway, with next and prev buttons. Or do something like (p_index+1)%p_count, to guarantee it\'s within the specified range.

    I could not replicate your linking error with smart/regular albums… You will have to tell me more specifically what is happening.

  5. Td Says:

    Well, I downloaded the last version of WE, and I'm still experimenting the same issue while exporting my Pictures. Here is the log returned by the plugin (a bit different from the former - without the Meta errors and maybe the numbers of line - ):
    Linking Error (closeup.html,CIMG2470.html)
    Linking Error (closeup.html,CIMG2471.html)
    Linking Error (closeup.html,CIMG2472.html)
    Linking Error (closeup.html,CIMG2473.html)
    Linking Error (closeup.html,CIMG2474.html)
    Traceback (most recent call last):
    File "/Applications/iPhoto.app/Contents/PlugIns/WebExport.iPhotoExporter/Contents/Resources/exporter.py", line 405, in ?
    exec("\n"+command.strip(" \n\t\r")+"\n")
    File "", line 2, in ?
    File "/Applications/iPhoto.app/Contents/PlugIns/WebExport.iPhotoExporter/Contents/Resources/exporter.py", line 378, in gen_galleries
    processFile(gallery,property('galleryFile'));
    File "/Applications/iPhoto.app/Contents/PlugIns/WebExport.iPhotoExporter/Contents/Resources/exporter.py", line 323, in processFile
    return process_file(dest,source)
    File "/Applications/iPhoto.app/Contents/PlugIns/WebExport.iPhotoExporter/Contents/Resources/exporter.py", line 327, in process_file
    writeutf8(dest,process(readutf8(source)))
    File "/Applications/iPhoto.app/Contents/PlugIns/WebExport.iPhotoExporter/Contents/Resources/exporter.py", line 317, in process
    code = code[:m.start()] + processEval(m.group(1)) + code[m.end():]
    File "/Applications/iPhoto.app/Contents/PlugIns/WebExport.iPhotoExporter/Contents/Resources/exporter.py", line 279, in processEval
    return str(s)
    UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in position 7: ordinal not in range(128)

    Thanks for the idea of the CSS table, they are harder to create the first time but much esaier after and more pretty.
    Your answer about the p_index is exactly the one I was waiting for, because I was wondering about the -1 and p_count value.
    The gallery_link function is interresting but you need to know wwhich page and the number of page, can it work with another cells block?

  6. Daniel Staudigel Says:

    Allright, I think I fixed the '"ascii' codec can't encode character…." error with v. 1.0r19. It's up, very small changes that make so it encodes everything with Unicode, which it should, instead of ascii, which it was. It should be more compatible.

    "Linking Error" is sort of a blanket error… which (after looking at my code) means it's an block error. I'll add in a new error message for that, and post the new version. At the end of this, we may be a little higher than 1.0r19…

  7. Daniel Staudigel Says:

    The gallery_link function is not usually used by templates, use the variable "gallery" (< ?gallery?>), which returns a direct link to the current gallery. You can get the current gallery index with g_index, and the total number of galleries with g_count.

  8. Td Says:

    Allright, be waiting for a next release :-D

    What I meant about the gallery link is that you can have in yout pages two kinds of links to a gallery page (prev or next) but I would like to have a few links like this:
    "Gallery Pages: 1 - 2 - 3 - …" and each numbers link to indexn.html where n is the number minus 1. I don't really know .py script but If it's possible (and allowed) to change the script, I may try to make a function to explain more precisely what I'm looking for.

  9. Td Says:

    I did the test with all the templates you provided especially the Compact one. Sorry not to have posted one comment, I did'nt noticed your mail.

  10. Td Says:

    I saw a part of your code so I wrote this which provides no error but also nothing is shown whle using return or print:
    1"
    else:
    if (g_index == i):
    ret += " - " + str(i+1)
    else:
    ret += " - " + str(i+1) + ""
    ?>

  11. Daniel Staudigel Says:

    Hmm, I can't really read what you wrote, because WordPress is mangling it. I am looking into fixes for this, but for now, email me a copy of the code you are trying to use, and see if my link (to a gallery.html) is of any use.

  12. Jase Says:

    Fantastic! exactly what I was looking for :)
    Photocasting without dot mac!
    Great tool - thanks for the effort.

  13. JimB Says:

    Nice software but I've having a bit of trouble with iPhoto 5 on 10.3.9 (I'm using WebExport 1.0r107). I seem to be able to use WebExport once and then trying to do an Export from the Share menu just fails, no Export window is displayed. I think it's something to do with the templates because deleting the template that i used previously displays the Export window correctly. There are some debugging messages written to the console, not sure whether they'll help or not: -

    2006-09-02 21:54:52.990 iPhoto[16072] *** -[NSTextField setAllowsMultipleSelection:]: selector not recognized

    2006-09-02 21:55:27.056 iPhoto[16072] Hello

    2006-09-02 21:55:27.119 iPhoto[16072] *** -[NSPopUpButton selectItemWithTag:]: selector not recognized

    2006-09-02 21:55:27.125 iPhoto[16072] *** -[NSPopUpButton selectItemWithTag:]: selector not recognized

    Thanks again

  14. Chris Says:

    Daniel:

    Thank you for providing this great tool. I'm not that smart when it comes to programming but I found two other viewers like SimpleViewer. One is called PostcardViewer and the other AutoViewer. Can you or someone else create WebExport template's for these. I assume that it would be relativley quick work for someone who knows what they doing. As a last resort, how would I go about creating a template from these. The CREATE TEMPLATE link on the WebExport instructions is dead.

    Thank you.

  15. Daniel Staudigel Says:

    JimB: The error messages you put there do not make sense… I'll check 10.3.9, but it should have selectItemWithTag:, if you could, figure out which of those are for the first export and which are for the second. This probably has something to do with 10.3 compatability, because it works fine on my machine. I'll poke around for the NIB compatability, but could you post/send the templates you have and are using?

    Chris: An autoviewer template is posted under webexport/templates (3rd "page" link), and you should have no problem converting it over to PostcardViewer. It involves no programming whatsoever (not even HTML, just a tiny bit of XML), and it should be pretty clear how to do it if you download his example PostcardViewer, and look at the auto/simple viewers. What CREATE TEMPLATE link are you referring to? The documentation links from the main page work, and I think all of the links in those work…

  16. JimB Says:

    Hi,

    Thanks for the quick feedback.

    I'm just using the templates from your website and the ones that come in the WebExport. I was just checking to see what they all look like.

    Starting iPhoto again and using WebExport yields the following,

    Startup,

    2006-09-03 20:39:07.921 iPhoto[22286] *** -[NSTextField setAllowsMultipleSelection:]: selector not recognized

    1st Export,

    2006-09-03 20:40:00.081 iPhoto[22286] Hello
    2006-09-03 20:42:44.046 iPhoto[22286] ()

    2nd Export (this fails to display the Export window),

    2006-09-03 20:44:49.355 iPhoto[22286] Hello
    2006-09-03 20:44:49.448 iPhoto[22286] *** -[NSPopUpButton selectItemWithTag:]: selector not recognized
    2006-09-03 20:44:49.453 iPhoto[22286] *** -[NSPopUpButton selectItemWithTag:]: selector not recognized

    Thanks

  17. Daniel Staudigel Says:

    I think I've fixed the line, give WebExport 1.0r109 a try. If it works (poke around, make sure nothing is wonky, it works fine on my system), I'll post it on the main page.

  18. Td Says:

    I'm experimenting a new and very strange issue with WE1.0r107 and 109. There is one (I didn't manage to do it with another one) picture that makes iPhoto crash the last message I see in the WE tab is Standard Export running . Below is the crash log report made by MacOS.
    I've also seen something weird, sometimes, the Template selecter show no template but
    something like this is automaticly cleared, then I have to change the exporter tab and get back to WebExport and my templates are listed.
    Last point can we print the exif datas in the web pages?
    Thanks

    P.S.: this crash occurs with all the templates. the template used for the report is Compact

    [CLIP: there was a large error dump here, I can provide it to people who are interested, but it made the page pretty long]

  19. Td Says:

    Oups didn't imagine it would be so long
    Sorry

  20. JimB Says:

    The new version seems to work fine. I've managed to do exports without having to exit iPhoto or delete any template.

    Thanks very much!!

  21. Daniel Staudigel Says:

    Td: Could you send me the image that causes this? I can't reproduce it, and the error dump (that I clipped) helps, but it would be best to have the image that causes it.

    Also, I have been looking into exif tags for a while, but never bothered because there was no demand for it. I'll see if I can squeeze it into the next version.

    I think I know what causes the "This will be cleared" pop-up, and was wondering what version of iPhoto/MacOSX you are running (I assume it's WE 1.0r107 or 109?

  22. Daniel Staudigel Says:

    Td: The problem is that the filename has non-ascii characters in it. WebExport assumes filenames are in ASCII, and everything else is UTF-8. So, if you use a template that uses iso-8859-1, instead of UTF-8, and you have non-ascii characters in it, it will display them wrong (WebExport writes UTF-8, browser expects ISO-8859-1), and I will have to fix this. The solution now is to make sure all of the templates you use (if you use international characters), are set up as UTF-8, and not ISO. Also, for now you can't use non-ascii characters in filenames. I will be working on fixing this in the coming weeks, but I am not very experienced with python's international solutions.

  23. Td Says:

    Maybe the best solution is to remove those characters from the filename when exported. So a word with such characters like "Espérant", "même" or "août" will be transformed into "esprant", "mme" and "aot" instead of something better but harder to programm "esperant", "meme" and "aout".

  24. dave Says:

    Hey Dan,
    used the WordPress template. Everything seemed to work fine, but after uploading to my site, getting error below when trying to view the page/s. Is it because I'm not using the default theme, but WP3Column Kubrick? Also, because of something screwy in iPhoto, I now can't recreate the gallery or anything because the export function is completely not working in iPhoto (no export window)!

    iPhoto 5.0.4, OS10.3.9

    Fatal error: Call to undefined function: wp() in /home/…/blog/galleries/…/index.php on line 5

  25. dave Says:

    and, if it helps, the first couple of lines there look like this…

    ?php

    require_once('../../wp-config.php');
    wp();
    gzip_compression();

    get_header();
    ?

  26. Daniel Staudigel Says:

    dave: two things, first make sure you're using 1.0r109 (posted earlier in this thread), because if fixes the no-restart problem in 10.3.9 (i use 10.4.7, so it's hard to debug panther problems). Also, wp() is a central call to WordPress, and so it as to find it. It is defined in wp-config.php, make sure you have your paths set up (in the website attributes) to point to the folder that contains all of that. I use ../../ because it's pretty standard for small-fry blogs, but for yours, which appears much larger than, for example, mine, you will need a more complex path. Basically, make it a relative path from wherever your photo gallery is to the root directory of WP (or, if you know your server structure, it can be an absolute one). If you need more help, I'm going to need a little more information about your server's directory structure.

  27. dave Says:

    Daniel:
    I'm using 1.0r109 now, and I thought my path setup should have been the same…
    Wordpress is installed in earleyedition.com/blog, and the gallery is in /blog/galleries/folder, so thought it would be the same ../../ path. I'll give it another go with just a few photos tomorrow and see how it turns out.

  28. varkgirl Says:

    Have you thought about incorporating any of these templates?

    http://www.futureofmemories.com/templates/index.html

  29. dave Says:

    Hey Dan,

    I upgraded to WordPress 2.0.4 (from 1.5.2) over a week ago and just remembered my gallery today. I checked it out again to see if the upgrade changed anything. It did! Gallery now working fine, it seems…

  30. Daniel Staudigel Says:

    Excellent. Glad to hear it. I'll make sure to remember that it doesn't work with 1.5.2 (at least with the template I provide).

  31. varkgirl Says:

    I can't get the new update to "take" - no WebExport option in my iPhoto Export pane anymore.

  32. Daniel Staudigel Says:

    That is very weird… are you not running 10.4? Compatability-wise, it shouldn't have made a difference, I added literally one line, and that was in the Template Installer. Try removing it from the iPhoto bundle manually and reinstalling. Of that doesn't work, you can still access the old binary 1.0r109 by typing it into the URL.

  33. varkgirl Says:

    I have 10.4.7

    I removed the old one manually and still couldn't get the new one to work. It still kept saying "Update" when I installd.

  34. varkgirl Says:

    Working now :)

  35. varkgirl Says:

    Sorry to keep leaving comments…

    I got it to install now, but when I run Autoviewer template, I get this error:

    Traceback (most recent call last):

    File "/Applications/iPhoto.app/Contents/PlugIns/WebExport.iPhotoExporter/Contents/Resources/exporter.py", line 434, in ?
    exec("\n"+command.strip(" \n\t\r")+"\n")
    File "", line 2, in ?
    File "/Applications/iPhoto.app/Contents/PlugIns/WebExport.iPhotoExporter/Contents/Resources/exporter.py", line 342, in process_file
    codecName = re.search("",contents).group(1)
    AttributeError: 'NoneType' object has no attribute 'group'

    Haven't tried any others yet.

  36. Daniel Staudigel Says:

    Oops. It's fixed. I forgot XML files don't have the same meta syntax that HTML files do. Download it again, and reinstall. That should be fixed.

  37. varkgirl Says:

    Perfect, thanks!!!

    Will you be adding any new templates?

    How about from http://www.futureofmemories.com/templates/index.html? ;)

  38. Manu Says:

    Hello, i have got a problem with the archive of webexport.
    I can't launch the pkg.
    Any help ?

    Thanks

    Manu

  39. Daniel Staudigel Says:

    Please describe some of your system specs, OS version, etc. Also, try re-downloading the archive, tell me which version you are using, and of course, try rebooting your computer.

    With more specifics, I'll able to help you in a more detailed way.

  40. Mike Says:

    Hi Daniel,

    I installed version r124, and I am still getting the same blockiness behavior I mentioned in the obsolete thread. I will e-mail you some sample files.

  41. Daniel Staudigel Says:

    Just fixed the problem in r132, and you can download that anytime you want.

  42. Daniel Staudigel Says:

    This thread has outgrown its usefulness, I am closing it and opening a new "General" thread, and a version specific comment thread.