Copyright (c) 2013, Jocelyn Granger
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of Jocelyn Granger nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This is the first version of a tool called "Make_Web_Page_From_Images". This tool creates a web page from images. In later versions, I'll improve the user interface and add new features.
SYSTEM REQUIREMENTS:
The tool runs only on a Mac, because the tool uses AppleScript. You need Apple's web browser Safari installed on your Mac, because the AppleScripts send messages to Safari.
TO INSTALL OR UNINSTALL THE TOOL:
Put the un-zipped folder Make_Web_Page_From_Images into /Applications. To uninstall the tool, delete the folder /Applications/Make_Web_Page_From_Images/.
TO USE THE TOOL:
First, open /Applications/Make_Web_Page_From_Images/Web_Page_Files/.
In the web page that you're creating, you will include images and possibly sound files. You won't want to use the image and sound files from a previous project. So in the "Pictures" and "Sounds" folders, remove any files that you don't want to use.
Copy your images (.jpg, .jpeg, .gif or .png) into the Pictures folder.
If you want to create sound files from the images, double-click on Create_Sound_Files_From_Picture_Files. (That AppleScript looks at the file names in the Pictures folder. For each .jpg, .jpeg, .gif or .png file in the Pictures folder, if a corresponding file in the Sounds folder does not already exist, then the AppleScript creates a sound file in the Sounds folder. For example, if "Dog.jpg" is in the Pictures folder, then the AppleScript creates a sound file called "Dog.aiff", and puts Dog.aiff into the Sounds folder. If you play Dog.aiff, the sound will be someone saying the word "Dog".)
Now open /Applications/Make_Web_Page_From_Images/. (This is the folder that contains the currently-open folder.)
Double-click on the "Double_Click_Me_to_Start" icon. A web page titled "Create a Web Page" will open. (If Safari preferences are set up to create a new web page when Safari is launched, then that web page will appear also. Close that other web page.)
Step 1 on the "Create a Web Page" web page tells you to copy your images into the Pictures folder. You just did that, so you can ignore that instruction. (In a later version of this tool, I'll add the ability to create the sound files from this web page.)
In Step 2, you if you check the "Make Sounds" checkbox, then in the resulting web page, if you click on an icon, you will hear the sound that corresponds to the image. For example, if a picture of a dog with the label "Dog" appears on the resulting web page, then you will hear someone say "Dog".
In Step 3, click the "Create Web Page" button.
Now go back to the "Web Page Files" folder, which you looked at earlier. That folder will contain a file called "index.html" which was created just a few seconds ago. Display that web page. It will contain the images in the Pictures folder. The label beneath each image is the name of the image file, without the extension. For example, below the "Dog.jpg" image, you will see the label "Dog". If you created sound files and clicked the "Make Sounds" checkbox, then when you click an image in the web page, you will hear the corresponding sound.
Now you're done creating the web page.
To save the web page somewhere, copy all files and folders (except Create_Sound_Files_From_Picture_Files) from the "Web Page Files" folder. Copy those items into wherever you want to put your web page. Then empty out the Pictures and Sounds folders, so that they are ready for the next time that you want to use the tool.
Close the Safari web page titled "Create a Web Page".
Each time you create a new web page, you need to double-click on the "Double_Click_Me_to_Start" icon. Double-clicking this icon starts an AppleScript called "controller, and displays the "Create a Web Page" web page. In a later version of the tool, you'll be able to create more web pages, without starting over for each web page that you create.