Package: a2b
A2B (Arxiv to Bibliography)Replace arXiv links (or doi links) by their corresponding bibliography in markdowns / Notion databases. Inspired byMu Li.This repo provides a tool to replace arXiv/DOI links saved inMarkdown filesorNotion databasewith their corresponding bibliographic information, which intends to create a more convenient experience for users in needs of searching, collecting, and taking notes of literatures. The script uses the Semantic Scholar API to retrieve information such as authors, title, journal, year, and citation count for a given arXiv paper.MarkdownNotion DatabaseInstallationTo installa2b, make sure you havepip installedand run:>>pipinstalla2bUsageThe tool can be run from the command line, e.g. to check the installed version ofa2b,>>a2b--versionMarkdown1. Generate markdown from a single arXiv link or DOIFor example:>>a2b--arxivhttps://arXiv.org/abs/1912.08957## __Optimization for deep learning: theory and algorithms.__ *Ruoyu Sun.* __ArXiv, 2019__ [(Arxiv)](ht## tps://arXiv.org/abs/1912.08957) [(S2)](https://www.semanticscholar.org/paper/c23173e93f1db79a422e2af## 881a40afb96b8cb92) (Citations __114__)Here you can use the link of pdfhttps://arXiv.org/pdf/1912.08957.pdf, instead of the link of arXiv page.>>a2b--doihttps://doi.org/10.1007/BF00133570## __Snakes: Active contour models.__ *M. Kass et al.* __International Journal of Computer Vision, 2004__## [(Link)](https://doi.org/10.1007/BF00133570) [(S2)](https://www.semanticscholar.org/paper/9394a5d5adcb6## 26128b6a42c8810b9505a3c6487) (Citations __15860__)One can simply provide the DOI10.1007/BF00133570without adding the hyperlink prefix to generate bibilography from DOI.2. Replace arXiv links in a single markdown file>>a2bpath/to/markdown.md3. Replace arXiv links in all markdown files within a directoryRun the following command to replace all arXiv links found in the given directory and its subdirectories.>>a2bpath/to/directoryTo replace arXiv links in the markdown filesONLYwithin the directory (subdirectories excluded), use arguments--no-recursiveor-nr:>>a2b-nrpath/to/directoryNotion DatabaseTo generate bibliography from links saved in a Notion database, follow the instructions belowCreate a newNotion integrationand keep the Notion API key obtained from the integrationGo to the Notion database andConnect the Notion database to the integrationyou just createdCreate these columns (with data type matched) in the Notion databaseTitle (title)Author (rich_text)Year (number)Journal (rich_text)Arxiv (url)Link (url)S2 (url)Citations (number)Paste Arxiv links or doi links in the columnTitleand run the following command to activate the conversion>>a2b--notionnotion_database_id--keynotion_api_key# or>>a2b--notionnotion_database_url--keynotionapi_keyYou can choose to save your Notion API key as a environment variableNOTION_API_KEY, and then you can simply run without manually providing the key in command:>>a2b--notionnotion_database_id# or>>a2b--notionnotion_database_urlChangelogVersion 1.0.7Fix the problem of arxiv and doi format confliction in NotionVersion 1.0.6Fix version commandVersion 1.0.5Support Notion databaseVersion 1.0.4Support creating bibliography from DOI linksSupport querying a single arXiv link from terminal