CD2HTML Title

Define your own HTML style

The concept
The sections
Example
How does CD2HTML work?
The tags

The concept

CD2HTML allows the user to chnage the outfit of the generated html pages to their own desire. The program allows to manage many different html styles, so you are able to switch from one to another with one mouseclick. If you don't want to design yout own styles, simply use the presets, but if you are a power user, you have many opportuniries to make your own style.
To do this, CD2HTML use it's own tags. These tags looking like normal html tags. The only difference is, that the '<' is followed by a '$' and the '>' gets a '$' ahead. It's something similar the tags Microsoft uses in its Active Server Pages (ASP). Like in ASP, there are different sections.

The sections

There are five sections of an html frame: the head, the headlines, the values, the footlines and the FOOTER. The HEAD specifies the normal html HEAD from <html> to <body> and it's used once. The FOOTER is the end of the html file with </body> and </html>. Here you can insert some further information like the 'mailto:'-tag. The headlines is used for each directory, which is marked by a red dot in the main window. In this section are the headline entries and/or tables HEADs located. The values section is used for each normal entry (file or directory with no HEAD info, greed dot in CD2HTML's list view). See the examples how to use the tags. Don't hesitate to e-mail me, if you like me to implement a new tag (string) not currently supported.

Example

<$---HEAD---$>

<HTML>
<HEAD><TITLE><$title$></TITLE></HEAD>
<BODY BGCOLOR="#0000A0" TEXT="#FFFFFF" LINK="#FFFF80" ALINK="123456" VLINK="#C0C0C0" LEFTMARGIN=10>
<FONT FACE="arial" SIZE="3">

<a name="top">
<CENTER>
  <H2><$title$></H2>
  <H4><$totalsize$></H4>
  <P>
  <P><$index$>
</CENTER>
<BR>
<BR>
<FONT FACE="arial" SIZE="2">

<$---HEADLINES---$>

<$anchor$>
<P><H3><$dirname$> <I>(<$dirsize$>)</I></H3><BR>

<TABLE BORDER=0>

<$---VALUES---$>

<TR VALIGN=TOP>
  <TD>
  <FONT FACE="arial" SIZE="2">
    <UL>
      <LI><$link$> <I>(<$size$>)</I></LI>
    </UL>
  </FONT>
  </TD>
  <TD>
    <FONT FACE="courier" SIZE="2">
    <DL><DL><DL><DL>
      <$description$>
    </DL></DL></DL></DL>
    <FONT FACE="arial" SIZE="2">
  </TD>
</TR>

<$---FOOTLINES---$>

</TABLE>
<BR>
<BR>

<$---FOOTER---$>

<BR>
<HR>
<BR>
<FONT FACE="times" SIZE=1>
  <$author$>
  <BR>
</FONT>

</BODY>
</HTML>

Please note that the section names (HEAD, HEADLINES, VALUES, FOOTLINES and FOOTER) are seperated by an '<$---' and '---$>' (e.g. '<$---FOOTER---$>').

How does CD2HTML work?

CD2HTML works in two different search modes. The first is the directory mode. In this mode CD2HTML searches only for directories. It recursively searches one directory level after another until it reaches the searching depth from the options dialog or the end of the directory hierarchy. The last level will be marked as text and will be output in a table row (in html output). The upper hierarchies will be created in their own tables and headlines. If you use the file mode, CD2HTML searches for files and directories. Files are always marked as text and directories are marked as headlines.

The tags

It doesn't matter anything if you write the tags in capital or small letters. But don't forget the '<$' and '$>' at the begin 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$>

<$name$>
<$onliner$>
<$size$>
<$totalsize$>

Index

<$anchor$>
<$index$>
<$indexbr$>
<$indexli$>

Links

<$dpiclink$>
<$link$>
<$links$>
<$picturelink$>

Loops

<$REPEAT=x$>
...
<$ENDREPEAT$>

 

Music data (MP3)

<$mp3title$>
<$mp3artist$>
<$mp3album$>
<$mp3year$>
<$mp3comment$>,
<$mp3genre$>

<$mp3original$>
<$mp3copyright$>
<$mp3samplerate$>
<$mp3durationmin$>
<$mp3durationsec$>
<$mp3mode$>
<$mp3layer$>
<$mp3version$>
<$mp3bitrate$>

Other

<$include$>

Page info

<$author$>
<$ldate$>
<$ltime$>
<$path$>
<$root$>
<$title$>

Picture data

<$dpiclink$> <$picture$>
<$picturelink$>
<$picxres$>,
<$picyres$>,
<$picdepth$>,
<$pictype$>,
<$piccomment$>



The <$anchor$> tag:

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.

 shortdescription:an anchor for the <$index$>-tag, needs <$index$> if used
available:HEADLINES
sample output:<a name="23">

The <$author$> tag:

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. I don't want any money, I wish only that my program is used and not written in vain. If you don't want to use it, leave it out.

 shortdescription:a link to the author and his homepage
available:everywhere
sample output:CD2HTML (© Falk Petro 1998)

The <$date$> tag:

The date tag prints the date of an entry (what else?).

 shortdescription:the date of an entry
available:VALUES
sample output:31-08-1970

The <$description$> tag:

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 it looks mostly much better. Maybe I will later add an option to switch this off.

 shortdescription: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

The <$dirname$> tag:

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.

 shortdescription:the name of the actual directory
available:HEADLINES, VALUES
sample output:CD2HTML v3.0

The <$dirsize$> tag:

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).

 shortdescription:the total-size of a directory
available:HEADLINES, VALUES
sample output:240KB

The <$dltime14.4k$>, <$dltime28.8k$>, <$dltime64k$> tags:

On Internet servers it is very useful to show the time which is used for the download of the actual file. I found the idea on the www.windows95.com server. The values can be seen as the minimal download-time for modems with 14400 bps and 28800 bps or ISDN adapters with 64000 bps (bps = bits per second). The tags are calculated with the file-size and 1750 bytes/s, 3500 bytes/s and 8000 bytes/s. I don't know if I should use other values to make the results more realistic (because this results are more idealistic). These tags only make sense in the file-mode, but they can be also used for a directory.

 shortdescription:the download time for a file or directory
available:HEADLINES, VALUES
sample output:2:16

The <$dpiclink$> tag:

Links picture entries direct into the HTML file. This is useful, if you want to make an index for small gif animations.

 shortdescription:links picture entries direct into the HTML file
available:HEADLINES, VALUES
sample output:<img src="pictures/img412.gif">

The <$include$> tag:

With this tag you are able to include any text (e.g. HTML files) into your HTML output. So you can include the same HEAD/FOOTER file into each HTML output. The included text will not be parsed for CD2HTML's own tags. The usage is <$INCLUDE file$> where file is a file in the dir where the output HTML files will be saved in or a absolute path.

 shortdescription:include a file into the HTML output
available:everywhere
sample output:-
example:<$INCLUDE d:\html\header.html$>

The <$index$> tag:

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.

 shortdescription: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> ...

The <$indexli$> tag:

The <$indexli$> tag is nearly the same as the 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 dot before each indexlink). See also the <$index$> and <$indexbr$> tag

 shortdescription: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> ...

The <$indexbr$> tag:

The <$indexli$> tag is nearly the same as the the <$index$> tag, but it writes a <BR> after each link. So you have a more cheerful outfit. See also the <$index$> and <$indexlt$> tag

 shortdescription: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> ...

The <$ldate$> tag:

The ldate 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.

 shortdescription:the actual date
available:everywhere
sample output:31-08-1997

The <$ltime$> tag:

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.

 shortdescription:the actual time
available:everywhere
sample output:19:54

The <$link$> tag:

The link tag creates a link to the actual 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 the index is created from CD2HTML creates relative links. It means that the links doesn't use a drive letter. This is absolutely necessary if you generate the index for 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).

 shortdescription:a link to the actual entry
available:VALUES, HEADLINES
sample output:<a href="../tools/cd2html.zip">cd2html.zip</a>

The <$links$> tag:

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 the <$link$> tag.

 shortdescription: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>

The <$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 these informations only if your MP3 files including the ID3 tag. You can also edit these informations if you doubleclick on an MP3 file in the CD2HTML list view.

 shortdescription: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 gives you the full support for MP3 files informations. These tags corresponds to MP3 informations 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').

 shortdescription:MP3 file information
available:VALUES
sample output:128bps MPEG 1.0 Layer II Stereo, 44100 Hz, Original: yes, Copyright: no

The <$name$> tag:

The name tag contains the name of the actual file/directory.

 shortdescription:the name of an entry
available:VALUES
sample output:CD2HTML.ZIP

The <$onliner$> tag:

This tag is similar to the <$description$>-tag but it gives only the first line of a description-file.

 shortdescription:the first line of a description
available:VALUES, HEADLINES
sample output:CD2HTML 2.0 by Falk Petro

The <$path$> tag:

The path tag contains the path of the actual file/directory relative to the root path (the path you have started the scanning process).

 shortdescription:the actual path for an entry
available:HEADLINES, VALUES
sample output:/tools/

The <$picture$> tag:

This tag is very interesting, because it creates a GIF picture of the icon belonging to the actual file/directory (the associated icon under windows) or a thumbnail of the file (for GIF- and JPEG-images) and inserts it on the tags position in the html code. The picture will be saved in a directory 'pictures' relative to the html file. So if you save the html file in the directory 'c:\index\' the pictures will be saved in 'c:\index\pictures\'. If some files/directories have the same icon, the picture will be created only once and used together. The pictures have the name 'img???.gif' or 'thumb_filename.gif/jpg', where ??? is the index in imagelist of the OS.

 shortdescription:the icon of an entry as gif-picture
available:HEADLINES, VALUES
sample output:<img src="pictures/img412.gif">

The <$picturelink$> tag:

Is nearly the same than the <$picture$> tag. The only difference is, that this icon is a link to the program/directory it belongs to. For further information see the description of the <$picture$> tag.

 shortdescription:the icon of an entry as gif-picture with a link to the file it belongs to
available:HEADLINES, VALUES
sample output:<a href="../tools/cd2html.zip"><img src="pictures/img412.gif" border="0"></a>

The <$picxres$>, <$picyres$>, <$picdepth$>, <$pictype$>, <$piccomment$> tags:

These tags writing information about pictures.

 shortdescription:writing the X-, Y-resolution, colordepth, type (Gif, JPEG, ...) of an picture and it's comment (from the descript.ion)
available:VALUES
sample output:640x480x256 Gif file (picture of my girlfriend)

The <$REPEAT=x$> ... <$ENDREPEAT$> tags:

If something should change after all xxx entries, then you need these tags. For example you want to write 5 table columns including some informations about your pictures and then start a new row you have to write:

<TR>,   <$repeat=5$>,   <TD>,     <$picturelink$> <BR>,     <$name$> <BR>,     <$picxres$>x<$picyres$>x<$picdepth$> [<$size$>] ,   </TD>,   <$endrepeat$>, </TR>,

 shortdescription:does something for some entries and then loops back
available:HEADLINES, VALUES
sample output:see above

The <$root$> tag:

The root tag gives the name of the uppermost directory of the search. It's a good replacement of the title tag.

 shortdescription:the title of the document
available:everywhere
sample output:Index of /files/

The <$size$> tag:

The size tag gives the size of the actual file/directory. The output is in the same format as the <$dirsize$> tag. So see the description of the <$dirsize$> tag too.

 shortdescription:the size of an entry (depending of the size in bytes, KB, MB)
available:HEADLINES, VALUES
sample output:224KB

The <$title$> tag:

The title tag gives the title of the document. It's fixed in the options dialog.

 shortdescription:the title of the document
available:everywhere
sample output:Index of /files/

The <$totalsize$> tag:

This tag gives the total size of the search. It's the size of the directory you have started the search from. The output is in the same format as the <$dirsize$> tag. So see the description of the <$dirsize$> tag too.

 shortdescription:total-size of all files (depending of the size in bytes, KB, MB)
available:everywhere
sample output:624MB

<- Back