1DB_TO_HTML_TABLE(1) User Contributed Perl Documentation DB_TO_HTML_TABLE(1)
2
3
4
6 db_to_html_table - convert db to an HTML table
7
9 db_to_html_table [-g N] <source.fsdb >dest.html
10
12 Covert an existing dbtable to an HTML table. The output is a fragment
13 of an HTML page; we assume the user fills in the rest (head and body,
14 etc.).
15
16 Input is fsdb format.
17
18 Output is HTML code (not fsdb), with HTML-specific characters (less
19 than, greater than, ampersand) are escaped. (The fsdb-1.x version
20 assumed input was ISO-8859-1; we now assume both input and output are
21 unicode. This change is considered a feature of the 21st century.)
22
24 -g N or <--group-count N>
25 Color groups of N consecutive rows with one background color.
26
27 This module also supports the standard fsdb options:
28
29 -d Enable debugging output.
30
31 -i or --input InputSource
32 Read from InputSource, typically a file name, or "-" for standard
33 input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue
34 objects.
35
36 -o or --output OutputDestination
37 Write to OutputDestination, typically a file name, or "-" for
38 standard output, or (if in Perl) a IO::Handle, Fsdb::IO or
39 Fsdb::BoundedQueue objects.
40
41 --autorun or --noautorun
42 By default, programs process automatically, but Fsdb::Filter
43 objects in Perl do not run until you invoke the run() method. The
44 "--(no)autorun" option controls that behavior within Perl.
45
46 --help
47 Show help.
48
49 --man
50 Show full manual.
51
53 Input:
54 #fsdb -F S account passwd uid gid fullname homedir shell
55 johnh * 2274 134 John & Ampersand /home/johnh /bin/bash
56 greg * 2275 134 Greg < Lessthan /home/greg /bin/bash
57 root * 0 0 Root ; Semi /root /bin/bash
58 four * 1 1 Fourth Row /home/four /bin/bash
59
60 Command:
61 cat data.fsdb | db_to_csv -g 3
62
63 Output:
64 <table>
65 <tr><th>account</th> <th>passwd</th> <th>uid</th> <th>gid</th> <th>fullname</th> <th>homedir</th> <th>shell</th> </tr>
66 <tr bgcolor="#f0f0f0"><td>johnh</td> <td>*</td> <td>2274</td> <td>134</td> <td>John & Ampersand</td> <td>/home/johnh</td> <td>/bin/bash</td> </tr>
67 <tr bgcolor="#f0f0f0"><td>greg</td> <td>*</td> <td>2275</td> <td>134</td> <td>Greg < Lessthan</td> <td>/home/greg</td> <td>/bin/bash</td> </tr>
68 <tr bgcolor="#f0f0f0"><td>root</td> <td>*</td> <td>0</td> <td>0</td> <td>Root ; Semi</td> <td>/root</td> <td>/bin/bash</td> </tr>
69 <tr bgcolor="#d0d0d0"><td>four</td> <td>*</td> <td>1</td> <td>1</td> <td>Fourth Row</td> <td>/home/four</td> <td>/bin/bash</td> </tr>
70 </table>
71
73 Fsdb. dbcolneaten. dbfileadjust. html_table_to_db.
74
76 Copyright (C) 2007-2015 by John Heidemann <johnh@isi.edu>
77
78 This program is distributed under terms of the GNU general public
79 license, version 2. See the file COPYING with the distribution for
80 details.
81
82
83
84perl v5.28.1 2018-12-21 DB_TO_HTML_TABLE(1)