Reading captions/comments from single text file This is simple to do with the following scriptlet: Some people wonder if it is possible to have JAlbum insert the contents of a text file having the same base name as an image but with ".txt" extension, for example "hiking.jpg" will get text from "hiking.txt". Reading captions/comments from separate text files If (album.get("rootName") = null) album.put("rootName", title) Out.print((topLevel ? album.get("rootName") : dir.getName()) + "") The first goes into index.htt and the second into slide.htt: You might have an album with many nested folders (animals/mamals/cats.) In this case it helps a lot to haveĪll folder names displayed like this: animals » mamals » cats (being in the "cats" folder), with links to each parent folder.Ĭopy and paste the two scriptlets below for this effect. Put this script inside a slide.htt file for the Google effect. And this is the code that displays the converted value (example for a Canon PowerShot G1 camera having 4.857 as conversion factor).įor quick navigation between images, a list of numbered links might be preferred to just having Put these scripts into the slide.htt file of the skin you wish to use. After that, converting is simply a matter of multiplication and rounding the result. The follwing script takes care of that by stripping non-numeric parts of a value and converting the result Your camera manual (the factor varies between camera models), but in JAlbum the focalLength variable isĪ formatted string including "mm" at the end which can't take part in a multiplication. In theory, converting is just a matter of muliplying the focal length with a factor that you can get from Here are two scripts that does the conversion for you. Some users prefer to list the focal length of the camera ($focalLength) as its 35mm equivalent value. Put the script just after the body tag of a slide.htt file.Ĭonverting focal length to 35mm equivalent This script will make JAlbum look for these wav files and insert a BGSOUND tag if there is an annotation. The camera usually puts a wav file next to the image bearing the same base name as the image. Many digital cameras allow you to add voice annotations to images. (This is because $variables are expanded before scripts are being executed) There is one final thing to this: You will have to replace all occurances of $title with in thatįile too. If the mapping isn't present, JAlbum will revert to use the name of the directory instead. Inside the meta.properties file you simply put title = your alternative title to The following script can be put at the top of the index.htt skin templateįile in order to have JAlbum grabbing the title from a "meta.properties" text file that you put in the directory This works fine for one flat album, but if you have a deep hierarchy of directories, you will then end up Tab and set title = your alternative title as a user defined variable there. If you are not happy with JAlbum selecting the directory name as title for your albums, go to the "Advanced" The following simple adjustment to the "slide.htt" file will make sure that the "originalslide.htt" file gets processed if needed: The skin has an extra template file called "originalslide.htt". Take a look at the new "Smart" skin in the extras section that addresses this issue by some lines of BeanShell scripting. The downside of this is that the surroundings for the image doesn't match the skin (usually displayed on white background) and you have to use the back navigation button to return. When clicking on an image in a slide show, you may get to the original image, but it is not displayed in a html page of its own. (Lower case filenames are sometimes required when passing the files on to some UNIX systems) Put the follwing script in the top of the slide.htt file of the skin you are usingĪnd run the album generation twice in order to have the filenames of your images converted to lower case. Reading captions/comments from single text file.Reading captions/comments from separate text files.Converting focal length to 35mm equivalent.There is a tutorial that covers editing these files that you can check out first. Just copy and paste the examples below to the slide.htt and index.htt files of the skin you wish to enhance. If you don't have any programming ambitions, fine. Remenber that you can turn to the forum to get help and help others! They are the ones that are most commonly used. Then concentrate on the "java.lang", "java.util" and "java.io" packages. To better understand the examples and to assist in the writing of your own scripts I strongly recommend that you first read the creating skins section, then bookmark the basic Java API from Sun and use it to Of the huge library of ready-made java classes that Sun has provided for free and are directly accessible. This section will show examples on how scripts can enhance your album in really cool ways.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |