• 大小: 17.31MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-26
  • 语言: Python
  • 标签:

资源简介

Camelot: 一个可以轻松地从PDF文件中提取表格的Python库

资源截图

代码片段和文件信息

# -*- coding: utf-8 -*-

import os
from setuptools import find_packages


here = os.path.abspath(os.path.dirname(__file__))
about = {}
with open(os.path.join(here ‘camelot‘ ‘__version__.py‘) ‘r‘) as f:
    exec(f.read() about)

with open(‘README.md‘ ‘r‘) as f:
    readme = f.read()


requires = [
    ‘chardet>=3.0.4‘
    ‘click>=6.7‘
    ‘numpy>=1.13.3‘
    ‘openpyxl>=2.5.8‘
    ‘pandas>=0.23.4‘
    ‘pdfminer.six>=20170720‘
    ‘PyPDF2>=1.26.0‘
]

cv_requires = [
    ‘opencv-python>=3.4.2.17‘
]

plot_requires = [
    ‘matplotlib>=2.2.3‘
]

dev_requires = [
    ‘codecov>=2.0.15‘
    ‘pytest>=3.8.0‘
    ‘pytest-cov>=2.6.0‘
    ‘pytest-mpl>=0.10‘
    ‘pytest-runner>=4.2‘
    ‘Sphinx>=1.7.9‘
]

all_requires = cv_requires + plot_requires
dev_requires = dev_requires + all_requires


def setup_package():
    metadata = dict(name=about[‘__title__‘]
                    version=about[‘__version__‘]
                    description=about[‘__description__‘]
                    long_description=readme
                    long_description_content_type=“text/markdown“
                    url=about[‘__url__‘]
                    author=about[‘__author__‘]
                    author_email=about[‘__author_email__‘]
                    license=about[‘__license__‘]
                    packages=find_packages(exclude=(‘tests‘))
                    install_requires=requires
                    extras_require={
                        ‘all‘: all_requires
                        ‘cv‘: cv_requires
                        ‘dev‘: dev_requires
                        ‘plot‘: plot_requires
                    }
                    entry_points={
                        ‘console_scripts‘: [
                            ‘camelot = camelot.cli:cli‘
                        ]
                    }
                    classifiers=[
                        # Trove classifiers
                        # Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
                        ‘License :: OSI Approved :: MIT License‘
                        ‘Programming Language :: Python :: 2.7‘
                        ‘Programming Language :: Python :: 3.5‘
                        ‘Programming Language :: Python :: 3.6‘
                        ‘Programming Language :: Python :: 3.7‘
                    ])

    try:
        from setuptools import setup
    except ImportError:
        from distutils.core import setup

    setup(**metadata)


if __name__ == ‘__main__‘:
    setup_package()

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\
     文件          41  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\.coveragerc
     文件         123  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\.editorconfig
     文件         125  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\.gitignore
     文件         525  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\.travis.yml
     文件         112  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\CODE_OF_CONDUCT.md
     文件        6860  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\CONTRIBUTING.md
     文件       10344  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\HISTORY.md
     文件        1087  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\LICENSE
     文件          68  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\MANIFEST.in
     文件         705  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\Makefile
     文件        6147  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\README.md
     目录           0  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\camelot\
     文件         756  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\camelot\__init__.py
     文件         183  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\camelot\__main__.py
     文件         721  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\camelot\__version__.py
     文件        8421  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\camelot\cli.py
     文件       23607  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\camelot\core.py
     目录           0  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\camelot\ext\
     文件           0  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\camelot\ext\__init__.py
     目录           0  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\camelot\ext\ghostscript\
     文件       35147  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\camelot\ext\ghostscript\COPYING
     文件        3296  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\camelot\ext\ghostscript\__init__.py
     文件        7573  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\camelot\ext\ghostscript\_gsprint.py
     文件        6019  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\camelot\handlers.py
     文件        7675  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\camelot\image_processing.py
     文件        4759  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\camelot\io.py
     目录           0  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\camelot\parsers\
     文件          81  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\camelot\parsers\__init__.py
     文件         737  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\camelot\parsers\base.py
     文件       15076  2019-01-16 11:25  atlanhq-camelot-8ea4ec3\camelot\parsers\lattice.py
............此处省略568个文件信息

评论

共有 条评论