From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVX9G-0004va-57 for guix-patches@gnu.org; Sun, 31 Dec 2017 01:31:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eVX9C-0003Av-U6 for guix-patches@gnu.org; Sun, 31 Dec 2017 01:31:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:49635) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eVX9C-00038D-Nl for guix-patches@gnu.org; Sun, 31 Dec 2017 01:31:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eVX9C-0008Gs-AH for guix-patches@gnu.org; Sun, 31 Dec 2017 01:31:02 -0500 Subject: [bug#29902] [PATCH] gnu: Add html-xml-utils. Resent-Message-ID: MIME-Version: 1.0 In-Reply-To: <151458121841.14489.3140405883925988155.stgit@sandburg> References: <151458121841.14489.3140405883925988155.stgit@sandburg> From: Catonano Date: Sun, 31 Dec 2017 07:30:17 +0100 Message-ID: Content-Type: multipart/alternative; boundary="f403045e94fcd1864305619cff28" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Stefan =?UTF-8?Q?Reich=C3=B6r?= Cc: 29902@debbugs.gnu.org --f403045e94fcd1864305619cff28 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Stefan ! Thanks for contributing ! I linted your patch and I get gnu/packages/xml.scm:1120:1: html-xml-utils@7.4: line 1153 is way too long (96 characters) Also, I couldn't run ./pre-inst-env guix build --rounds=3D2 html-xml-utils it just returns the store item as I had already built it without thinking :-/ Apart from this, I'd say it's ok It builds. I didn't try to run any of these commands. Can you suggest me a command line and a set of html files to test them ? Well this is just to be super scrupolous, anyway. If you say this works, I believe you So, as far as I'm concerned: lgtm ! 2017-12-29 22:00 GMT+01:00 Stefan Reich=C3=B6r : > * gnu/packages/xml.scm (html-xml-utils): New variable. > --- > gnu/packages/xml.scm | 54 ++++++++++++++++++++++++++++++ > ++++++++++++++++++++ > 1 file changed, 54 insertions(+) > > diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm > index 344d7c3..dde1964 100644 > --- a/gnu/packages/xml.scm > +++ b/gnu/packages/xml.scm > @@ -1116,6 +1116,60 @@ match and extract data, and elements can be added, > deleted or modified using > XSLT and EXSLT.") > (license license:x11))) > > +(define-public html-xml-utils > + (package > + (name "html-xml-utils") > + (version "7.4") > + (source > + (origin > + (method url-fetch) > + (uri (string-append > + "https://www.w3.org/Tools/HTML-XML-utils/html-xml-utils-" > + version ".tar.gz")) > + (sha256 > + (base32 > + "04pgrahsfawnzd9pilvirs05pfdgsd7qwvw4dvkb42rgybhw6h95")))) > + (build-system gnu-build-system) > + (home-page "https://www.w3.org/Tools/HTML-XML-utils/") > + (synopsis "Command line utilities to manipulate HTML and XML files") > + (description "HTML-XML-utils provides a number of simple utilities fo= r > +manipulating and converting HTML and XML files in various ways. The sui= te > +consists of the following tools: > + > +@itemize > + @item @command{asc2xml} convert from @code{UTF-8} to @code{&#nnn;} > entities > + @item @command{xml2asc} convert from @code{&#nnn;} entities to > @code{UTF-8} > + @item @command{hxaddid} add IDs to selected elements > + @item @command{hxcite} replace bibliographic references by hyperlinks > + @item @command{hxcite} mkbib - expand references and create bibliograph= y > + @item @command{hxclean} apply heuristics to correct an HTML file > + @item @command{hxcopy} copy an HTML file while preserving relative link= s > + @item @command{hxcount} count elements and attributes in HTML or XML > files > + @item @command{hxextract} extract selected elements > + @item @command{hxincl} expand included HTML or XML files > + @item @command{hxindex} create an alphabetically sorted index > + @item @command{hxmkbib} create bibliography from a template > + @item @command{hxmultitoc} create a table of contents for a set of HTML > files > + @item @command{hxname2id} move some @code{ID=3D} or @code{NAME=3D} from= A > elements to their parents > + @item @command{hxnormalize} pretty-print an HTML file > + @item @command{hxnsxml} convert output of hxxmlns back to normal XML > + @item @command{hxnum} number section headings in an HTML file > + @item @command{hxpipe} convert XML to a format easier to parse with Per= l > or AWK > + @item @command{hxprintlinks} number links and add table of URLs at end > of an HTML file > + @item @command{hxprune} remove marked elements from an HTML file > + @item @command{hxref} generate cross-references > + @item @command{hxselect} extract elements that match a (CSS) selector > + @item @command{hxtoc} insert a table of contents in an HTML file > + @item @command{hxuncdata} replace CDATA sections by character entities > + @item @command{hxunent} replace HTML predefined character entities to > @code{UTF-8} > + @item @command{hxunpipe} convert output of pipe back to XML format > + @item @command{hxunxmlns} replace \"global names\" by XML Namespace > prefixes > + @item @command{hxwls} list links in an HTML file > + @item @command{hxxmlns} replace XML Namespace prefixes by \"global > names\" > +@end itemize > +") > + (license license:expat))) > + > (define-public xlsx2csv > (package > (name "xlsx2csv") > > > > > --f403045e94fcd1864305619cff28 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Stefan !

Thanks for contrib= uting !

I linted your patch and I get

gnu/packages/xml.= scm:1120:1: html-xml-utils@7.4: line 1153 is way too long (96 characters)
Also, I couldn't run

./pre-inst-env guix build --roun= ds=3D2 html-xml-utils

it just returns the store item as I= had already built it without thinking :-/

Apart from this, I'd say it's ok

It builds. I = didn't try to run any of these commands.

Can you sugg= est me a command line and a set of html files to test them ?

<= div>Well this is just to be super scrupolous, anyway. If you say this works= , I believe you

So, as far as I'm concerned: lgtm !

2017-12-29 22:00 GMT+01:00 Stefan Reich=C3=B6r <stefan@xsteve.at>:
* gnu/packages/xml.scm (html-xml-u= tils): New variable.
---
=C2=A0gnu/packages/xml.scm |=C2=A0 =C2=A054 ++++++++++++++++++++++++++++++<= wbr>++++++++++++++++++++
=C2=A01 file changed, 54 insertions(+)

diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 344d7c3..dde1964 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -1116,6 +1116,60 @@ match and extract data, and elements can be added, d= eleted or modified using
=C2=A0XSLT and EXSLT.")
=C2=A0 =C2=A0 (license license:x11)))

+(define-public html-xml-utils
+ (package
+=C2=A0 =C2=A0(name "html-xml-utils")
+=C2=A0 =C2=A0(version "7.4")
+=C2=A0 =C2=A0(source
+=C2=A0 =C2=A0 (origin
+=C2=A0 =C2=A0 =C2=A0 (method url-fetch)
+=C2=A0 =C2=A0 =C2=A0 (uri (string-append
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "https://www.w3.org/Tools/HTML-XML-utils/html-xml-utils-&q= uot;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 version ".tar.gz")) +=C2=A0 =C2=A0 =C2=A0 (sha256
+=C2=A0 =C2=A0 =C2=A0 =C2=A0(base32
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 "04pgrahsfawnzd9pilvirs05pfdgsd= 7qwvw4dvkb42rgybhw6h95"))))
+=C2=A0 =C2=A0(build-system gnu-build-system)
+=C2=A0 =C2=A0(home-page "https://www.w3.org/Tools/HTML-XML-utils/")
+=C2=A0 =C2=A0(synopsis "Command line utilities to manipulate HTML and= XML files")
+=C2=A0 =C2=A0(description "HTML-XML-utils provides a number of simple= utilities for
+manipulating and converting HTML and XML files in various ways.=C2=A0 The = suite
+consists of the following tools:
+
+@itemize
+ @item @command{asc2xml} convert from @code{UTF-8} to @code{&#nnn;} en= tities
+ @item @command{xml2asc} convert from @code{&#nnn;} entities to @code{= UTF-8}
+ @item @command{hxaddid} add IDs to selected elements
+ @item @command{hxcite} replace bibliographic references by hyperlinks
+ @item @command{hxcite} mkbib - expand references and create bibliography<= br> + @item @command{hxclean} apply heuristics to correct an HTML file
+ @item @command{hxcopy} copy an HTML file while preserving relative links<= br> + @item @command{hxcount} count elements and attributes in HTML or XML file= s
+ @item @command{hxextract} extract selected elements
+ @item @command{hxincl} expand included HTML or XML files
+ @item @command{hxindex} create an alphabetically sorted index
+ @item @command{hxmkbib} create bibliography from a template
+ @item @command{hxmultitoc} create a table of contents for a set of HTML f= iles
+ @item @command{hxname2id} move some @code{ID=3D} or @code{NAME=3D} from A= elements to their parents
+ @item @command{hxnormalize} pretty-print an HTML file
+ @item @command{hxnsxml} convert output of hxxmlns back to normal XML
+ @item @command{hxnum} number section headings in an HTML file
+ @item @command{hxpipe} convert XML to a format easier to parse with Perl = or AWK
+ @item @command{hxprintlinks} number links and add table of URLs at end of= an HTML file
+ @item @command{hxprune} remove marked elements from an HTML file
+ @item @command{hxref} generate cross-references
+ @item @command{hxselect} extract elements that match a (CSS) selector
+ @item @command{hxtoc} insert a table of contents in an HTML file
+ @item @command{hxuncdata} replace CDATA sections by character entities + @item @command{hxunent} replace HTML predefined character entities to @co= de{UTF-8}
+ @item @command{hxunpipe} convert output of pipe back to XML format
+ @item @command{hxunxmlns} replace \"global names\" by XML Names= pace prefixes
+ @item @command{hxwls} list links in an HTML file
+ @item @command{hxxmlns} replace XML Namespace prefixes by \"global n= ames\"
+@end itemize
+")
+=C2=A0 =C2=A0(license license:expat)))
+
=C2=A0(define-public xlsx2csv
=C2=A0 =C2=A0(package
=C2=A0 =C2=A0 =C2=A0(name "xlsx2csv")





--f403045e94fcd1864305619cff28--