From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 4K3hEvpl4F9ZbAAA0tVLHw (envelope-from ) for ; Mon, 21 Dec 2020 09:08:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id YH+jDvpl4F/NMwAAbx9fmQ (envelope-from ) for ; Mon, 21 Dec 2020 09:08:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9E3F29404C5 for ; Mon, 21 Dec 2020 09:08:09 +0000 (UTC) Received: from localhost ([::1]:54452 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krHAm-0006GP-Cj for larch@yhetil.org; Mon, 21 Dec 2020 04:08:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krHAg-0006GE-Da for guix-patches@gnu.org; Mon, 21 Dec 2020 04:08:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34723) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krHAg-0001Qe-1H for guix-patches@gnu.org; Mon, 21 Dec 2020 04:08:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1krHAf-00042f-Ru for guix-patches@gnu.org; Mon, 21 Dec 2020 04:08:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45232] [PATCH] gnu: Add python-pdftotext. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 21 Dec 2020 09:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45232 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Z572 <873216071@qq.com> Received: via spool by 45232-submit@debbugs.gnu.org id=B45232.160854168015530 (code B ref 45232); Mon, 21 Dec 2020 09:08:01 +0000 Received: (at 45232) by debbugs.gnu.org; 21 Dec 2020 09:08:00 +0000 Received: from localhost ([127.0.0.1]:46269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1krHAd-00042Q-PT for submit@debbugs.gnu.org; Mon, 21 Dec 2020 04:08:00 -0500 Received: from flashner.co.il ([178.62.234.194]:50764) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1krHAb-00042C-Dq for 45232@debbugs.gnu.org; Mon, 21 Dec 2020 04:07:58 -0500 Received: from localhost (unknown [5.102.238.249]) by flashner.co.il (Postfix) with ESMTPSA id 3CF44402D3; Mon, 21 Dec 2020 09:07:49 +0000 (UTC) Date: Mon, 21 Dec 2020 11:07:45 +0200 From: Efraim Flashner Message-ID: References: <875z55qcvi.fsf@qq.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="670+PPkSAjgv/D/p" Content-Disposition: inline In-Reply-To: <875z55qcvi.fsf@qq.com> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 45232@debbugs.gnu.org Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.92 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 9E3F29404C5 X-Spam-Score: -3.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: V4FXCQPEK7wH --670+PPkSAjgv/D/p Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable This looks good, I've been looking for more options for viewing test =66rom PDFs. A couple of comments inline in the patch: On Mon, Dec 14, 2020 at 11:34:41AM +0800, Z572 wrote: > diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm > index a06f351aae..817c6a27c8 100644 > --- a/gnu/packages/pdf.scm > +++ b/gnu/packages/pdf.scm > @@ -21,6 +21,7 @@ > ;;; Copyright =C2=A9 2020 Michael Rohleder > ;;; Copyright =C2=A9 2020 Timotej Lazar > ;;; Copyright =C2=A9 2020 Maxim Cournoyer > +;;; Copyright =C2=A9 2020 Zheng Junjie <873216071@qq.com> > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -309,6 +310,25 @@ When present, Poppler is able to correctly render CJ= K and Cyrillic text.") > Poppler PDF rendering library.") > (license license:lgpl2.1+))) > =20 > +(define python-pdftotext This should be define-public, otherwise we won't be able to find the package. Also, this looks like you can rename it to just pdftotext, the python part of the name doesn't look necessary to me. > + (package > + (name "python-pdftotext") > + (version "2.1.5") > + (source > + (origin > + (method url-fetch) > + (uri (pypi-uri "pdftotext" version)) > + (sha256 > + (base32 > + "19la1cw1hmkcr8big04gm2dd5fw0y0z97g930aiy29s1gaqbiblq")))) > + (build-system python-build-system) > + (propagated-inputs > + `(("poppler" ,poppler))) This shouldn't be propagated. If the output references poppler than a regular input is fine. If it doesn't then the source should be patched to use the package from the store. > + (home-page "https://github.com/jalan/pdftotext") > + (synopsis "Simple PDF text extraction") > + (description "Simple PDF text extraction") This should be a full sentence. > + (license license:expat))) > + > (define-public libharu > (package > (name "libharu") >=20 >=20 >=20 --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --670+PPkSAjgv/D/p Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl/gZd4ACgkQQarn3Mo9 g1FcDQ/9EnNL3ADz9CQ3NjxGq1jc2nc2zz1MRLFMWkTRqtxZKOiDjXh8f5SDvDyA CnSQVngb6PGDtEsC+DC+cjKBNj9p2wNO+cBfDGchSVvr0dhp99je6ZwNzy8IVn65 gC1j90fDB+00hqSdGnuVfd1WQFLAVFokAIqDzaOjeySlaYmWt7cis6Q9WJn3vunV jaj05vGcn5LHTKzQAk1rg9dJVrnA3U7MreO+KVPujjD1ti3G6pSHfk7Tl5d7Jd5Z 4z85sQ7dMt0zv6vlPnpZVYfdVbC3bsrVF3w5wNAtsiJFqQzXPv/aTZKOwlPf29+O lU+gSs8Pqj5lAeOvWiZzYmPoFn662wQteE8p9lOSn7dnoIvNIqiFoPWzRdaXgj9k qhiSOh0iavFWxsCQNa9nyS/E9LWvVo5RvHpkTkGPGYQkH4O9HVD41S36TIUUw6JQ YTzr7NxvHmf4TEnXprP5zEVeiRfj78x3dPMhSt9Zk5v1eQLsALLbMxfvzxTa0IJr kHpbpSI7GzWh72Cky2xjfncg/3GtbRcZhr7QAj1RH+xaxfVIstLn2G2V6W5hhVtg Sd1IyjMUHJQLLQpsBpedCImS9qNjr9mjbMaW/3xYx8ApkSPqVnBW76yjlpS0DpSV s92ufVrTVD8QG45wffigDpW22CRWCb3mRPfKVxuzA6bsXKfpcs4= =J0t4 -----END PGP SIGNATURE----- --670+PPkSAjgv/D/p--