hep-paper-manager


Namehep-paper-manager JSON
Version 0.4.0 PyPI version JSON
download
home_pagehttps://github.com/Star9daisy/hep-paper-manager
SummaryA command-line app helps add High Energy Physics (HEP) papers to a Notion database.
upload_time2024-11-07 08:07:44
maintainerNone
docs_urlNone
authorStar9daisy
requires_python<4.0,>=3.11
licenseMIT
keywords high-energy-physics inspire-hep notion cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # HEP Paper Manager (HPM)

![workflow](https://raw.githubusercontent.com/Star9daisy/hep-paper-manager/refs/heads/main/assets/workflow.svg)
[![PyPI - Version](https://img.shields.io/pypi/v/hep-paper-manager)](https://pypi.org/project/hep-paper-manager/)
[![Downloads](https://static.pepy.tech/badge/hep-paper-manager)](https://pepy.tech/project/hep-paper-manager)
[![codecov](https://codecov.io/gh/Star9daisy/hep-paper-manager/branch/main/graph/badge.svg?token=6VWJi5ct6c)](https://app.codecov.io/gh/Star9daisy/hep-paper-manager)
[![GitHub](https://img.shields.io/github/license/star9daisy/hep-paper-manager)](https://github.com/Star9daisy/hep-paper-manager/blob/main/LICENSE)

HPM is a command-line tool that helps add papers from Inspire HEP to Notion
database according to its ArXiv ID.

Features:
- Retrieve papers by arXiv ID.
- Customizable paper template.
- Interactive CLI for easy setup and usage.

## Installation
```
pip install hep-paper-manager
```

## Try to add a paper to a demo database

Before we start, please make sure you have installed this app successfully.

In this step-by-step guide, we will together add "[1511.05190] Jet image -- deep
learning edition"([link](https://inspirehep.net/literature/1405106)) to a demo
database.

### Step 1: Create an integration in Notion
1. Open [My Integrations](https://www.notion.so/my-integrations).
2. Click `+ New integration`.
3. Enter a name for your integration.
4. Select your workspace.
4. Click `show` and `copy` the integration secret as your token.

To learn more about integrations, please check the official guide
[here](https://developers.notion.com/docs/create-a-notion-integration).

![Create an integration](https://raw.githubusercontent.com/Star9daisy/hep-paper-manager/refs/heads/main/assets/1-create_an_integration.gif)

### Step 2: Create a blank page and link the integration to it
1. Click the `+` button next to your workspace name to create a new blank page.
2. In the three-dot menu in the upper right, find `Connect to`.
3. Select the integration you created in the previous step.

![Create a blank page and link the integration](https://raw.githubusercontent.com/Star9daisy/hep-paper-manager/refs/heads/main/assets/2-create_a_blank_page.gif)

### Step 3: Create a demo database via `hpm`
Open your terminal, and input:
```bash
hpm demo -t <token> -p <page_id>
```

![Create a demo database](https://raw.githubusercontent.com/Star9daisy/hep-paper-manager/refs/heads/main/assets/3-create_a_demo_database.gif)

You should see a database is created and connected to the integration.

![Check the demo database](https://raw.githubusercontent.com/Star9daisy/hep-paper-manager/refs/heads/main/assets/4-check_the_demo_database.gif)

### Step 4: Initialize the `hpm` app
Use the token to initialize the `hpm` app.
```bash
hpm init -t <token>
```

![Initialize hpm](https://raw.githubusercontent.com/Star9daisy/hep-paper-manager/refs/heads/main/assets/5-initialize_hpm.gif)

### Step 5: Add the paper to the database
Use `hpm add` to add it into the demo database.
```bash
hpm add 1511.05190
```

![Add the paper to the database](https://raw.githubusercontent.com/Star9daisy/hep-paper-manager/refs/heads/main/assets/6-add_paper_1511.05190.gif)


Go back and check the database page. The paper is right there!

![Check the database page](https://raw.githubusercontent.com/Star9daisy/hep-paper-manager/refs/heads/main/assets/7-check_the_paper.gif)

Try to add more papers as you like!

## Modify the default paper template
You can use `hpm info` to find the app directory. The default paper template is
located at `{app_dir}/templates/paper.yml`:

```yaml
database_id: <your database_id>
properties:
  id: null
  url: URL
  type: null
  source: null
  title: Title
  authors.name: Authors
  created_date: Date
  published_place: Published in
  published_date: Published
  eprint: ArXiv ID
  citation_count: Citations
  abstract: Abstract
  doi: DOI
  bibtex: BibTeX
```

The keys in the `properties` section are the paper information retrieved from
Inspire HEP. Their values correspond to the Notion page properties. Modify them
as you like. `null` means that information will not be recorded in the database.


## Other commands

- `hpm update [<arxiv_id>|all]`: Update one paper according to its ArXiv ID or all papers in the database.

![Update the paper](https://raw.githubusercontent.com/Star9daisy/hep-paper-manager/refs/heads/main/assets/8-update_paper.gif)

- `hpm info`: Show all file paths related to this app.
- `hpm clean`: Remove all files related to this app.


## Updates
### v0.4.0
- Refactor the codebase and reorganize the file structure.

### v0.3.0
- Refactor the codebase by only allowing adding papers by arXiv ID.

### v0.2.2
- Fix the error when `hpm add` some conference papers that may have no publication info.

### v0.2.1
- Fix the bug that `hpm add` only checks the first 100 pages in the database.
- Fix the checkmark style.

### v0.2.0
- Refactor the codebase by introducing `notion_database`.
- Add `hpm update` to update one paper in the database.
- Add `hpm info` to show the information of this app.

### v0.1.4
- Update print style.
- Add friendly error message when the `database_id` is not specified.
### v0.1.3
- Update `hpm add` to check if the paper already exists in the database.
- You can now create a database with more properties then the template.
### v0.1.2
- Update paper from Inspire engine to include url, bibtex, and source.
### v0.1.1
- Add `hpm init` for interactive setup.
- Add `hpm add` for adding a paper to a Notion database.
- Introduce the default `Inspire` engine and `paper.yml` template.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Star9daisy/hep-paper-manager",
    "name": "hep-paper-manager",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": null,
    "keywords": "high-energy-physics, inspire-hep, notion, cli",
    "author": "Star9daisy",
    "author_email": "star9daisy@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/c6/bb/db7f8da8764a9562fcf98511dbc9aebfd618690daa5e47eb2a9ce2bbf6f8/hep_paper_manager-0.4.0.tar.gz",
    "platform": null,
    "description": "# HEP Paper Manager (HPM)\n\n![workflow](https://raw.githubusercontent.com/Star9daisy/hep-paper-manager/refs/heads/main/assets/workflow.svg)\n[![PyPI - Version](https://img.shields.io/pypi/v/hep-paper-manager)](https://pypi.org/project/hep-paper-manager/)\n[![Downloads](https://static.pepy.tech/badge/hep-paper-manager)](https://pepy.tech/project/hep-paper-manager)\n[![codecov](https://codecov.io/gh/Star9daisy/hep-paper-manager/branch/main/graph/badge.svg?token=6VWJi5ct6c)](https://app.codecov.io/gh/Star9daisy/hep-paper-manager)\n[![GitHub](https://img.shields.io/github/license/star9daisy/hep-paper-manager)](https://github.com/Star9daisy/hep-paper-manager/blob/main/LICENSE)\n\nHPM is a command-line tool that helps add papers from Inspire HEP to Notion\ndatabase according to its ArXiv ID.\n\nFeatures:\n- Retrieve papers by arXiv ID.\n- Customizable paper template.\n- Interactive CLI for easy setup and usage.\n\n## Installation\n```\npip install hep-paper-manager\n```\n\n## Try to add a paper to a demo database\n\nBefore we start, please make sure you have installed this app successfully.\n\nIn this step-by-step guide, we will together add \"[1511.05190] Jet image -- deep\nlearning edition\"([link](https://inspirehep.net/literature/1405106)) to a demo\ndatabase.\n\n### Step 1: Create an integration in Notion\n1. Open [My Integrations](https://www.notion.so/my-integrations).\n2. Click `+ New integration`.\n3. Enter a name for your integration.\n4. Select your workspace.\n4. Click `show` and `copy` the integration secret as your token.\n\nTo learn more about integrations, please check the official guide\n[here](https://developers.notion.com/docs/create-a-notion-integration).\n\n![Create an integration](https://raw.githubusercontent.com/Star9daisy/hep-paper-manager/refs/heads/main/assets/1-create_an_integration.gif)\n\n### Step 2: Create a blank page and link the integration to it\n1. Click the `+` button next to your workspace name to create a new blank page.\n2. In the three-dot menu in the upper right, find `Connect to`.\n3. Select the integration you created in the previous step.\n\n![Create a blank page and link the integration](https://raw.githubusercontent.com/Star9daisy/hep-paper-manager/refs/heads/main/assets/2-create_a_blank_page.gif)\n\n### Step 3: Create a demo database via `hpm`\nOpen your terminal, and input:\n```bash\nhpm demo -t <token> -p <page_id>\n```\n\n![Create a demo database](https://raw.githubusercontent.com/Star9daisy/hep-paper-manager/refs/heads/main/assets/3-create_a_demo_database.gif)\n\nYou should see a database is created and connected to the integration.\n\n![Check the demo database](https://raw.githubusercontent.com/Star9daisy/hep-paper-manager/refs/heads/main/assets/4-check_the_demo_database.gif)\n\n### Step 4: Initialize the `hpm` app\nUse the token to initialize the `hpm` app.\n```bash\nhpm init -t <token>\n```\n\n![Initialize hpm](https://raw.githubusercontent.com/Star9daisy/hep-paper-manager/refs/heads/main/assets/5-initialize_hpm.gif)\n\n### Step 5: Add the paper to the database\nUse `hpm add` to add it into the demo database.\n```bash\nhpm add 1511.05190\n```\n\n![Add the paper to the database](https://raw.githubusercontent.com/Star9daisy/hep-paper-manager/refs/heads/main/assets/6-add_paper_1511.05190.gif)\n\n\nGo back and check the database page. The paper is right there!\n\n![Check the database page](https://raw.githubusercontent.com/Star9daisy/hep-paper-manager/refs/heads/main/assets/7-check_the_paper.gif)\n\nTry to add more papers as you like!\n\n## Modify the default paper template\nYou can use `hpm info` to find the app directory. The default paper template is\nlocated at `{app_dir}/templates/paper.yml`:\n\n```yaml\ndatabase_id: <your database_id>\nproperties:\n  id: null\n  url: URL\n  type: null\n  source: null\n  title: Title\n  authors.name: Authors\n  created_date: Date\n  published_place: Published in\n  published_date: Published\n  eprint: ArXiv ID\n  citation_count: Citations\n  abstract: Abstract\n  doi: DOI\n  bibtex: BibTeX\n```\n\nThe keys in the `properties` section are the paper information retrieved from\nInspire HEP. Their values correspond to the Notion page properties. Modify them\nas you like. `null` means that information will not be recorded in the database.\n\n\n## Other commands\n\n- `hpm update [<arxiv_id>|all]`: Update one paper according to its ArXiv ID or all papers in the database.\n\n![Update the paper](https://raw.githubusercontent.com/Star9daisy/hep-paper-manager/refs/heads/main/assets/8-update_paper.gif)\n\n- `hpm info`: Show all file paths related to this app.\n- `hpm clean`: Remove all files related to this app.\n\n\n## Updates\n### v0.4.0\n- Refactor the codebase and reorganize the file structure.\n\n### v0.3.0\n- Refactor the codebase by only allowing adding papers by arXiv ID.\n\n### v0.2.2\n- Fix the error when `hpm add` some conference papers that may have no publication info.\n\n### v0.2.1\n- Fix the bug that `hpm add` only checks the first 100 pages in the database.\n- Fix the checkmark style.\n\n### v0.2.0\n- Refactor the codebase by introducing `notion_database`.\n- Add `hpm update` to update one paper in the database.\n- Add `hpm info` to show the information of this app.\n\n### v0.1.4\n- Update print style.\n- Add friendly error message when the `database_id` is not specified.\n### v0.1.3\n- Update `hpm add` to check if the paper already exists in the database.\n- You can now create a database with more properties then the template.\n### v0.1.2\n- Update paper from Inspire engine to include url, bibtex, and source.\n### v0.1.1\n- Add `hpm init` for interactive setup.\n- Add `hpm add` for adding a paper to a Notion database.\n- Introduce the default `Inspire` engine and `paper.yml` template.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A command-line app helps add High Energy Physics (HEP) papers to a Notion database.",
    "version": "0.4.0",
    "project_urls": {
        "Homepage": "https://github.com/Star9daisy/hep-paper-manager",
        "Repository": "https://github.com/Star9daisy/hep-paper-manager"
    },
    "split_keywords": [
        "high-energy-physics",
        " inspire-hep",
        " notion",
        " cli"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1ff948d46f17b6fe6835feed9dc5ccdaf7ca8cf1e387bd470d45df8158487881",
                "md5": "bba4a3dfc51b43e7e7ae27469a4cb3cc",
                "sha256": "dc366b2c96c54a54336134ee16e7a1982d7ac800b013d4e08ab6eda03cc68df0"
            },
            "downloads": -1,
            "filename": "hep_paper_manager-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bba4a3dfc51b43e7e7ae27469a4cb3cc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 16205,
            "upload_time": "2024-11-07T08:07:43",
            "upload_time_iso_8601": "2024-11-07T08:07:43.279546Z",
            "url": "https://files.pythonhosted.org/packages/1f/f9/48d46f17b6fe6835feed9dc5ccdaf7ca8cf1e387bd470d45df8158487881/hep_paper_manager-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c6bbdb7f8da8764a9562fcf98511dbc9aebfd618690daa5e47eb2a9ce2bbf6f8",
                "md5": "df1c2f1379f8ac342e4044376982e424",
                "sha256": "19b1187a6ae96aed5ee8ef5b73687a00fd3fb87404046a3a38e17e02216d2d10"
            },
            "downloads": -1,
            "filename": "hep_paper_manager-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "df1c2f1379f8ac342e4044376982e424",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 13674,
            "upload_time": "2024-11-07T08:07:44",
            "upload_time_iso_8601": "2024-11-07T08:07:44.843746Z",
            "url": "https://files.pythonhosted.org/packages/c6/bb/db7f8da8764a9562fcf98511dbc9aebfd618690daa5e47eb2a9ce2bbf6f8/hep_paper_manager-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-07 08:07:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Star9daisy",
    "github_project": "hep-paper-manager",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "hep-paper-manager"
}
        
Elapsed time: 0.87976s