@(#) $Id: Dir2HTML.txt,v 3.30 2023/02/24 12:52:33 ralph Exp $ vim:ts=8:sw=4:sts=4:syntax=asciidoc
________ .__ ________ ___ ___________________ .____ \______ \ |__|______\_____ \/ | \__ ___/ \ | | | | \| \_ __ \/ ____/ ~ \| | / \ / \| | | ` \ || | \/ \ Y /| |/ Y \ |___ /_______ /__||__| \_______ \___|_ / |____|\____|__ /_______ \ \/ \/ \/ \/ \/ (c) by ROSE SWE, Ralph Roth, http://rose.rult.at
1. SYNOPSIS/DESCRIPTION
Dir2HTML creates an HTML file from the directory in which you run dir2html (using the Dir2HTML.INI file as a configuration file), optionally including custom HTML code in the generated file. With Dir2HTML, your index.html files can be unique and as complex as you like.
The strength of Dir2HTML is its support for MD5 hashes/checksums and the 4DOS description format. Program versions are available for Dos32, Windows and Linux!
To get the most out of Dir2HTML, you need at least a basic understanding of HTML. Without it, the generated files will be functional, but you will not get the most out of it. An hour spent learning HTML and five minutes spent reading custom HTML files will be well rewarded :-)
Dir2HTML is freeware. It contains no ads (but can be registered for special commercial use = means an own key file with YOUR name), and does not connect to the Internet or violate your privacy in any way. Some of the included index.html file contains ads, but this is just an example of the "include=" function, after editing the Dir2HTML.INI file, the ads are gone too! It only does one thing: create html files.
2. INSTALLATION
Dir2HTML is available without an installation program (Portable Program), just unzip and run Dir2HTML.exe. A portable program is a software application that can be run on different computer systems without requiring installation or modification of the underlying system. In other words, a portable program can be run directly from a USB drive, CD, or other external storage device without any additional setup or configuration.
Portable programs typically store all their configuration files and data within the program’s own directory structure or file system, rather than relying on the operating system’s default locations. This allows them to be easily moved between computers or operating systems without the need for installation or setup.
To uninstall simply delete the files. I recommend to copy the *.exe, *.key and *.ini files to somewhere were your PATH= variable points.
3. USAGE
The next step is to edit the Dir2HTML.INI file (see below), then run Dir2html.exe in the directory where you want to create your index.html file. Then upload this index.html, the supplied .GIF files and your files to your website.
The Updated/New flag is triggered by the DOS archive bit of a file (yes works also on Windows). You can set or reset it with `attrib +a filename' to set it or `attrib -a filename' to clear it. Linux (and Windows) users can use the newer=days support in the INI file.
The MD5 hash of each file is calculated, so you and your users can check if the download is corrupt or not.
To add or edit a short description of a filename you can use "describe.exe filename" which will prompt you for a short description. The file format used for this description is the 4DOS "descript.ion" format, supported by various tools such as Total Commander, DN, DoubleCommander, NDM, XNView or 4DOS.
HINT: Basic Wordstar shortcuts are supported when editing a description.
4. Dir2HTML.INI
Most parts of this file are self explaining. You can store it somewhere in your PATH or just for every directory where you create an index.html a separate copy, it depends on you!
Here’s a short description of the keywords. Please notice that indexes are hexadecimal numbered!
Exclude??= Files that should not be included, e.g. the INI file etc. (MAX = 50) Output= Output file, default index.html Header?= Additional lines that will be included into the HTML header, just before the <title> tags! (MAX = 16 -> 0..Fh) include= supported TextBeforeText?= Text that comes before dir2html automatically created text (MAX 16, include= supported) TextAtEnd?= Bottom text (MAX 16, include= supported) ; Remark ...=include=filename instead of writing only single HTML lines you can also use include files, that can contain plain ASCII or HTML statements. Just take a look how I include my ads. Newer=Integer(days) ;; Newer=60 ;; A file gets the "new" status, if the ARCHIVE attribute (DOS/Windows) ;; is set _or_ (FileDate+Newer>Currentdate) -> 2 Month (60 days) ;;
5. COMMAND LINE OPTIONS
Dir2HTML 2.50 and higher supports command line options. Run Dir2HTML with the option -? or -h to see all supported command line options.
5.1. Notes on parameter usage
Customers familiar with the American or Linux/UNIX parameter syntax (minus sign) instead of the slash (' / ') can also use the minus sign (' - ') to start an option under DOS and Windows. Under Linux you must use the minus sign!
Example: -nojava is equivalent to /NoJAvA
Note
|
There must be at least one blank between the individual arguments! The arguments are not case sensitive. |
5.2. The environment variable Dir2HTML
Instead of always calling Dir2HTML with arguments, Dir2HTML can be controlled with a so called environment variable. For example, enter the following at the DOS prompt:
c:> SET Dir2HTML=-nototal /NoJava
For Linux:
#export dir2html=-nototal
If you start Dir2HTML now, Dir2HTML reads all required arguments from the variable.
5.3. Rollback of pre-set values
Sometimes it might be desired to reset already set options (i.e. set by SET Dir2HTML=…) This can simply be done by a minus sign following the option on the command line. With this action the option is being switched off.
For example, you have entered the following:
SET Dir2HTML=-dir
Then start Dir2HTML with the following argument:
Dir2HTML -dir-
In this case the command line option overrides the option set by the environment variable! Command line always override environment options.
6. HISTORY
See CVS/RCS log in the source code, especially in dir2html.pas and in the file "ChangeLog" if provided.
___ _ _ _ | \ ___ ___ __ _ _(_)_ __| |_ (_)___ _ _ | |) / -_|_-</ _| '_| | '_ \ _|_| / _ \ ' \ |___/\___/__/\__|_| |_| .__/\__(_)_\___/_||_| |_|
7. Description for "descript.ion" files
Dir2HTML supports 4DOS DESCRIPT.ION files and uses this information for additional information in the "index.html" file.
The DESCRIPT.ION file format was designed for short (DOS) file names (8.3). To use long file names in Dir2HTML, filenames and the description is separated in the DESCRIPT.ION file with " " around the file name. The original DESCRIPT.ION uses here a space (char 32 - that interferes with LFN containing spaces). Dir2html and Describe will use the "filename" format for writing into the descript.ion file, but can handle all formats:
filename space desc - 4dos DOS filename tab or alt-255 desc - various utilities "filename" space desc - 4dos NT, ROSE SWE tools
Describe WILL convert the whole DESCRIPT.ION file to "filename" format!
To add or edit the DESCRIPT.ION file you can use supplied describe.exe. Keys: Arrows, Backspace/Del, Ins, Crtl-Y, ESC.
describe -md5 . will add md5 hashes to the comments describe -batch . -md5 - "" -, batch mode, no manual editing
8. Hashes
_ _ _ | | | | __ _ ___| |__ ___ ___ | |_| |/ _` / __| '_ \ / _ \/ __| | _ | (_| \__ \ | | | __/\__ \ |_| |_|\__,_|___/_| |_|\___||___/
WHAT IS A HASH ALGORITHM? THE SHA-1 AND MD5 ALGORITHMS
In theory, MD5 and SHA1 are algorithms for calculating a 'compressed representation' of a message or file. The 'condensed representation' is of fixed length and is known as a 'message digest' or 'fingerprint'.
What makes this exercise useful is that it is assumed to be computationally infeasible to produce two messages with the same message digest. digest. This uniqueness allows the message digest to act as a 'fingerprint' of the message… the message… opening up the possibility of using this technology for problems such as data integrity and integrity and comparison purposes.
For example, if you are downloading or receiving a file, you can use MD5 or SHA-1 to the correct, unaltered file by comparing its hash with the original. with the original. You are essentially verifying the integrity of the file.
It doesn’t have to be a file, of course - any message or similar construct that you need to integrity can be verified in this way. All sorts of possibilities arise…
SHA-1: The Secure Hash Algorithm (SHA) was developed by NIST and is specified in the Secure Hash Standard (SHS, FIPS 180). SHA-1 is a revision of this version. was published in 1994. It is also described in the ANSI X9.30 (Part 2) standard. SHA-1 produces a message digest of 160 bits (20 bytes). Although slower than MD5, this larger digest size makes it stronger against brute force attacks.
MD5: MD5 was developed in 1994 by Professor Ronald L. Rivest. Its 128-bit (16 bytes) message digest makes it a faster implementation than SHA-1.
In both cases, the fingerprint (message digest) is also not reversible. data cannot be retrieved from the message digest, but as mentioned above, the digest uniquely identifies the data. digest uniquely identifies the data.
[MD5] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, April 1992. http://www.faqs.org/rfcs/rfc1321.html
[SHA] NIST, FIPS PUB 180-1: Secure Hash Standard, April 1995.
/* end */