For an explanation of what Html2Slideshow is, please read the text
of the Html2Slideshow-Homepage on http://www.uplawski.de/html2slideshow/html2slideshow_en.html.
(German version: http://www.uplawski.de/html2slideshow/).
In the document, you are currently reading, I describe, how the
graphical Ruby/GTK2-surface for the
Html2Slideshow-program is used. Orange-shaded thumbnails in the text
below, are links to larger versions of screenshots.
If you want to use Html2Slideshow on the command-line of a Unix-shell
or in the Windows-command-interpreter (DOS
), instead, the
argument -h or --help will print the following usage-information:
| Usage: ruby html2slideshow.rb [options] or html2slideshow [options] | |
| Specific options: | |
| -d, --debug[true|FALSE] | Switch on debug-mode. Will generate log-messages during processing |
| -l, --local | Collect the image-files from the source-directory (if not provided, HTML-files are analyzed) |
| -r, --recursive | When collecting image-files from the source-directory, also include the sub-directories. |
| -s, --source SOURCE DIR | Read HTML source-files from this directory |
| -t, --target [TARGET DIR] | Write slideshow-files to this sub-directory (if not provided, SOURCE DIR is used) |
| Common options: | |
| -h, --help | Show this message |
| --version | Show version |
The GUI in generalYou need the Ruby-Gnome2 bindings (download from Sourceforge). Without them, you will not be able to use HTML2Slideshow over the graphical user interface and have to stick with the command-line.
If you are tied to Windows™ you depend on the command-line, anyway. But believe me, that is not a bad choice and you do not need to know more than those options, above.
The generator and its GUI exist, thus, well separately from each other to allow different uses of the program. While html2slideshow.rb is the main Ruby-script, that can be used on the command-line, html2slideshowGui.rb contains the definition of the GTK-dialog, explained below.
You may know already how to start a Ruby-application, but just for completeness, do it like this:
$>ruby html2slideshowGui.rb
Some options are only accessible from the GUI:
These mentioned features are explained further below.
The user-interface consists of a selection of tab-cards, but for
the most general task of creating slideshow-files from original
(X)HTML-sources, the first tab, labelled General Options
offers all the functionality you need.
Language-settingI have included an easy way to adapt the GUI to languages other than English. The current release contains reliable translations to German and French. I will explain first, how you enable these two language-versions, then how you can enable the program to use additional languages.
Usually, you want the messages, captions and other text which appears on the surface, to be written in the language, that your operating system is already configured to use. Unfortunately, this setting is found at different places, depending on your current operating system. Under Linux Html2Slideshow is able to find the system-wide setting in the environment-variable LANG and will use it by default. So, if you are using Linux and want the program to speak to you in either German or French, no changes should be necessary.
Should you want to actively change the language of Html2Slideshow and know, that the program supports the new language, there is yet another, easy way to enforce that change. Go to the folder, where Html2Slideshow resides and create a new text-file LANG (without file-extension), if it does not accidentally exist already. The contents of the file is one single line with the two-letter country-code for the new setting. Initially, apart from 'en', only 'fr' or 'de' make sense. But you are free to write the code in capital letters, too.
All translations reside in one text-file, that you find in the program-folder. The file is named "translations". Here is an examplary section of its contents.
Each block starts with the English version of a text to display, followed by a colon. Each translation of this text starts in a new line and is prepended with the two-letter country-code and a colon.
XX is a wildcard, which allows a text to be parameterized by the program. The position of this wildcard may vary in a translation but it should stay intact.
When you add your own translation or modify the existing text, please keep it free of special characters, especially colons (other than those at the end of the english original or the language-codes), because these control the program-behavior and your text would be clipped at their position.
Lower down in the translations-file, you find two sections which need further explanation.
The first contains text, which will be dynamically set or changed on the generated slideshow-pages. The JavaScript-routines behind this functionality cannot handle any special characters, like e.g. French accents (like in é). Instead, in this section, the escape-sequence of each such character must be used. The JavaScript-function unescape() will see to making them palatable to the browser.
The very last paragraph in the file contains static text for display on the slideshow-pages. The special characters there need to be masked as the typical named entities in HTML-syntax, like é for é.
When you are done and have added a new language-code and translation to all text-blocks in the file, do not forget to change the file LANG in the program directory, if you are using Windows or if the language is not pre-set in the environment-variable LANG.
Push-, check- and radiobutons in Html2Slideshow can be activated
by the keyboard shortcut, indicated by an underlined character. To
allow the translation of those button-labels, that contain such a
shortcut, they must be honored in the upper section of the
translations-file. You will thus find that some text-lines contain an
underscore-character _
. The accelerator is the next one,
following this underscore. The translation of the english label
_Back
is thus _Retour
in French, which automatically
replaces the shortcut Alt+B by Alt+R. Please note,
that the accelerator does not have to be the first character in a
label.
General optionsWhen you start the program, this is what you see, at first:

I will now explain each element from top left to bottom right:
When this option is visible, you
can check it in order to include sub-directories in the search for
image-files. This means also, that currently, the images for the
slide show will not be collected from the HTML-source of a
web-page, but file-names on your hard-disk.

slideshowis entered automatically, but can be modified. The field can even be cleared, in case that you want the source-folder to contain the slideshow-files, as well. Otherwise, the sub-folder will be created, if it does not already exist, when you click the
Start-button (see below).

Start

Should something go wrong, likewise, the message will be a different one

Quit
Quit-button you exit the program and save the current configuration in a file
html2slideshow.cfg, so that your current settings can be restored in the next session.
About

Generator
optionsIn this tab, you can further control the program behavior to some
extent. For the time being, three option sets are available, others
may follow, should I find time and enthusiasm:

title-field, you can give the resulting slide show a name, either, when you collect the images from a directory (and its sub-directories) or, when you consolidate the linked pictures from several HTML-files.
You can leave it empty to
have the slide-show named like the source-directory. Where you let
the program create 1 individual slide show per original
HTML-source, the <title/>-tag from each HTML-file is just
copied and in consequence, this input-field is then not even
displayed.html2slideshow.login the current user's home-folder is used, but you can name a different file, after you activate the option by a click on the checkbox. The file will be created, if it does not exist and additional contents is appended, otherwise. As long as the checkbox is not activated, though, no log will be written. Be careful to choose a file, that is not needed for other purposes and none that would be destroyed, when text is added to its end!
Slide show
optionsThe options, which you find in this tab card, influence the appearance and function of the generated slide shows, rather than that of the generator.
In version 0.6, the card appears for the first time, and offers
still only one option set.

largeand
small, you should enter a number, indicating an alternative vertical display-size in pixels for the images in the running slide shows. On the generated HTML-page, three small buttons serve to switch between the original, the alternative large and the small size.
Should you omit this setting,
defaults apply (500 and 300). Please take into account, that your
image-files will never be modified by HTML2Slideshow. The
scaling-function will just change the height-attribute, and the
option does not have any influence on the loading speed.
HowtoTo open the HTML-page, which you are currently reading, offline in
a web-browser of your choice, you can click the Howto
-card.

Acceptwill either open the page in your browser or a failure-message is displayed. In that case, close the message-dialog and alter the browser-command.
ExampleI am using my own site at http://www.uplawski.de/Provence as an example. The idea for my first C++-version of Html2Slideshow did also arise during the creation of those pages.
The local
directory with all the inside pages, at first looks like in the
screenshot to the right.
What I want, is a slideshow-file for each of those html-files, should they contain references to photos. Html2Slideshow will create those files and spares me the trouble to copy JavaScript and CSS-code in the process.
First, I make sure, that the options for my slide show project are
correctly set, in the options:

In the general options, I enter the path to the source-folder:

Because I want to use the photos referenced in the HTML-source of my web-pages, I have to choose the option "Image-source: files linked in HTML", as explained above.
Next, I just click the Start
-button and a moment later, all
is done. You can, though, use the options-tab to alter the program-behavior, prior
triggering the generator.
To the right,
you see part of the result, as the new sub-folder slideshow
has been added below .../Provence/pages.
Inside that folder, I find the new slideshow-files along with the
CSS- and JavaScript-files, that they will use: 
Ω