arxiv2text


Namearxiv2text JSON
Version 0.1.14 PyPI version JSON
download
home_pagehttps://github.com/dsdanielpark/arxiv2text
SummaryConverting PDF files to text, mainly with a focus on arXiv papers.
upload_time2024-01-09 09:52:08
maintainer
docs_urlNone
authordaniel park
requires_python>=3.6
license
keywords python paper data mining translation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Development Status :: 3 - Alpha

# arxiv2text

<p align="left">
<a href="https://github.com/dsdanielpark/Bard-API"><img alt="PyPI package" src="https://img.shields.io/badge/pypi-arXiv2text-black"></a>
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
<a href="https://hits.seeyoufarm.com"><img src="https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fdsdanielpark%2Farxiv2text&count_bg=%23000000&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false"/></a>
<!-- <a href="https://www.buymeacoffee.com/parkminwoo"><img src="https://cdn.buymeacoffee.com/buttons/v2/arial-orange.png" height="20px"></a> -->
</p>

A Python package that converts arXiv documents into structured text using arXiv PDF URLs. If it's a PDF link other than arXiv, it's mostly feasible. If extraction to markdown fails, try extracting to text or HTML.

<br>

## Install
```
$ pip install arxiv2text
```
```
$ pip install git+https://github.com/dsdanielpark/arxiv2text.git
```

<br>

## Usage 

*arxiv_to_text*

```python
from arxiv2text import arxiv_to_text

pdf_url = "https://arxiv.org/pdf/1706.03762"

extracted_text = arxiv_to_text(pdf_url, output_dir) # output_dir is optional argument
```

*arxiv_to_html*

```python
from arxiv2text import arxiv_to_html

pdf_url = "https://arxiv.org/pdf/1706.03762"

output_dir = "output_folder"
arxiv_to_html(pdf_url, output_dir)
```

*arxiv_to_md*
```python
from arxiv2text import arxiv_to_md

pdf_url = "https://arxiv.org/pdf/1706.03762"

output_dir = "output_folder"
arxiv_to_md(pdf_url, output_dir)
```

<br>

## [arXiv API](https://info.arxiv.org/help/api/user-manual.html)
```python
import urllib.request as libreq
with libreq.urlopen('http://export.arxiv.org/api/query?search_query=all:electron&start=0&max_results=1') as url:
  r = url.read()
print(r)

```


<br>

## License
[MIT](https://opensource.org/license/mit/) <br>
```
The MIT License (MIT)

Copyright (c) 2023 Minwoo Park

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

## Bugs and Issues
Sincerely grateful for any reports on new features or bugs. Your valuable feedback on the code is highly appreciated.

## Contacts
- Core maintainer: [Daniel Park, South Korea](https://github.com/DSDanielPark) <br>
- E-mail: parkminwoo1991@gmail.com <br>

  
*Copyright (c) 2023 MinWoo Park, South Korea*<br>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dsdanielpark/arxiv2text",
    "name": "arxiv2text",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "Python,Paper,Data Mining,Translation",
    "author": "daniel park",
    "author_email": "parkminwoo1991@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/68/4a/f6f92e10f9d51df40cdf6774c6fa308f381c2724df7f4ccae59c033b81f4/arxiv2text-0.1.14.tar.gz",
    "platform": null,
    "description": "Development Status :: 3 - Alpha\r\n\r\n# arxiv2text\r\n\r\n<p align=\"left\">\r\n<a href=\"https://github.com/dsdanielpark/Bard-API\"><img alt=\"PyPI package\" src=\"https://img.shields.io/badge/pypi-arXiv2text-black\"></a>\r\n<a href=\"https://github.com/psf/black\"><img alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"></a>\r\n<a href=\"https://hits.seeyoufarm.com\"><img src=\"https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fdsdanielpark%2Farxiv2text&count_bg=%23000000&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false\"/></a>\r\n<!-- <a href=\"https://www.buymeacoffee.com/parkminwoo\"><img src=\"https://cdn.buymeacoffee.com/buttons/v2/arial-orange.png\" height=\"20px\"></a> -->\r\n</p>\r\n\r\nA Python package that converts arXiv documents into structured text using arXiv PDF URLs. If it's a PDF link other than arXiv, it's mostly feasible. If extraction to markdown fails, try extracting to text or HTML.\r\n\r\n<br>\r\n\r\n## Install\r\n```\r\n$ pip install arxiv2text\r\n```\r\n```\r\n$ pip install git+https://github.com/dsdanielpark/arxiv2text.git\r\n```\r\n\r\n<br>\r\n\r\n## Usage \r\n\r\n*arxiv_to_text*\r\n\r\n```python\r\nfrom arxiv2text import arxiv_to_text\r\n\r\npdf_url = \"https://arxiv.org/pdf/1706.03762\"\r\n\r\nextracted_text = arxiv_to_text(pdf_url, output_dir) # output_dir is optional argument\r\n```\r\n\r\n*arxiv_to_html*\r\n\r\n```python\r\nfrom arxiv2text import arxiv_to_html\r\n\r\npdf_url = \"https://arxiv.org/pdf/1706.03762\"\r\n\r\noutput_dir = \"output_folder\"\r\narxiv_to_html(pdf_url, output_dir)\r\n```\r\n\r\n*arxiv_to_md*\r\n```python\r\nfrom arxiv2text import arxiv_to_md\r\n\r\npdf_url = \"https://arxiv.org/pdf/1706.03762\"\r\n\r\noutput_dir = \"output_folder\"\r\narxiv_to_md(pdf_url, output_dir)\r\n```\r\n\r\n<br>\r\n\r\n## [arXiv API](https://info.arxiv.org/help/api/user-manual.html)\r\n```python\r\nimport urllib.request as libreq\r\nwith libreq.urlopen('http://export.arxiv.org/api/query?search_query=all:electron&start=0&max_results=1') as url:\r\n  r = url.read()\r\nprint(r)\r\n\r\n```\r\n\r\n\r\n<br>\r\n\r\n## License\r\n[MIT](https://opensource.org/license/mit/) <br>\r\n```\r\nThe MIT License (MIT)\r\n\r\nCopyright (c) 2023 Minwoo Park\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE.\r\n```\r\n\r\n## Bugs and Issues\r\nSincerely grateful for any reports on new features or bugs. Your valuable feedback on the code is highly appreciated.\r\n\r\n## Contacts\r\n- Core maintainer: [Daniel Park, South Korea](https://github.com/DSDanielPark) <br>\r\n- E-mail: parkminwoo1991@gmail.com <br>\r\n\r\n  \r\n*Copyright (c) 2023 MinWoo Park, South Korea*<br>\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Converting PDF files to text, mainly with a focus on arXiv papers.",
    "version": "0.1.14",
    "project_urls": {
        "Homepage": "https://github.com/dsdanielpark/arxiv2text"
    },
    "split_keywords": [
        "python",
        "paper",
        "data mining",
        "translation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9afa9714d0c7f73dd435566515a50ecde9db313bfe0cce8bdcb457edf087a7f4",
                "md5": "be0d7cd82c2fe837a797c21cc22ef10e",
                "sha256": "3ff3aafad181dcfc03667cd184432a55cb9a1b16c1b9ff64eda15555a88f066d"
            },
            "downloads": -1,
            "filename": "arxiv2text-0.1.14-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "be0d7cd82c2fe837a797c21cc22ef10e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 15025,
            "upload_time": "2024-01-09T09:52:02",
            "upload_time_iso_8601": "2024-01-09T09:52:02.904155Z",
            "url": "https://files.pythonhosted.org/packages/9a/fa/9714d0c7f73dd435566515a50ecde9db313bfe0cce8bdcb457edf087a7f4/arxiv2text-0.1.14-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "684af6f92e10f9d51df40cdf6774c6fa308f381c2724df7f4ccae59c033b81f4",
                "md5": "322970eb06deba5fbfb90f7f80248f85",
                "sha256": "bebc6de45cbca9ce8f44478c83871c265e8e4d85ec55e2b74035ce0b593cc817"
            },
            "downloads": -1,
            "filename": "arxiv2text-0.1.14.tar.gz",
            "has_sig": false,
            "md5_digest": "322970eb06deba5fbfb90f7f80248f85",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 14464,
            "upload_time": "2024-01-09T09:52:08",
            "upload_time_iso_8601": "2024-01-09T09:52:08.168156Z",
            "url": "https://files.pythonhosted.org/packages/68/4a/f6f92e10f9d51df40cdf6774c6fa308f381c2724df7f4ccae59c033b81f4/arxiv2text-0.1.14.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-09 09:52:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dsdanielpark",
    "github_project": "arxiv2text",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "arxiv2text"
}
        
Elapsed time: 0.17978s