1HTML_TABLE_TO_DB(1)   User Contributed Perl Documentation  HTML_TABLE_TO_DB(1)
2
3
4

NAME

6       html_table_to_db - convert HTML tables into fsdb
7

SYNOPSIS

9           html_table_to_db <source.html >dest.fsdb
10

DESCRIPTION

12       Converts a HTML table to Fsdb format.
13
14       The input is an HTML table (not fsdb).  Column names are taken from
15       "TH" elements, or defined as "column0" through "columnN" if no such
16       elements appear.
17
18       The output is two-space-separated fsdb.  (Someday more general field
19       separators should be supported.)  Fsdb fields are normalized version of
20       the html file: multiple spaces are compressed to one.
21
22       This module also supports the standard fsdb options:
23
24       -d  Enable debugging output.
25
26       -i or --input InputSource
27           Read from InputSource, typically a file name, or "-" for standard
28           input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue
29           objects.
30
31       -o or --output OutputDestination
32           Write to OutputDestination, typically a file name, or "-" for
33           standard output, or (if in Perl) a IO::Handle, Fsdb::IO or
34           Fsdb::BoundedQueue objects.
35
36       --autorun or --noautorun
37           By default, programs process automatically, but Fsdb::Filter
38           objects in Perl do not run until you invoke the run() method.  The
39           "--(no)autorun" option controls that behavior within Perl.
40
41       --help
42           Show help.
43
44       --man
45           Show full manual.
46

SAMPLE USAGE

48   Input:
49               <table>
50               <tr><th>account</th> <th>passwd</th> <th>uid</th> <th>gid</th> <th>fullname</th> <th>homedir</th> <th>shell</th> </tr>
51               <tr bgcolor="#f0f0f0"><td>johnh</td> <td>*</td> <td>2274</td> <td>134</td> <td>John &amp; Ampersand</td> <td>/home/johnh</td> <td>/bin/bash</td> </tr>
52               <tr bgcolor="#f0f0f0"><td>greg</td> <td>*</td> <td>2275</td> <td>134</td> <td>Greg &lt; Lessthan</td> <td>/home/greg</td> <td>/bin/bash</td> </tr>
53               <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>
54               <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>
55               </table>
56
57   Command:
58           html_table_to_db
59
60   Output:
61               #fsdb -F S account passwd uid gid fullname homedir shell
62               johnh  *  2274  134  John & Ampersand  /home/johnh  /bin/bash
63               greg  *  2275  134  Greg < Lessthan  /home/greg  /bin/bash
64               root  *  0  0  Root ; Semi  /root  /bin/bash
65               four  *  1  1  Fourth Row  /home/four  /bin/bash
66

SEE ALSO

68       Fsdb.  db_to_html_table.
69
71       Copyright (C) 1991-2015 by John Heidemann <johnh@isi.edu>
72
73       This program is distributed under terms of the GNU general public
74       license, version 2.  See the file COPYING with the distribution for
75       details.
76
77
78
79perl v5.32.1                      2021-01-27               HTML_TABLE_TO_DB(1)
Impressum