DESCRIPTION

Generate HTML file(s) from TextFile(s). The HTML file(s) contain data tables and appropriate navigational links to view other tables. These files can be generated for local viewing or deployment on a web server. A variety of options are provided to control style and appearence of tables.

Multiple TextFile(s) names are separated by spaces. The valid file extensions are .csv and .tsv for comma/semicolon and tab delimited text files respectively. All other file names are ignored. All the text files in a current directory can be specified by *.csv, *.tsv, or the current directory name. The --indelim option determines the format of TextFile(s). Any file which doesn't correspond to the format indicated by --indelim option is ignored.

Default values: left,middle

-b, --borderborderwidth

--cellpaddingpadding

Table cell padding. Default value: 2.

--cellspacingspacing

Table cell spacing. Default value: 1.

--footerstring

Text string to be included at bottom of each HTML file. Default: none.

-d, --displaylinkstop | bottom | both

Specify where to display navigation links in each HTML file for accessing all other HTML files. Possible values: top, bottom, or both. Default value: both. This option is only valid during multiple HTML files generation for an input file.

--displaylinksinfoline | table | both

Control display of additional information along with navigational links: Showing line n of m is displyed for line and showing table n of m for table. Possible values: line | table | both. Default: both. This option is only valid during multiple HTML files generation.

--highlightbycolnum | collabel

This value is mode specific. It indicates how columns to be highlighted are specified using --hightlight option. Possible values: colnum or collabel. Default value: colnum.

--highlightcolor"#RRGGBB,#RRGGBB"

Colors used to highlight column values during highlight and shadedhightlight mode represented as hexadecimal strings.

For --highlighstyle option values of text and background, these colors represent text or background colors respectively. For a specific column, first color string is used for values which meet criterion indicated by --highlight option; the second color is used for rest of the values.

Default values for background--highlightstyle: #0fff0f,#ff0f0f. And default values for text--highlightstyle: #0fbb0f,#ff0f0f. Hexadecimal strings for both --highlightstyle colors correspond to reddish and greenish.

--highlightstyletext | background

This value is mode specific. It indicates highlight style used to differentiate column values which pass a specified criterion from others. Possible values: text or background. Default: background.

--indelimcomma | semicolon

Input delimiter for CSV TextFile(s). Possible values: comma or semicolon. Default value: comma. For TSV files, this option is ignored and tab is used as a delimiter.

-m, --modeplain | shade | highlight | shadedhighlight

Specify how to generate HTML table(s): plain tables with line borders, background of alternate rows filled with a specified color, column values hightlighted using a specified criteria, or combination of previous two styles.

-n, --numrowsnumber

Maximum number of rows per table. Default value: 100. Use 0 to put all rows into one table. For TextFile(s) with more than maximum number of specified rows, multiple HTML tables, with appropriate navigation links, are created.

-o, --overwrite

Overwrite existing files.

-r, --rootrootname

New file or directory name is generated using the root: <root>.html or <root>-html. Default new file name: <InitialTextFileName>.html. Default directory name: <InitialTextFileName>-html.

For TextFile(s) with more than maximum number of rows specified per table, this directory tree is generated using <Name> where <Name> corresponds to <root> or <InitialTextFileName>:Top dir - <Name>-html; Sub dirs - html and mols. <Top dir> contains <Name>.html and <Name>.css files and <sub dir> html conatins various <Name>Lines<Start>To<End>.html files; <sub dir> mols is created as needed and contains

This option is ignored for multiple input files.

--stylesheetold | new | none

Stylesheet file contains various properties which control apperance of HTML pages: type, size, and color of fonts; background color; and so on.

For old value, an existing stylesheet file specified by --stylesheetname option is used for each HTML file; no new stylesheet file is created. This option is quite handy for deploying HTML file(s) on a web server: assuming you specify a valid stylesheet file location relative to your WWWRoot, a reference to this stylesheet is added to each HTML file. For local deployment of HTML file(s), a complete path to a local stylesheet is fine as well.

For create value, a new stylesheet is created and reference to this local stylesheet is added to each HTML file. Use option --stylesheetname to specify name.

For none value, stylesheet usage is completely ignored.

--stylesheetnamefilename

Stylesheet file name to be used in conjunction with -s --stylesheet option. It is only valid for old value of -s --stylesheet option. Specify a valid stylesheet file location relative to your WWWRoot and a reference to this stylesheet is added to each HTML file. Example: "/stylesheets/MyStyleSheet.css". Or a complete path name to a local stylesheet file.

For create value of -s --stylesheet option, a new stylesheet file is created using -r --root option. And value of --stylesheetname is simply ignored.

--shadecolor"#RRGGBB,#RRGGBB"

Colors used to fill background of rows during shade and shadedhightlight mode represented as a pair of hexadecimal string; the first and second color values are used for odd and even number rows respectively.

Default value: "#ffffff,#e0e9eb" - it's white and very light blue for odd and even number rows.

-t, --titlestring

Title for HTML table(s). Default value: <TextFileName>. For multiple input files, -r --root option is used to generate appropriate titles.

--titledisplayyes | no

-w, --workingdirdirname

Location of working directory. Default: current directory.

EXAMPLES

To generate HTML tables with rows background filled with white and greyish colors and navigation links on top and botton of each page, type:

% TextFilesToHTML.pl -o Sample1.csv

To generate HTML tables with rows background filled with golden and greyish colors, navigation links on top and botton of each page, 10 rows in each table, greyish header row color, and cell spacing of 1, type:

AUTHOR

SEE ALSO

COPYRIGHT

Copyright (C) 2019 Manish Sud. All rights reserved.

This file is part of MayaChemTools.

MayaChemTools is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.