HPM is a command-line tool that helps adds Inspire literature to a Notion database.
It has features as following:
- Retrieve HEP papers by Inspire ID, or Arxiv ID, or DOI.
- Customizable paper template for creating pages in a Notion database.
- Interactive CLI for easy setup and usage.
pip install hep-paper-manager
In this step-by-step guide, we will together add "[1511.05190] Jet image -- deep learning edition"(link) to a Notion database.
- Open My Integrations.
- Click
+ New integration
. - Enter a name for your integration.
- Copy the integration secret as your token.
Check the official guide for integrations here.
A database is the place where we'll put all papers of interest in. Create an empty page and make it a database.
Each item represents a paper. Below is what we want to record for each paper:
Property | Type | Comment |
---|---|---|
Date | Date | When the paper appears in the Inspire. |
Citations | Number | More citations, more likely to be a good paper. |
Title | Title | |
Type | Select | An article, a thesis, or a conference paper. |
Journal | Select | The journal where the paper is published. |
Authors | Multi-select | |
Link | URL | The Inspire link to the paper. |
Abstract | Text | |
Bibtex | Text | |
Inspire ID | Text | |
Arxiv ID | Text | |
DOI | Text |
The "Type" above is what we call a "property" in Notion. You can add a new
property by clicking +
in the database page. Or click an existing property
to modify its type.
Open a blank page, it should look like this:
To complete the database setup, we need to add the integration to the database.
To let hpm
add papers for you, we need to install and initialize it first.
pip install hep-paper-manager
hpm init
If you want to change the default template, use hpm info
to find the location
of the template file. Then modify the template file directly.
Usually, we search for papers on Inspire. The Inspire ID is the number in the URL.
In the command line, we use hpm add
to add the paper to the database.
hpm add 1405106
Let's go back and check the database page. The paper is right there!
Of course, you can also add papers by Arxiv ID or DOI.
hpm add 1511.05190 --id-type arxiv
hpm add "10.1007/JHEP07(2016)069" --id-type doi
You can now add more papers to your Notion database.
After a while, the paper may have newer information like citation number. You
can update the paper in the database by hpm update
.
hpm update 1405106
Just like hpm add
, you can also update papers by Arxiv ID or DOI.
hpm update 1511.05190 --id-type arxiv
hpm update "10.1007/JHEP07(2016)069" --id-type doi
Note, the columns in the database but not in the template will not be updated. So you can add more columns to the database without worrying about losing information.
Inspire
: It fetches papers from the Inspire HEP. It serves the default engine forhpm
.InspirePaper
has the following properties:- date: str
- citations: int
- title: str
- type: str
- journal: str
- authors: list[str]
- link: str
- abstract: str
- bibtex: str
- inspire_id: str
- arxiv_id: str
- doi: str
Template saves the mapping from paper properties to Notion database properties. You can adjust the properties within the template.
Below is the default template for Inspire
engine which holds all properties
of InspirePaper
:
-
paper.yml
engine: Inspire database_id: <database_id> properties: date: Date citations: Citations title: Title type: Type journal: Journal authors: Authors link: Link abstract: Abstract bibtex: Bibtex inspire_id: Inspire ID arxiv_id: Arxiv ID doi: DOI
These properties match the properties of the InpspirePaper class. You can modify the template to fit your needs.
! Remember the last three lines are necessary. You can't remove them.
- Fix the error when
hpm add
some conference papers that may have no publication info.
- Fix the bug that
hpm add
only checks the first 100 pages in the database. - Fix the checkmark style.
- 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.
- Update print style.
- Add friendly error message when the
database_id
is not specified.
- 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.
- Update paper from Inspire engine to include url, bibtex, and source.
- Add
hpm init
for interactive setup. - Add
hpm add
for adding a paper to a Notion database. - Introduce the default
Inspire
engine andpaper.yml
template.