[Index] What is CD2HTML | Features | Tech. Support | New program versions | Disclaimer | Registering | Installation / Deinstallation | How CD2HTML works | Using CD2HTML | Shortcuts | Command-line functions | Tips and Tricks | Creating HTML templates | CD2HTMLs own tags | The Team | Version history | # CD2HTMLs own tags It doesn't matter if you write the tags in capital or small letters. But don't forget the '<%' and '%>' at the beginning and end of a tag. If you make mistakes CD2HTML will show you a message in the HTML output.
File info <%date%> <%description%> <%dirname%> <%dirsize%> <%dltime14.4k%>, <%dltime28.8k%>, <%dltime64k%> <%dltime56k%> <%dltime2m%> <%filepath%> <%is_dir display_text%> <%is_file display_text%> <%name%> <%onliner%> <%size%> <%totalsize%> | Index <%anchor%> <%index%> <%indexbr%> <%indexli%> <%prevnextlist%> <%prevnextsimple%> | Links <%dpiclink%> <%link%> <%links%> <%picturelink%> | Loops <%repeat=x%> ... <%endrepeat%> <%oddeven odd="..." even="..."%>
Music data (MP3) <%mp3title%> <%mp3artist%> <%mp3album%> <%mp3year%> <%mp3comment%>, <%mp3genre%> <%mp3original%> <%mp3copyright%> <%mp3samplerate%> <%mp3durationmin%> <%mp3durationsec%> <%mp3mode%> <%mp3layer%> <%mp3version%> <%mp3bitrate%> <%mp3totaltime%> <%mp3dirtime%> <%lasttimeunit%> <%is_id3%> | Other <%include%> | Page info <%author%> <%dircountabs%> <%dircount%> <%filecount%> <%filecountabs%> <%itemscountabs%> <%itemscount%> <%ldate%> <%linkparent display_text%> <%ltime%> <%pages%> <%parentpath%> <%path%> <%root%> <%thispage%> <%title%> | Picture data <%dpiclink%> <%exifApertureFNumber%> <%exifBrightness%> <%exifCameraMake%> <%exifCameraModel%> <%exifComments%> <%exifDateTime%> <%exifDistance%> <%exifExposureBias%> <%exifExposureProgram%> <%exifExposureTime%> <%exifFlashUsed%> <%exifFocalLength%> <%exifHeight%> <%exifISOSpeed%> <%exifIsColor%> <%exifLightSource%> <%exifMeteringMode%> <%exifTraceStr%> <%exifVersion%> <%exifWidth%> <%picture%> <%picturelink%> <%picturepath%> <%picxres%>, <%picyres%>, <%picdepth%>, <%pictype%>, <%piccomment%>
<%anchor%> The anchor tag creates an anchor for a link in the index (see index tag). It makes no sense to use the anchor tag without the index tag. The output looks like <a name="xxx">, where xxx is a value CD2HTML derives from the number of the entry in the list-view.
Description: | an anchor for <%index%>-tag, needs <%index%> if used
Available: | HEADLINES
Sample output: | <a name="23">
<%author%> The author tag writes a message with links about CD2HTML and the author. You should always provide the author tag, because I want as many people as possible use my program. Though If you don't want to use it, you may leave it out.
Description: | a link to the author and his homepage
Available: | everywhere
Sample output: | CD2HTML (© Falk Petro 1998)
<%date%> The date tag writes the last modified date of an entry (what else?).
Description: | the date of an entry
Available: | VALUES
Sample output: | 31-08-1970
<%description%> The description tag writes the description CD2HTML has found for an entry. CD2HTML notes the order you have defined in the options dialog (normally the file_id.diz at first ant then the info.txt) and uses the first of the files it found. If no description is found, CD2HTML writes only a &nbsp;. In packed archives CD2HTML is only looking for the file_id.diz. Each line will be finished by a hard line-break (<BR>) because in most cases it looks much better. Maybe I will later add an option to switch this off.
Description: | the description for an entry (e.g. found in the file_id.diz)
Available: | VALUES, HEADLINES
Sample output: | CD2HTML v3.0, written by Falk Petro
<%dircount%> Returns the number of subdirectories the current directory contains.
Description: | number of subdirectories of the current directory
Available: | HEADLINES
Sample output: | 23
<%dircountabs%> Returns the total number of directories.
Description: | total number of directories
Available: | HEADLINES
Sample output: | 612
<%dirname%> The directory name tag specifies the next upper directory name of an entry which is marked as text. So this tag is only for these entries available or for the directory itself.
Description: | the name of the actual directory
Available: | HEADLINES, VALUES
Sample output: | CD2HTML v3.0
<%dirsize%> The directory-size tag specifies the size of the parent directory of an entry which is marked as text. So this tag is only for these entries available or for the directory itself. The value is rounded (if the size is greater than 1048576 bytes the value is rounded to MB, if the size is between 1024 and 1048576 bytes value is rounded to KB and in all other cases the value isn't rounded and written in bytes).
Description: | the total-size of a directory
Available: | HEADLINES, VALUES
Sample output: | 240KB
<%dltime14.4k%>, <%dltime28.8k%>, <%dltime64k%>, <%dltime56k%><%dltime2m%> On Internet servers it is very useful to show the time expected for the download of the current file. I found the idea on the www.windows95.com server. The values can be considered the minimum download time for modems with 14400 bps and 28800 bps or ISDN adapters with 64000 bps (bps = bits per second). The tags are calculated from the file size and 1750 bytes, 3500 bytes and 8000 bytes. I don't know if I should use other values to make the results more realistic (because the results are more idealistic). These tags only make sense in the file-mode, but can also be used for a directory.
Description: | the download time for a file or directory
Available: | HEADLINES, VALUES
Sample output: | 2:16
<%dpiclink%> Links picture entries directly into the HTML file. This is useful if you want to make an index for small gif animations.
Description: | links picture entries direct into the HTML file
Available: | HEADLINES, VALUES
Sample output: | <img src="pictures/img412.gif">
<%exifBrightness%> The scene brightness measured in BVs (Brightness Value) present when the image was captured, and encoded in the BrightnessValue tag-field using APEX units.
Description: | Exif Brightness
Available: | VALUES
Sample output: | -0,80
<%exifExposureBias%> This tag encodes the actual exposure bias (the amount of over or under-exposure relative to a normal exposure as determined by the cameras exposure system) used when capturing the image, using APEX units. The range is between -99.99 and 99.99.
Description: | Exif Bias
Available: | VALUES
Sample output: | 0,00
<%exifExposureProgram%> The exposure program used by the camera to set the appropriate capture trade-offs (shutter speed, aperture, etc.) in order to properly expose the image being captured, is encoded within the ExposureProgram tag-field as an enumerated VALUE.
Description: | Exif-Exposure program
Available: | VALUES
Sample output: | Normal
<%exifCameraMake%> The cameras "make" information from Exif 2.1 (Exchangeable image file format for Digital Still Cameras).
Description: | Camera’s "make"
Available: | VALUES
Sample output: | Eastman Kodak Company
<%exifCameraModel%> The camera’s "model" from Exif 2.1 (Exchangeable image file format for Digital Still Cameras).
Description: | Camera’s "model"
Available: | VALUES
Sample output: | KODAK DC265 ZOOM DIGITAL CAMERA (V01.00)
<%exifDateTime%> The date that a given image was last modified, i.e. altered in a way that modifies any image data values, is recorded using the DateTime tag-field from Exif 2.1 (Exchangeable image file format for Digital Still Cameras).
Description: | Exif-Date
Available: | VALUES
Sample output: | 1999:06:14 01:37:36
<%exifHeight%> Image height from Exif 2.1 (Exchangeable image file format for Digital Still Cameras).
Description: | Exif height
Available: | VALUES
Sample output: | 768
<%exifISOSpeed%> Returns the used DIN defined ISO-Speedrate.
Description: | Exif ISO-Speed
Available: | VALUES
Sample output: | 100
<%exifLightSource%> Tthe light source (scene illuminant) that was determined to be present when the image was captured.
Description: | Exif-Light Source
Available: | VALUES
Sample output: | unknown
<%exifMeteringMode%> The metering mode, for example the cameras method of spatially weighting the scene luminance values to determine the sensor exposure, is encoded in the MeteringMode tag-field as an enumerated VALUE. Metering modes include simple average, center-weighted-average, etc.
Description: | Exif-Metering Mode
Available: | VALUES
Sample output: | Multi
<%exifTraceStr param%> Summary of all Exif information found. The specified parameter will be used to separate the key value pairs (e.g. <br> for breaks as delimiter).
Description: | Exif summary
Available: | VALUES
Sample output: | Make=Canon Model=Canon PowerShot G2 Orientation of image=Normal (1) Image resolution in width direction=180/1 Image resolution in height direction=180/1 Unit of X and Y resolution=Inch (2) File change date and time=2001:06:28 12:58:49 Y and C positioning=Centered (1) ...
<%exifVersion%> Returns the found Exif version number of the current Tiff/JPEG file.
Description: | Exif version
Available: | VALUES
Sample output: | 2.1
<%exifWidth%> Image width from Exif 2.1 (Exchangeable image file format for Digital Still Cameras).
Description: | Exif width
Available: | VALUES
Sample output: | 1024
<%exifIsColor%> Gives Exif information if the image is shot in color.
Description: | Colorshot
Available: | VALUES
Sample output: | 1
<%exifFlashUsed%> Whether or not flash was used when the image was captured can be encoded in the Flash tag-field.
Description: | Flash used
Available: | VALUES
Sample output: | 1
<%exifFocalLength%> The camera lens focal length in millimeters, used to capture the image, is encoded in the FocalLength tag-field.
Description: | FocalLength
Available: | VALUES
Sample output: | 7,50 mm
<%exifExposureTime%> This tag encodes the actual exposure time used when the image was captured.
Description: | Exposure time
Available: | VALUES
Sample output: | 0.004 s (1/250)
<%exifApertureFNumber%> This optional tag encodes the actual lens f-number (ratio of lens aperture to focal length) used when the image was captured.
Description: | Aperture f-number
Available: | VALUES
Sample output: | f/ 9.5
<%exifDistance%> This optional tag encodes the distance (in metres) between the front nodal plane of the lens and the position at which the camera was focusing when the image was captured.
Description: | Exif distance
Available: | VALUES
Sample output: | 16.66 m
<%exifComments%> Picture comment from Exif 2.1 (Exchangeable image file format for Digital Still Cameras).
Description: | Exif Comment
Available: | VALUES
Sample output: | Flowers on meadow
<%filecount%> Returns the number of files found in the current directory.
Description: | number of files of the current directory
Available: | HEADLINES
Sample output: | 23
<%filecountabs%> Returnes the total number of files.
Description: | total number of files
Available: | HEADLINES
Sample output: | 612
<%filepath%> Returnes the path of the current file relative to the current HTML document. With this tag you can design your own links (e.g. <a href="<%filepath%>" target="_top"><%name%></a>).
Description: | path of the current file
Available: | HEADLINES, VALUES
Sample output: | ../zip/cd2html.zip
<%include%> The <%include%> tag reads a file and writes it into the HTML file. The usage is <%include file%>, where file is a file in the same directory as the HTML files are saved (e.g. <%INCLUDE header.html%> ). An absolute path may be specified (e.g. <%INCLUDE d:\html\header.html%> ). The included file will also be parsed for CD2HTMLs own tags.
Description: | includes a file in the current HTML file
Available: | everywhere
Sample output: | file-content
<%index%> This tag does what it says: it creates an index of all entries which are marked as directory. So you can insert links to all headlines or tables if you want. But it only makes sense if you use the index tag together with the anchor tag. So see the <%anchor%> tag too.
Description: | link-section to the tables (like an index), needs <%anchor%> if used
Available: | everywhere (recommended: HEAD, FOOTER)
Sample output: | <a href="#23">Tools</a> <a href="#31">Internet</a> ...
<%indexli%> <%indexli%> tag is nearly the same as the <%index%> tag, but it writes a <LI> after each link. So you can use it together with the <OL> or <UL> tag (e.g. <UL> <%indexli%> </UL> creates an index with a marker before each indexlink). See also <%index%> and <%indexbr%> tag
Description: | link-section to the tables (like an index) with a <LI> tag after each link, needs <%anchor%> if used
Available: | everywhere (recommended: HEAD, FOOTER)
Sample output: | <a href="#23">Tools</a> <a href="#31">Internet</a><LI> ...
<%indexbr%> <%indexbr%> tag is nearly the same as the <%index%> tag, but it writes a <BR> after each link. So you have a more cheerful outfit. See also <%index%> and <%indexli%> tag
Description: | link-section to the tables (like an index) with a <BR> tag after each link, needs <%anchor%> if used
Available: | everywhere (recommended: HEAD, FOOTER)
Sample output: | <a href="#23">Tools</a> <a href="#31">Internet</a><BR> ...
<%is_dir display_text%> Returns display_text if the current item is a directory. By using this tag you are for instance able to format text for directories differently than for files (e.g. <%is_dir &lt;DIR&gt;%> displays <DIR>if the current item is an directory).
Description: | Returns display_text for directories
Available: | VALUES
Sample output: | <DIR>
<%is_file display_text%> Is the file equivalent to <%is_dir display_text%>, i.e; returns display_text if the current item is a file.
Description: | Returns display_text for files
Available: | VALUES
Sample output: | <Date>
<%is_id3 display_text%> <%is_id3%> tests if the current item has an ID3 Tag (extended information for MP3 files). Encapsulated CD2HTML tags are permitted (e.g. <%is_id3 Title: <%mp3title%>%>). This tag will help you to show ID3 information only if it is available.
Description: | Tests for ID3 tag
Available: | VALUES
Sample output: |
<%itemscountabs%> Returns the total number of files and directories and is the sum of <%dircountabs%> and <%filecountabs%>.
Description: | total number of files and directories
Available: | HEADLINES
Sample output: | 612
<%itemscount%> Returns the number of files and subdirectories of the current directory and is the sum of <%dircount%> and <%filecount%>.
Description: | number of files and subdirectories of the current directory
Available: | HEADLINES
Sample output: | 62
<%lasttimeunit%> Returns the last valid time unit for the tags <%mp3dirtime%> and <%mp3totaltime%>.
Description: | Last time unit
Available: | VALUES
Sample output: | h
<%ldate%> This tag gets the local date from the internal clock of your computer. You can use this tag to show the date of the last changes of the index file.
Description: | the actual date
Available: | everywhere
Sample output: | 31-08-1997
<%linkparent display_text%> Tag for linking back to the parent HTML file <%linkparent display_text%>. If you have multiple html files created (mode 3), this tag helps you to link back from an HTML file to the parent HTML file. Alternatively, you can get the path alone by using the <%parentpath%> tag.
Description: | a link to the parent document (mode 3, multiple pages)
Available: | everywhere
Sample output: | <a href="index.html">[upper dir]</a>
<%ltime%> The ltime tag gets the local time from the internal clock of your computer. You can use this tag to show the time of the last changes of the index file.
Description: | the actual time
Available: | everywhere
Sample output: | 19:54
<%link%> This tag creates a link to the current file/directory. The link text which is shown in the html browser is the file or directory name. If you save the html file on the same drive as the index was created from, CD2HTML creates relative links. This means that the links doesn't use a drive letter. This is absolutely necessary if you generate the index for use on an Internet/Intranet server. In all other cases CD2HTML creates absolute links which including a drive letter and the full path (because there is no other way).
Description: | a link to the actual entry
Available: | VALUES, HEADLINES
Sample output: | <a href="../tools/cd2html.zip">cd2html.zip</a>
<%links%> The links tag creates links to all the files CD2HTML has found for the actual directory. What CD2HTML should link is specified in the options dialog (by extension). You can edit the files which should be linked before writing the html file. If you double click in the list view in CD2HTML's main-window and in the window which opens, you go 'links'. See the comments I made about absolute and relative links in the description of <%link%> tag.
Description: | the specified link(s) for an entry (by extension)
Available: | VALUES
Sample output: | <a href="../tools/cd2html.zip">cd2html.zip</a>, <a href="../tools/cd2html.zip">cd2html_src.zip</a>
<%mp3dirtime%> This tag returns the duration of all mp3 files inside the current directory (excluding subdirectories). See also <%lasttimeunit%>, <%is_id3%> and <%mp3totaltime%>.
Description: | MP3 duration for current dir
Available: | VALUES
Sample output: | 1:15
<%mp3title%>, <%mp3artist%>, <%mp3album%>, <%mp3year%>, <%mp3comment%>, <%mp3genre%> tags: These tags provides you with all the information of the ID3 tag of MPEG Layer 3 files. You can get this information only if your MP3 files include the ID3 tag. You can also edit this information if you double-click on an MP3 file in the CD2HTML list view.
Description: | ID3 tag information
Available: | VALUES
Sample output: | Dancing Queen/ABBA/Gold/1992/FrontNet Audio Group/Classic
<%mp3original%>, <%mp3copyright%>, <%mp3samplerate%>, <%mp3durationmin%>, <%mp3durationsec%>, <%mp3mode%>, <%mp3layer%>, <%mp3version%>, <%mp3bitrate%> These tags give you full support for MP3 file information. These tags correspond to MP3 information like song duration (min, sec), encoding, bitrate, original flag (yes|no), copyright (yes|no), layer ('Unknown', 'I', 'II', 'III'), mode (Stereo, Joint-Stereo, Dual-channel, Single-Channel) and version ('Unknown', '1.0', '2.0', '2.5').
Description: | MP3 file information
Available: | VALUES
Sample output: | 128bps MPEG 1.0 Layer II Stereo, 44100 Hz, Original: yes, Copyright: no
<%mp3totaltime%> This tag returns the total mp3 duration of all mp3 files inside a search (a directory including all subdirectories). See also <%lasttimeunit%>, <%is_id3%> and <%mp3totaltime%>.
Description: | MP3 total duration
Available: | VALUES
Sample output: | 13:15
<%name%> The name tag contains the name of the current file/directory.
Description: | the name of an entry
Available: | VALUES
Sample output: | CD2HTML.ZIP
<%oddeven odd="..." even="..."%> This is used to switch between the text in quotes after odd/even for odd/even entries (e.g. in table cells). Use this to change for example the background color for table cells containing the file entries (e.g. <tr bgcolor="<%oddeven odd="#ffddaa" even="#f0f0f0"%>">).
Description: | differentiate between odd/even rows
Available: | VALUES
Sample output: | see above
<%onliner%> This tag is similar to <%description%> tag but it gives only the first line of a description file. If there is no description available <%onliner%> tag returns &nbsp;.
Description: | the first line of a description
Available: | VALUES, HEADLINES
Sample output: | CD2HTML 2.0 by Falk Petro
<%pages%> If CD2HTML is in mode 2 (limited entries per page) this tag returns the total HTML pages CD2HTML will create to store all entries. See also <%thispage%>.
Description: | returns the total number of pages (mode 2, limited entries per page)
Available: | everywhere
Sample output: | 4
<%parentpath%> If multiple html files are created (mode 3) this tag returns the path of the parent HTML document, so this tag helps you to link back from one HTML file to the parent HTML file. Normally you should use the <%linkparent display_text%> tag, because it's easier to use but <%parentpath%> is more flexible because you can create your own anchor tag.
Description: | path to the parent document (mode 3, multiple pages)
Available: | everywhere
Sample output: | index.html
<%path%> The path tag contains the path of the current file/directory relative to the root path (the path you have started the scanning process).
Description: | the actual path for an entry
Available: | HEADLINES, VALUES
Sample output: | /tools/
<%picture [widthxheight]%> This tag creates a GIF picture of the icon belonging to the current file/directory (the associated windows icon) or a thumbnail of the file (for GIF, PNG and JPEG images) and returns the HTML code to include the image. The picture will be saved in the thumbnail directory which can be changed in the Options Dialog (e.g. 'pics') relative to the HTML file. Where some files/directories have the same icon, the thumbnail will be created only once. The thumbnail prefix is normally 'tn_' but can be changed in the Options Dialog. Optionally, you can specify the width and height for the thumbnail to override the defaults from the options dialog (e.g. <%picture [300x400]%>). So you can go beyond the limitation of 140x140 pixels.
Description: | the icon/thumbnail of an entry
Available: | HEADLINES, VALUES
Sample output: | <img src="pics/tn_img412.gif">
<%picturelink [widthxheight]%> Is nearly the same as the <%picture%> tag. The difference is that the icon is a link to the program/directory that it belongs to. For further information see the description of the <%picture%> tag. Optionally, you can specify the width and height for the thumbnail to override the defaults from the options dialog (e.g. <%picture [300x400]%>). So you can go beyond the limitation of 140x140 pixels.
Description: | the icon or thumbnail of an entry with a link to the file it belongs to
Available: | HEADLINES, VALUES
Sample output: | <a href="../tools/cd2html.zip"><img src="pics/img412.gif" border="0"></a>
<%picturepath%> Is nearly the same as the <%picture%> tag, but it returns only the path to the thumbnail and creates no HTML image tag. Optionally, you can specify the width and height for the thumbnail to override the defaults from the options dialog (e.g. <%picture [300x400]%>). So you can go beyond the limitation of 140x140 pixels.
Description: | the icon or thumbnail of an entry
Available: | HEADLINES, VALUES
Sample output: | pics/img412.gif
<%picxres%>, <%picyres%>, <%picdepth%>, <%pictype%>, <%piccomment%> tags: These tags give the named information about pictures.
Description: | writes the X, Y resolution, colordepth, type (GIF, JPEG, PNG, ...) of a picture and its comment (from the descript.ion)
Available: | VALUES
Sample output: | 640x480x256 GIF file (picture of my girlfriend)
<%prevnextlist%> This tag works only in mode 2 (limited entries per page) and returns a list of links to all the pages CD2HTML creates. You can modify the design by changing the mode 2 options in the Options Dialog. See also <%prevnextsimple%>
Description: | returns a pagenavigation (mode 2, limited entries per page)
Available: | everywhere
Sample output: | <p> <a href="index.html"><-- previous</a> <A HREF="index.html">1</A>| <A HREF="index_01.html">2</A>| <A HREF="index_02.html">3</A>| <a href="index_02.html">next --></a>
<%prevnextsimple%> This tag works only in mode 2 (limited entries per page) and returns a link to the next and previous pages. You can modify the design by changing the mode 2 options in the Options Dialog. See also <%prevnextlist%>
Description: | returns a link to the next and previous page (mode 2, limited entries per page)
Available: | everywhere
Sample output: | <p> <a href="index.html"><-- previous</a> <a href="index_02.html">next --></a>
<%REPEAT=x%> ... <%ENDREPEAT%> tags: If something should change after all xxx entries, then you need these tags. For example, if you want to write 5 table columns including some information about your pictures, and then start a new row, you should write:
    <TR>
      <%repeat=5%>
      <TD>
        <%picturelink%> <BR>
        <%name%> <BR>
        <%picxres%>x<%picyres%>x<%picdepth%> [<%size%>]
      </TD>
      <%endrepeat%>
    </TR>
Description: | does something for some entries and then loops back
Available: | HEADLINES, VALUES
Sample output: | see above
<%root%> The root tag gives the name of the uppermost directory of the search, and is good replacement for the <%title%> tag.
Description: | the root path of the search
Available: | everywhere
Sample output: | my pictures
<%size%> The size tag gives the size of the current file/directory. The output is in the same format as <%dirsize%> tag. So see the description of <%dirsize%> tag too.
Description: | the size of an entry (depending on the size in bytes, KB, MB)
Available: | HEADLINES, VALUES
Sample output: | 224KB
<%thispage%> If CD2HTML is in mode 2 (limited entries per page) this tag returns the actual HTML page number. See also <%pages%>.
Description: | returns the actual page number (mode 2, limited entries per page)
Available: | everywhere
Sample output: | 1
<%title%> The title tag gives the title of the document. It's fixed in the options dialog.
Description: | the title of the document
Available: | everywhere
Sample output: | Index of /files/
<%totalsize%> This tag gives the total size of the uppermost directory you started the search from. The output is in the same format as <%dirsize%> tag. So see the description of <%dirsize%> tag too.
Description: | total-size of all files (depending on the size in bytes, KB, MB)
Available: | everywhere
Sample output: | 624MB