1Fsdb::Filter::html_tablUes_etro_Cdobn(t3r)ibuted Perl DoFcsudmbe:n:tFaitlitoenr::html_table_to_db(3)
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

CLASS FUNCTIONS

71   new
72           $filter = new Fsdb::Filter::csv_to_db(@arguments);
73
74       Create a new csv_to_db object, taking command-line arguments.
75
76   set_defaults
77           $filter->set_defaults();
78
79       Internal: set up defaults.
80
81   parse_options
82           $filter->parse_options(@ARGV);
83
84       Internal: parse command-line arguments.
85
86   setup
87           $filter->setup();
88
89       Internal: setup, parse headers.
90
91   run
92           $filter->run();
93
94       Internal: run over each rows.
95
97       Copyright (C) 1991-2015 by John Heidemann <johnh@isi.edu>
98
99       This program is distributed under terms of the GNU general public
100       license, version 2.  See the file COPYING with the distribution for
101       details.
102
103
104
105perl v5.34.1                      2022-04-04 Fsdb::Filter::html_table_to_db(3)
Impressum