CD2HTML v2.0

Define your own HTML style

The new concept

Since version 1, CD2HTML has a totally brand new concept of creating html-files. Previous versions used a fixed concept, there were few options for the creative user. Since this beta 8 release, itÆs possible to choose one of the pre-designed templates, or you simply design your own. You can, as before, use the normal html standards, but the new 'CD2HTML tags', let you go further in designing. The tags, commonly referred as strings, give you total control! You put one of the CD2HTML strings whereever you like in a template, and when CD2HTML has done its deed, youÆll be stunned just how easy and powerful it really is.

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:

  1. <$---HEAD---$>

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

  6. <a name="top">
  7. <CENTER>
  8.   <H2><$title$></H2>
  9.   <H4><$totalsize$></H4>
  10.   <P>
  11.   <P><$index$>
  12. </CENTER>
  13. <BR>
  14. <BR>
  15. <FONT FACE="arial" SIZE="2">

  16. <$---HEADLINES---$>

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

  19. <TABLE BORDER=0>

  20. <$---VALUES---$>

  21. <TR VALIGN=TOP>
  22.   <TD>
  23.   <FONT FACE="arial" SIZE="2">
  24.     <UL>
  25.       <LI><$link$> <I>(<$size$>)</I></LI>
  26.     </UL>
  27.   </FONT>
  28.   </TD>
  29.   <TD>
  30.     <FONT FACE="courier" SIZE="2">
  31.     <DL><DL><DL><DL>
  32.       <$description$>
  33.     </DL></DL></DL></DL>
  34.     <FONT FACE="arial" SIZE="2">
  35.   </TD>
  36. </TR>

  37. <$---FOOTLINES---$>

  38. </TABLE>
  39. <BR>
  40. <BR>

  41. <$---FOOTER---$>

  42. <BR>
  43. <HR>
  44. <BR>
  45. <FONT FACE="times" SIZE=1>
  46.   <$author$>
  47.   <BR>
  48. </FONT>

  49. </BODY>
  50. </HTML>

Please note that the section names (head, headlines, values, footlines and FOOTER) are seperated by an '<$---' and '---$>' (e.g. '<$---FOOTER---$>').

How does CD2HTML works?

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.

  1. <$anchor$>
  2. <$author$>
  3. <$date$>
  4. <$description$>
  5. <$dirname$>
  6. <$dirsize$>
  7. <$dltime14.4k$>, <$dltime28.8k$>, <$dltime64k$>
  8. <$dpiclink$>
  9. <$include$>
  10. <$index$>
  11. <$indexli$>
  12. <$indexbr$>
  13. <$ldate$>
  14. <$ltime$>
  15. <$link$>
  16. <$links$>
  17. <$mp3title$>, <$mp3artist$>, <$mp3album$>, <$mp3year$>, <$mp3comment$>, <$mp3genre$>
  18. <$name$>
  19. <$onliner$>
  20. <$path$>
  21. <$picture$>
  22. <$picturelink$>
  23. <$picxres$>, <$picyres$>, <$picdepth$>, <$pictype$>, <$piccomment$>
  24. <$REPEAT=x$> ... <$ENDREPEAT$>
  25. <$size$>
  26. <$title$>
  27. <$totalsize$>


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.

short description: 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.

short description: 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?).

short description: 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.

short description: the description for an entry (e.g. found in the file_id.diz)
available: VALUES
sample output: CD2HTML v2.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.

short description: the name of the actual directory
available: HEADLINES, VALUES
sample output: CD2HTML v2.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).

short description: 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.

short description: 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.

short description: 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 text or HTML files into your HTML output. So you can include the same HEAD/FOOTER file into each HTML output.

short description: include a file into the HTML output
available: everywhere
sample output: -

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.

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

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

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

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

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

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.

short description: 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.

short description: 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).

short description: 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.

short 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>

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.

short description: ID3 tag information
available: VALUES
sample output: Dancing Queen/ABBA/Gold/1992/FrontNet Audio Group/Classic

The <$name$> tag:

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

short description: 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.

short description: the first line of a description
available: VALUES
sample output: CD2HTML 2.0

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

short description: 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.

short description: 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.

short description: 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.

short description: 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>

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

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.

short description: 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.

short description: 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.

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