# # spec file for package perl-HTML-TableExtract # # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: perl-HTML-TableExtract Version: 2.13 Release: 1.8 %define cpan_name HTML-TableExtract Summary: Perl module for extracting the content contained in tables within an HTM[cut] License: GPL-1.0+ or Artistic-1.0 Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/HTML-TableExtract/ Source0: http://www.cpan.org/authors/id/M/MS/MSISK/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(HTML::ElementTable) >= 1.16 BuildRequires: perl(HTML::Parser) Requires: perl(HTML::ElementTable) >= 1.16 Requires: perl(HTML::Parser) %{perl_requires} %description HTML::TableExtract is a subclass of HTML::Parser that serves to extract the information from tables of interest contained within an HTML document. The information from each extracted table is stored in table objects. Tables can be extracted as text, HTML, or HTML::ElementTable structures (for in-place editing or manipulation). There are currently four constraints available to specify which tables you would like to extract from a document: _Headers_, _Depth_, _Count_, and _Attributes_. _Headers_, the most flexible and adaptive of the techniques, involves specifying text in an array that you expect to appear above the data in the tables of interest. Once all headers have been located in a row of that table, all further cells beneath the columns that matched your headers are extracted. All other columns are ignored: think of it as vertical slices through a table. In addition, TableExtract automatically rearranges each row in the same order as the headers you provided. If you would like to disable this, set _automap_ to 0 during object creation, and instead rely on the column_map() method to find out the order in which the headers were found. Furthermore, TableExtract will automatically compensate for cell span issues so that columns are really the same columns as you would visually see in a browser. This behavior can be disabled by setting the _gridmap_ parameter to 0. HTML is stripped from the entire textual content of a cell before header matches are attempted -- unless the _keep_html_ parameter was enabled. _Depth_ and _Count_ are more specific ways to specify tables in relation to one another. _Depth_ represents how deeply a table resides in other tables. The depth of a top-level table in the document is 0. A table within a top-level table has a depth of 1, and so on. Each depth can be thought of as a layer; tables sharing the same depth are on the same layer. Within each of these layers, _Count_ represents the order in which a table was seen at that depth, starting with 0. Providing both a _depth_ and a _count_ will uniquely specify a table within a document. _Attributes_ match based on the attributes of the html