summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-11 02:24:17 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-11 02:24:17 +0000
commit7636125d2b55ebeb8643af9af56da8e6c5ec509a (patch)
tree05ed5cd30a4a5d21d08bff777e3d45820e27fa2d
parent671ec7803a436565cd1f22c91cb071af9e5ba686 (diff)
automatic import of python-pdftotext
-rw-r--r--.gitignore1
-rw-r--r--python-pdftotext.spec306
-rw-r--r--sources1
3 files changed, 308 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..ef4c352 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pdftotext-2.2.2.tar.gz
diff --git a/python-pdftotext.spec b/python-pdftotext.spec
new file mode 100644
index 0000000..c568f60
--- /dev/null
+++ b/python-pdftotext.spec
@@ -0,0 +1,306 @@
+%global _empty_manifest_terminate_build 0
+Name: python-pdftotext
+Version: 2.2.2
+Release: 1
+Summary: Simple PDF text extraction
+License: MIT
+URL: https://github.com/jalan/pdftotext
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/e0/e3/79a2ad7ca71160fb6442772155389881672c98bd44c6022303ce242cbfb9/pdftotext-2.2.2.tar.gz
+BuildArch: noarch
+
+
+%description
+# pdftotext
+
+[![PyPI Status](https://img.shields.io/pypi/v/pdftotext.svg)](https://pypi.python.org/pypi/pdftotext)
+[![Azure Status](https://dev.azure.com/jalanpalmer/jalanpalmer/_apis/build/status/jalan.pdftotext?branchName=master)](https://dev.azure.com/jalanpalmer/jalanpalmer/_build/latest?definitionId=1&branchName=master)
+[![AppVeyor status](https://ci.appveyor.com/api/projects/status/uwcjxgu31kirkiuj/branch/master?svg=true)](https://ci.appveyor.com/project/jalan/pdftotext/branch/master)
+[![Coverage Status](https://coveralls.io/repos/github/jalan/pdftotext/badge.svg?branch=master)](https://coveralls.io/github/jalan/pdftotext?branch=master)
+[![Downloads](https://img.shields.io/pypi/dm/pdftotext.svg)](https://pypistats.org/packages/pdftotext)
+
+Simple PDF text extraction
+
+```python
+import pdftotext
+
+# Load your PDF
+with open("lorem_ipsum.pdf", "rb") as f:
+ pdf = pdftotext.PDF(f)
+
+# If it's password-protected
+with open("secure.pdf", "rb") as f:
+ pdf = pdftotext.PDF(f, "secret")
+
+# How many pages?
+print(len(pdf))
+
+# Iterate over all the pages
+for page in pdf:
+ print(page)
+
+# Read some individual pages
+print(pdf[0])
+print(pdf[1])
+
+# Read all the text into one string
+print("\n\n".join(pdf))
+```
+
+
+## OS Dependencies
+
+These instructions assume you're using Python 3 on a recent OS. Package names
+may differ for Python 2 or for an older OS.
+
+### Debian, Ubuntu, and friends
+
+```
+sudo apt install build-essential libpoppler-cpp-dev pkg-config python3-dev
+```
+
+### Fedora, Red Hat, and friends
+
+```
+sudo yum install gcc-c++ pkgconfig poppler-cpp-devel python3-devel
+```
+
+### macOS
+
+```
+brew install pkg-config poppler python
+```
+
+### Windows
+
+Currently tested only when using conda:
+
+ - Install the Microsoft Visual C++ Build Tools
+ - Install poppler through conda:
+ ```
+ conda install -c conda-forge poppler
+ ```
+
+
+## Install
+
+```
+pip install pdftotext
+```
+
+
+
+
+%package -n python3-pdftotext
+Summary: Simple PDF text extraction
+Provides: python-pdftotext
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-pdftotext
+# pdftotext
+
+[![PyPI Status](https://img.shields.io/pypi/v/pdftotext.svg)](https://pypi.python.org/pypi/pdftotext)
+[![Azure Status](https://dev.azure.com/jalanpalmer/jalanpalmer/_apis/build/status/jalan.pdftotext?branchName=master)](https://dev.azure.com/jalanpalmer/jalanpalmer/_build/latest?definitionId=1&branchName=master)
+[![AppVeyor status](https://ci.appveyor.com/api/projects/status/uwcjxgu31kirkiuj/branch/master?svg=true)](https://ci.appveyor.com/project/jalan/pdftotext/branch/master)
+[![Coverage Status](https://coveralls.io/repos/github/jalan/pdftotext/badge.svg?branch=master)](https://coveralls.io/github/jalan/pdftotext?branch=master)
+[![Downloads](https://img.shields.io/pypi/dm/pdftotext.svg)](https://pypistats.org/packages/pdftotext)
+
+Simple PDF text extraction
+
+```python
+import pdftotext
+
+# Load your PDF
+with open("lorem_ipsum.pdf", "rb") as f:
+ pdf = pdftotext.PDF(f)
+
+# If it's password-protected
+with open("secure.pdf", "rb") as f:
+ pdf = pdftotext.PDF(f, "secret")
+
+# How many pages?
+print(len(pdf))
+
+# Iterate over all the pages
+for page in pdf:
+ print(page)
+
+# Read some individual pages
+print(pdf[0])
+print(pdf[1])
+
+# Read all the text into one string
+print("\n\n".join(pdf))
+```
+
+
+## OS Dependencies
+
+These instructions assume you're using Python 3 on a recent OS. Package names
+may differ for Python 2 or for an older OS.
+
+### Debian, Ubuntu, and friends
+
+```
+sudo apt install build-essential libpoppler-cpp-dev pkg-config python3-dev
+```
+
+### Fedora, Red Hat, and friends
+
+```
+sudo yum install gcc-c++ pkgconfig poppler-cpp-devel python3-devel
+```
+
+### macOS
+
+```
+brew install pkg-config poppler python
+```
+
+### Windows
+
+Currently tested only when using conda:
+
+ - Install the Microsoft Visual C++ Build Tools
+ - Install poppler through conda:
+ ```
+ conda install -c conda-forge poppler
+ ```
+
+
+## Install
+
+```
+pip install pdftotext
+```
+
+
+
+
+%package help
+Summary: Development documents and examples for pdftotext
+Provides: python3-pdftotext-doc
+%description help
+# pdftotext
+
+[![PyPI Status](https://img.shields.io/pypi/v/pdftotext.svg)](https://pypi.python.org/pypi/pdftotext)
+[![Azure Status](https://dev.azure.com/jalanpalmer/jalanpalmer/_apis/build/status/jalan.pdftotext?branchName=master)](https://dev.azure.com/jalanpalmer/jalanpalmer/_build/latest?definitionId=1&branchName=master)
+[![AppVeyor status](https://ci.appveyor.com/api/projects/status/uwcjxgu31kirkiuj/branch/master?svg=true)](https://ci.appveyor.com/project/jalan/pdftotext/branch/master)
+[![Coverage Status](https://coveralls.io/repos/github/jalan/pdftotext/badge.svg?branch=master)](https://coveralls.io/github/jalan/pdftotext?branch=master)
+[![Downloads](https://img.shields.io/pypi/dm/pdftotext.svg)](https://pypistats.org/packages/pdftotext)
+
+Simple PDF text extraction
+
+```python
+import pdftotext
+
+# Load your PDF
+with open("lorem_ipsum.pdf", "rb") as f:
+ pdf = pdftotext.PDF(f)
+
+# If it's password-protected
+with open("secure.pdf", "rb") as f:
+ pdf = pdftotext.PDF(f, "secret")
+
+# How many pages?
+print(len(pdf))
+
+# Iterate over all the pages
+for page in pdf:
+ print(page)
+
+# Read some individual pages
+print(pdf[0])
+print(pdf[1])
+
+# Read all the text into one string
+print("\n\n".join(pdf))
+```
+
+
+## OS Dependencies
+
+These instructions assume you're using Python 3 on a recent OS. Package names
+may differ for Python 2 or for an older OS.
+
+### Debian, Ubuntu, and friends
+
+```
+sudo apt install build-essential libpoppler-cpp-dev pkg-config python3-dev
+```
+
+### Fedora, Red Hat, and friends
+
+```
+sudo yum install gcc-c++ pkgconfig poppler-cpp-devel python3-devel
+```
+
+### macOS
+
+```
+brew install pkg-config poppler python
+```
+
+### Windows
+
+Currently tested only when using conda:
+
+ - Install the Microsoft Visual C++ Build Tools
+ - Install poppler through conda:
+ ```
+ conda install -c conda-forge poppler
+ ```
+
+
+## Install
+
+```
+pip install pdftotext
+```
+
+
+
+
+%prep
+%autosetup -n pdftotext-2.2.2
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-pdftotext -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 2.2.2-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..6c3f35f
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+8814a3bdc5c9ad6bc6c3189914b597af pdftotext-2.2.2.tar.gz