Hello community,
here is the log from the commit of package perl-Spreadsheet-Read for
openSUSE:Factory checked in at 2019-07-11 13:07:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Spreadsheet-Read (Old)
and /work/SRC/openSUSE:Factory/.perl-Spreadsheet-Read.new.4615 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Spreadsheet-Read"
Thu Jul 11 13:07:30 2019 rev:15 rq:686436 version:0.80
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-Spreadsheet-Read/perl-Spreadsheet-Read.changes
2018-09-24 13:12:11.317819746 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Spreadsheet-Read.new.4615/perl-Spreadsheet-Read.changes
2019-07-11 13:07:31.787018740 +0200
@@ -1,0 +2,10 @@
+Tue Mar 19 08:46:55 UTC 2019 - [email protected] - 0.80
+
+- update to 0.80
+ * Raise Spreadsheet::ParseXLSX minimum version to 0.24
+ * Improve docs on attributes
+ * Add attribute accessors
+- add BuildRequires for Spreadsheet::ParseExcel, Text::CSV_PP,
+ Spreadsheet::ParseXLSX and Text::CSV_XS to run all tests
+
+-------------------------------------------------------------------
Old:
----
Spreadsheet-Read-0.79.tgz
New:
----
Spreadsheet-Read-0.80.tgz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Spreadsheet-Read.spec ++++++
--- /var/tmp/diff_new_pack.qDw3G9/_old 2019-07-11 13:07:32.335018514 +0200
+++ /var/tmp/diff_new_pack.qDw3G9/_new 2019-07-11 13:07:32.343018510 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-Spreadsheet-Read
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 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
@@ -12,12 +12,12 @@
# 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/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: perl-Spreadsheet-Read
-Version: 0.79
+Version: 0.80
Release: 0
%define cpan_name Spreadsheet-Read
Summary: Read the data from a spreadsheet
@@ -34,8 +34,12 @@
BuildRequires: perl(Data::Peek)
BuildRequires: perl(File::Temp) >= 0.22
BuildRequires: perl(IO::Scalar)
+BuildRequires: perl(Spreadsheet::ParseExcel)
+BuildRequires: perl(Spreadsheet::ParseXLSX) >= 0.24
BuildRequires: perl(Test::More) >= 0.88
BuildRequires: perl(Test::NoWarnings)
+BuildRequires: perl(Text::CSV_PP)
+BuildRequires: perl(Text::CSV_XS)
Requires: perl(Data::Peek)
Requires: perl(File::Temp) >= 0.22
Requires: perl(IO::Scalar)
@@ -47,7 +51,7 @@
Recommends: perl(Test::More) >= 1.302086
Recommends: perl(Spreadsheet::ReadSXC)
Recommends: perl(Spreadsheet::ParseExcel)
-Recommends: perl(Spreadsheet::ParseXLSX)
+Recommends: perl(Spreadsheet::ParseXLSX) >= 0.24
Recommends: perl(Text::CSV_XS)
Recommends: perl(Text::CSV_PP)
%{perl_requires}
++++++ Spreadsheet-Read-0.79.tgz -> Spreadsheet-Read-0.80.tgz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Spreadsheet-Read-0.79/Changes
new/Spreadsheet-Read-0.80/Changes
--- old/Spreadsheet-Read-0.79/Changes 2018-08-29 10:31:25.000000000 +0200
+++ new/Spreadsheet-Read-0.80/Changes 2018-12-31 13:39:55.000000000 +0100
@@ -1,3 +1,8 @@
+0.80 - 31 Dec 2018, H.Merijn Brand
+ * Raise Spreadsheet::ParseXLSX minimum version to 0.24
+ * Improve docs on attributes
+ * Add attribute accessors
+
0.79 - 29 Aug 2018, H.Merijn Brand
* Environmant control hardening
* ReadData () docs (opening from scalar ref: issue#21)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Spreadsheet-Read-0.79/META.json
new/Spreadsheet-Read-0.80/META.json
--- old/Spreadsheet-Read-0.79/META.json 2018-08-29 17:33:14.000000000 +0200
+++ new/Spreadsheet-Read-0.80/META.json 2018-12-31 14:22:07.000000000 +0100
@@ -1,22 +1,25 @@
{
- "resources" : {
- "repository" : {
- "web" : "https://github.com/Tux/Spreadsheet-Read",
- "url" : "https://github.com/Tux/Spreadsheet-Read",
- "type" : "git"
- },
- "license" : [
- "http://dev.perl.org/licenses/"
- ]
- },
- "dynamic_config" : 1,
- "license" : [
- "perl_5"
- ],
"author" : [
"H.Merijn Brand <[email protected]>"
],
+ "name" : "Spreadsheet-Read",
+ "dynamic_config" : 1,
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : 2
+ },
+ "release_status" : "stable",
"prereqs" : {
+ "test" : {
+ "requires" : {
+ "Test::NoWarnings" : "0",
+ "Test::Harness" : "0",
+ "Test::More" : "0.88"
+ },
+ "recommends" : {
+ "Test::More" : "1.302141"
+ }
+ },
"runtime" : {
"recommends" : {
"IO::Scalar" : "0",
@@ -24,77 +27,55 @@
"Data::Peek" : "0.48"
},
"requires" : {
- "perl" : "5.008001",
- "Encode" : "0",
+ "Carp" : "0",
+ "File::Temp" : "0.22",
"Data::Peek" : "0",
+ "Encode" : "0",
+ "perl" : "5.008001",
"Exporter" : "0",
- "Data::Dumper" : "0",
- "File::Temp" : "0.22",
- "Carp" : "0"
+ "Data::Dumper" : "0"
}
},
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "0"
}
- },
- "test" : {
- "recommends" : {
- "Test::More" : "1.302140"
- },
- "requires" : {
- "Test::More" : "0.88",
- "Test::NoWarnings" : "0",
- "Test::Harness" : "0"
- }
}
},
- "provides" : {
- "Spreadsheet::Read" : {
- "version" : "0.79",
- "file" : "Read.pm"
+ "abstract" : "Meta-Wrapper for reading spreadsheet data",
+ "resources" : {
+ "license" : [
+ "http://dev.perl.org/licenses/"
+ ],
+ "repository" : {
+ "type" : "git",
+ "web" : "https://github.com/Tux/Spreadsheet-Read",
+ "url" : "https://github.com/Tux/Spreadsheet-Read"
}
},
- "abstract" : "Meta-Wrapper for reading spreadsheet data",
"generated_by" : "Author",
- "meta-spec" : {
- "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
- "version" : 2
- },
- "version" : "0.79",
- "release_status" : "stable",
"optional_features" : {
- "opt_excelx" : {
- "description" : "Provides parsing of Microsoft Excel 2007 files",
+ "opt_excel" : {
"prereqs" : {
"runtime" : {
"requires" : {
- "Spreadsheet::ParseXLSX" : "0.13",
+ "Spreadsheet::ParseExcel" : "0.34",
"Spreadsheet::ParseExcel::FmtDefault" : "0"
},
"recommends" : {
- "Spreadsheet::ParseXLSX" : "0.27"
- }
- }
- }
- },
- "opt_oo" : {
- "description" : "Provides parsing of OpenOffice spreadsheets",
- "prereqs" : {
- "runtime" : {
- "requires" : {
- "Spreadsheet::ReadSXC" : "0.20"
+ "Spreadsheet::ParseExcel" : "0.65"
}
}
- }
+ },
+ "description" : "Provides parsing of Microsoft Excel files"
},
"opt_csv" : {
"prereqs" : {
"runtime" : {
"recommends" : {
"Text::CSV" : "1.97",
- "Text::CSV_PP" : "1.97",
- "Text::CSV_XS" : "1.36"
+ "Text::CSV_XS" : "1.38",
+ "Text::CSV_PP" : "1.97"
},
"requires" : {
"Text::CSV_XS" : "0.71"
@@ -103,32 +84,51 @@
},
"description" : "Provides parsing of CSV streams"
},
- "opt_excel" : {
+ "opt_excelx" : {
"prereqs" : {
"runtime" : {
- "recommends" : {
- "Spreadsheet::ParseExcel" : "0.65"
- },
"requires" : {
- "Spreadsheet::ParseExcel" : "0.34",
- "Spreadsheet::ParseExcel::FmtDefault" : "0"
+ "Spreadsheet::ParseExcel::FmtDefault" : "0",
+ "Spreadsheet::ParseXLSX" : "0.24"
+ },
+ "recommends" : {
+ "Spreadsheet::ParseXLSX" : "0.27"
}
}
},
- "description" : "Provides parsing of Microsoft Excel files"
+ "description" : "Provides parsing of Microsoft Excel 2007 files"
+ },
+ "opt_oo" : {
+ "description" : "Provides parsing of OpenOffice spreadsheets",
+ "prereqs" : {
+ "runtime" : {
+ "requires" : {
+ "Spreadsheet::ReadSXC" : "0.20"
+ }
+ }
+ }
},
"opt_tools" : {
+ "description" : "Spreadsheet tools",
"prereqs" : {
"runtime" : {
"recommends" : {
"Tk::TableMatrix::Spreadsheet" : "0",
- "Tk" : "804.034",
- "Tk::NoteBook" : "0"
+ "Tk::NoteBook" : "0",
+ "Tk" : "804.034"
}
}
- },
- "description" : "Spreadsheet tools"
+ }
}
},
- "name" : "Spreadsheet-Read"
+ "version" : "0.80",
+ "provides" : {
+ "Spreadsheet::Read" : {
+ "file" : "Read.pm",
+ "version" : "0.80"
+ }
+ },
+ "license" : [
+ "perl_5"
+ ]
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Spreadsheet-Read-0.79/META.yml
new/Spreadsheet-Read-0.80/META.yml
--- old/Spreadsheet-Read-0.79/META.yml 2018-08-29 17:33:14.000000000 +0200
+++ new/Spreadsheet-Read-0.80/META.yml 2018-12-31 14:22:07.000000000 +0100
@@ -25,7 +25,7 @@
description: Provides parsing of Microsoft Excel 2007 files
requires:
Spreadsheet::ParseExcel::FmtDefault: 0
- Spreadsheet::ParseXLSX: '0.13'
+ Spreadsheet::ParseXLSX: '0.24'
opt_oo:
description: Provides parsing of OpenOffice spreadsheets
requires:
@@ -35,12 +35,12 @@
provides:
Spreadsheet::Read:
file: Read.pm
- version: '0.79'
+ version: '0.80'
recommends:
Data::Peek: '0.48'
File::Temp: '0.2308'
IO::Scalar: 0
- Test::More: '1.302140'
+ Test::More: '1.302141'
requires:
Carp: 0
Data::Dumper: 0
@@ -55,4 +55,4 @@
resources:
license: http://dev.perl.org/licenses/
repository: https://github.com/Tux/Spreadsheet-Read
-version: '0.79'
+version: '0.80'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Spreadsheet-Read-0.79/Makefile.PL
new/Spreadsheet-Read-0.80/Makefile.PL
--- old/Spreadsheet-Read-0.79/Makefile.PL 2018-03-30 16:53:33.000000000
+0200
+++ new/Spreadsheet-Read-0.80/Makefile.PL 2018-08-30 09:30:46.000000000
+0200
@@ -58,8 +58,8 @@
if ($ENV{EXTENDED_TESTING}) { # for CpanCover and masochists
# Backend parsers, all optional
# Versions also need to be declared inside Read.pm !
- $wm{PREREQ_PM}{"Text::CSV_PP"} = "1.95";
- $wm{PREREQ_PM}{"Text::CSV_XS"} = "1.29";
+ $wm{PREREQ_PM}{"Text::CSV_PP"} = "1.97";
+ $wm{PREREQ_PM}{"Text::CSV_XS"} = "1.36";
$wm{PREREQ_PM}{"Spreadsheet::ReadSXC"} = "0.20";
$wm{PREREQ_PM}{"Spreadsheet::ParseExcel"} = "0.65";
$wm{PREREQ_PM}{"Spreadsheet::ParseXLSX"} = "0.27";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Spreadsheet-Read-0.79/Read.pm
new/Spreadsheet-Read-0.80/Read.pm
--- old/Spreadsheet-Read-0.79/Read.pm 2018-08-29 10:38:35.000000000 +0200
+++ new/Spreadsheet-Read-0.80/Read.pm 2018-12-28 13:26:03.000000000 +0100
@@ -36,7 +36,7 @@
use strict;
use warnings;
-our $VERSION = "0.79";
+our $VERSION = "0.80";
sub Version { $VERSION }
use Carp;
@@ -56,7 +56,7 @@
[ ods => "Spreadsheet::ReadSXC", "0.20" ],
[ sxc => "Spreadsheet::ReadSXC", "0.20" ],
[ xls => "Spreadsheet::ParseExcel", "0.34" ],
- [ xlsx => "Spreadsheet::ParseXLSX", "0.13"
],
+ [ xlsx => "Spreadsheet::ParseXLSX", "0.24"
],
[ xlsx => "Spreadsheet::XLSX", "0.13" ],
[ prl => "Spreadsheet::Perl", "" ],
@@ -1007,6 +1007,17 @@
return $book;
} # add
+package Spreadsheet::Read::Attribute;
+
+use Carp;
+use vars qw( $AUTOLOAD );
+
+sub AUTOLOAD {
+ my $self = shift;
+ (my $attr = $AUTOLOAD) =~ s/.*:://;
+ $self->{$attr};
+ } # AUTOLOAD
+
package Spreadsheet::Read::Sheet;
sub cell {
@@ -1019,11 +1030,12 @@
sub attr {
my ($sheet, @id) = @_;
+ my $class = "Spreadsheet::Read::Attribute";
@id == 2 && $id[0] =~ m/^[0-9]+$/ && $id[1] =~ m/^[0-9]+$/ and
- return $sheet->{attr}[$id[0]][$id[1]];
+ return bless $sheet->{attr}[$id[0]][$id[1]] => $class;
if (@id && $id[0] && exists $sheet->{$id[0]}) {
my ($c, $r) = $sheet->cell2cr ($id[0]);
- return $sheet->{attr}[$c][$r];
+ return bless $sheet->{attr}[$c][$r] => $class;
}
undef;
} # attr
@@ -1632,10 +1644,14 @@
my $ss = Spreadsheet::Read->new ("/some/place/test.csv", label => "Test");
=head2 Cell Attributes
-X<merged>
+X<attr>
+
+If the constructor was called with C<attr> having a true value,
+
+ my $book = ReadData ("book.xls", attr => 1);
+ my $book = Spreadsheet::Read->new ("book.xlsx", attr => 1);
-If the constructor was called with C<attr> having a true value, effort
-is made to analyze and store field attributes like this:
+effort is made to analyze and store field attributes like this:
{ label => "Sheet 1",
maxrow => 5,
@@ -1686,6 +1702,8 @@
B5 => "Nugget",
},
+The entries C<maxrow> and C<maxcol> are 1-based.
+
This has now been partially implemented, mainly for Excel, as the other
parsers do not (yet) support all of that. YMMV.
@@ -1693,9 +1711,20 @@
either the row or the column (or both) the field is in is hidden, the flag
is inherited into the cell attributes.
-The entries C<maxrow> and C<maxcol> are 1-based.
+You can get the attributes of a cell (as a hash-ref) like this:
+
+ my $attr = $book[1]{attr}[1][3]; # Direct structure
+ my $attr = $book->sheet (1)->attr (1, 3); # Same using OO
+ my $attr = $book->sheet (1)->attr ("A3"); # Same using OO
+
+To get to the C<font> attribute, use any of these:
+
+ my $font = $book[1]{attr}[1][3]{font};
+ my $font = $book->sheet (1)->attr (1, 3)->{font};
+ my $font = $book->sheet (1)->attr ("A3")->font;
=head3 Merged cells
+X<merged>
Note that only
L<Spreadsheet::ReadSXC|https://metacpan.org/release/Spreadsheet-ReadSXC>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Spreadsheet-Read-0.79/t/36_xls.t
new/Spreadsheet-Read-0.80/t/36_xls.t
--- old/Spreadsheet-Read-0.79/t/36_xls.t 2018-01-23 15:52:17.000000000
+0100
+++ new/Spreadsheet-Read-0.80/t/36_xls.t 2018-12-28 13:22:44.000000000
+0100
@@ -9,7 +9,7 @@
use Spreadsheet::Read;
my $parser;
if ($parser = Spreadsheet::Read::parses ("xls")) {
- plan tests => 179;
+ plan tests => 188;
Test::NoWarnings->import;
}
else {
@@ -159,6 +159,17 @@
is ($xls->sheet (1)->attr ("A1")->{type}, "text", "Attr through method A1");
is ($xls->sheet (1)->attr (2, 2)->{type}, "text", "Attr through method B2");
+ok ($xls = Spreadsheet::Read->new ("files/attr.xls", attr => 1), "Attributes
OO");
+is ($xls->[1]{attr}[3][3]{fgcolor}, "#008000", "C3 Forground color
direct");
+is ($xls->sheet (1)->attr (3, 3)->{fgcolor}, "#008000", "C3 Forground color
OO rc hash");
+is ($xls->sheet (1)->attr ("C3")->{fgcolor}, "#008000", "C3 Forground color
OO cell hash");
+is ($xls->sheet (1)->attr (3, 3)->fgcolor, "#008000", "C3 Forground color
OO rc method");
+is ($xls->sheet (1)->attr ("C3")->fgcolor, "#008000", "C3 Forground color
OO cell method");
+
+is ($xls->[1]{attr}[3][3]{bogus_attribute}, undef, "C3 bogus attribute
direct");
+is ($xls->sheet (1)->attr ("C3")->{bogus_attr}, undef, "C3 bogus
attribute OO hash");
+is ($xls->sheet (1)->attr ("C3")->bogus_attr, undef, "C3 bogus attribute OO
method");
+
__END__
--- PM 2005-09-15 14:16:36.163623616 +0200
+++ PM 2005-09-15 14:11:56.289171000 +0200
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Spreadsheet-Read-0.79/t/611_clr.t
new/Spreadsheet-Read-0.80/t/611_clr.t
--- old/Spreadsheet-Read-0.79/t/611_clr.t 2015-08-16 12:06:15.000000000
+0200
+++ new/Spreadsheet-Read-0.80/t/611_clr.t 2018-12-28 13:32:27.000000000
+0100
@@ -5,7 +5,7 @@
BEGIN { $ENV{SPREADSHEET_READ_XLSX} = "Spreadsheet::ParseXLSX"; }
-my $tests = 257;
+my $tests = 266;
use Test::More;
require Test::NoWarnings;
@@ -49,6 +49,17 @@
}
}
+ok ($xls = Spreadsheet::Read->new ("files/attr.xlsx", attr => 1), "Attributes
OO");
+is ($xls->[1]{attr}[3][3]{fgcolor}, "#008000", "C3 Forground color
direct");
+is ($xls->sheet (1)->attr (3, 3)->{fgcolor}, "#008000", "C3 Forground color
OO rc hash");
+is ($xls->sheet (1)->attr ("C3")->{fgcolor}, "#008000", "C3 Forground color
OO cell hash");
+is ($xls->sheet (1)->attr (3, 3)->fgcolor, "#008000", "C3 Forground color
OO rc method");
+is ($xls->sheet (1)->attr ("C3")->fgcolor, "#008000", "C3 Forground color
OO cell method");
+
+is ($xls->[1]{attr}[3][3]{bogus_attribute}, undef, "C3 bogus attribute
direct");
+is ($xls->sheet (1)->attr ("C3")->{bogus_attr}, undef, "C3 bogus
attribute OO hash");
+is ($xls->sheet (1)->attr ("C3")->bogus_attr, undef, "C3 bogus attribute OO
method");
+
unless ($ENV{AUTOMATED_TESTING}) {
Test::NoWarnings::had_no_warnings ();
$tests++;