rsrch


Namersrch JSON
Version 0.2.5 PyPI version JSON
download
home_page
SummaryManage your ever-growing list of research papers
upload_time2023-11-19 01:40:44
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords
VCS
bugtrack_url
requirements anyio arxiv certifi charset-normalizer exceptiongroup feedparser h11 httpcore httpx idna notion-client requests sgmllib3k sniffio tqdm urllib3
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # rsrch
Manage your research papers from Python. This project lets you update a Notion database with arXiv links and download PDFs of papers to your local machine.

<p align="center">
    <img width="1095" alt="image" src="https://user-images.githubusercontent.com/47067154/219932040-ab4962f8-b01e-4d94-9eba-77a155b0e933.png">
</p>

## Installation
1. Create an [internal integration](https://www.notion.so/help/create-integrations-with-the-notion-api) in Notion.

2. [Add the integration](https://www.notion.so/help/add-and-manage-connections-with-the-api#add-connections-to-pages) to the database you want to download from.

3. Store your `NOTION_TOKEN` and `NOTION_DATABASE_ID` somewhere safe. Your `NOTION_TOKEN` can be found in your [integrations page](https://www.notion.so/my-integrations) and is called the **Internal Integration Token**. The `NOTION_DATABASE_ID` can be found in the [URL of your database](https://www.notion.so/my-integrations) (`https://www.notion.so/{workspace_name}/{database_id}?v={view_id}`).

4. Install local dependencies:

    ```bash
    pip install rsrch
    ```

5. **Important**: Your Notion database must have the following columns with the corresponding types:
    - **Title**: `Title`
    - **URL**: `URL`
    - **Date**: `Date`
    - **Authors**: `Text`

    You can add more columns, but these are the ones that are required.

## Usage
### Setup
```python
from rsrch import RsrchClient

client = RsrchClient(
    token=NOTION_TOKEN,
    database_id=NOTION_DATABASE_ID,
)
```

### Download
This will download all the papers from your Notion database to the `papers/` directory.

```python
client.download()
```

<p>
    <img width="1097" alt="image" src="https://user-images.githubusercontent.com/47067154/232264456-4bdef487-36e8-4627-95c3-82f5c3876082.png">
</p>

### Upload
You can upload arXiv abstract links, PDF links, or IDs to your Notion database and have it autofill all of the relevant fields.

```python
client.upload(
    arxiv_urls=[
        "https://arxiv.org/abs/1706.03762",
        "https://arxiv.org/pdf/1706.03762.pdf",
        "1706.03762",
    ]
)
```

<p>
    <img width="1095" alt="image" src="https://user-images.githubusercontent.com/47067154/232264615-82b42d8c-ca1c-4f21-899f-439a6c8a7879.png">
</p>

Alternatively, you can add non-arXiv links manually to Notion.

## Notes
- Uploading papers to Notion is currently only supported for arXiv links. Papers with titles that already exist in the database will not be uploaded.
- I plan on adding support for other databases in the future, but for now it only works with Notion databases.
- To build and release this:
  - Make new code accessible in `src/__init__.py`
  - Update the version in `src/__about__.py`
  - Run `python3 -m build`
  - Run `python3 -m twine upload dist/*`

### Resources
- [Notion API](https://developers.notion.com/)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "rsrch",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "Ishan Shah <ishan0102@utexas.edu>",
    "download_url": "https://files.pythonhosted.org/packages/bc/c7/c8e8d562372d24baac3f0c6f3384e507861b21ec09c62f2c883ee180318e/rsrch-0.2.5.tar.gz",
    "platform": null,
    "description": "# rsrch\nManage your research papers from Python. This project lets you update a Notion database with arXiv links and download PDFs of papers to your local machine.\n\n<p align=\"center\">\n    <img width=\"1095\" alt=\"image\" src=\"https://user-images.githubusercontent.com/47067154/219932040-ab4962f8-b01e-4d94-9eba-77a155b0e933.png\">\n</p>\n\n## Installation\n1. Create an [internal integration](https://www.notion.so/help/create-integrations-with-the-notion-api) in Notion.\n\n2. [Add the integration](https://www.notion.so/help/add-and-manage-connections-with-the-api#add-connections-to-pages) to the database you want to download from.\n\n3. Store your `NOTION_TOKEN` and `NOTION_DATABASE_ID` somewhere safe. Your `NOTION_TOKEN` can be found in your [integrations page](https://www.notion.so/my-integrations) and is called the **Internal Integration Token**. The `NOTION_DATABASE_ID` can be found in the [URL of your database](https://www.notion.so/my-integrations) (`https://www.notion.so/{workspace_name}/{database_id}?v={view_id}`).\n\n4. Install local dependencies:\n\n    ```bash\n    pip install rsrch\n    ```\n\n5. **Important**: Your Notion database must have the following columns with the corresponding types:\n    - **Title**: `Title`\n    - **URL**: `URL`\n    - **Date**: `Date`\n    - **Authors**: `Text`\n\n    You can add more columns, but these are the ones that are required.\n\n## Usage\n### Setup\n```python\nfrom rsrch import RsrchClient\n\nclient = RsrchClient(\n    token=NOTION_TOKEN,\n    database_id=NOTION_DATABASE_ID,\n)\n```\n\n### Download\nThis will download all the papers from your Notion database to the `papers/` directory.\n\n```python\nclient.download()\n```\n\n<p>\n    <img width=\"1097\" alt=\"image\" src=\"https://user-images.githubusercontent.com/47067154/232264456-4bdef487-36e8-4627-95c3-82f5c3876082.png\">\n</p>\n\n### Upload\nYou can upload arXiv abstract links, PDF links, or IDs to your Notion database and have it autofill all of the relevant fields.\n\n```python\nclient.upload(\n    arxiv_urls=[\n        \"https://arxiv.org/abs/1706.03762\",\n        \"https://arxiv.org/pdf/1706.03762.pdf\",\n        \"1706.03762\",\n    ]\n)\n```\n\n<p>\n    <img width=\"1095\" alt=\"image\" src=\"https://user-images.githubusercontent.com/47067154/232264615-82b42d8c-ca1c-4f21-899f-439a6c8a7879.png\">\n</p>\n\nAlternatively, you can add non-arXiv links manually to Notion.\n\n## Notes\n- Uploading papers to Notion is currently only supported for arXiv links. Papers with titles that already exist in the database will not be uploaded.\n- I plan on adding support for other databases in the future, but for now it only works with Notion databases.\n- To build and release this:\n  - Make new code accessible in `src/__init__.py`\n  - Update the version in `src/__about__.py`\n  - Run `python3 -m build`\n  - Run `python3 -m twine upload dist/*`\n\n### Resources\n- [Notion API](https://developers.notion.com/)\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Manage your ever-growing list of research papers",
    "version": "0.2.5",
    "project_urls": {
        "Bug Tracker": "https://github.com/ishan0102/rsrch/issues",
        "Homepage": "https://github.com/ishan0102/rsrch"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ad94a3167440d4f07122818dcca0333db7d73452a93d7fd12f59e936d8b07321",
                "md5": "648ace6f2ccda9167e6347debfd77028",
                "sha256": "a36a8794edc603d995fc135ce4d8775da036de8a726cd016d3245f6d243b162b"
            },
            "downloads": -1,
            "filename": "rsrch-0.2.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "648ace6f2ccda9167e6347debfd77028",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 5664,
            "upload_time": "2023-11-19T01:40:40",
            "upload_time_iso_8601": "2023-11-19T01:40:40.233407Z",
            "url": "https://files.pythonhosted.org/packages/ad/94/a3167440d4f07122818dcca0333db7d73452a93d7fd12f59e936d8b07321/rsrch-0.2.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bcc7c8e8d562372d24baac3f0c6f3384e507861b21ec09c62f2c883ee180318e",
                "md5": "b83ada47496a5bc7c2cd85ec474baaa3",
                "sha256": "4b442d068ce2575114e7b683693a1f217f9d57acbc7151cff4060f8b5621f318"
            },
            "downloads": -1,
            "filename": "rsrch-0.2.5.tar.gz",
            "has_sig": false,
            "md5_digest": "b83ada47496a5bc7c2cd85ec474baaa3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 5892,
            "upload_time": "2023-11-19T01:40:44",
            "upload_time_iso_8601": "2023-11-19T01:40:44.206680Z",
            "url": "https://files.pythonhosted.org/packages/bc/c7/c8e8d562372d24baac3f0c6f3384e507861b21ec09c62f2c883ee180318e/rsrch-0.2.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-19 01:40:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ishan0102",
    "github_project": "rsrch",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "anyio",
            "specs": [
                [
                    "==",
                    "3.7.0"
                ]
            ]
        },
        {
            "name": "arxiv",
            "specs": [
                [
                    "==",
                    "1.4.7"
                ]
            ]
        },
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2023.5.7"
                ]
            ]
        },
        {
            "name": "charset-normalizer",
            "specs": [
                [
                    "==",
                    "3.1.0"
                ]
            ]
        },
        {
            "name": "exceptiongroup",
            "specs": [
                [
                    "==",
                    "1.1.1"
                ]
            ]
        },
        {
            "name": "feedparser",
            "specs": [
                [
                    "==",
                    "6.0.10"
                ]
            ]
        },
        {
            "name": "h11",
            "specs": [
                [
                    "==",
                    "0.14.0"
                ]
            ]
        },
        {
            "name": "httpcore",
            "specs": [
                [
                    "==",
                    "0.17.2"
                ]
            ]
        },
        {
            "name": "httpx",
            "specs": [
                [
                    "==",
                    "0.24.1"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.4"
                ]
            ]
        },
        {
            "name": "notion-client",
            "specs": [
                [
                    "==",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.31.0"
                ]
            ]
        },
        {
            "name": "sgmllib3k",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "sniffio",
            "specs": [
                [
                    "==",
                    "1.3.0"
                ]
            ]
        },
        {
            "name": "tqdm",
            "specs": [
                [
                    "==",
                    "4.65.0"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    "==",
                    "2.0.2"
                ]
            ]
        }
    ],
    "lcname": "rsrch"
}
        
Elapsed time: 0.36113s