Skip to main content

Command Line Bib Generator via Semantic Scholar API

Automatic generation of bibs from a single title or a list of titles with semantic scholar API.

This repository is in no way affiliated with Semantic Scholar.

Installation

  1. Obtain an API key from Semantic Scholar: here.
  2. Place your API key (a string letters and numbers) into the environment variable export SEMANTIC_SCHOLAR_API_KEY="...".
  3. Install using pip: pip install semantic_bibtool

Example usage

$ semantic_bibtool "attention is all you need"

prints

@inproceedings{vaswani2017attention,
  author = {Vaswani, Ashish and M. Shazeer, Noam and Parmar, Niki and Uszkoreit, Jakob and Jones, Llion and N. Gomez, Aidan and Kaiser, Lukasz and Polosukhin, Illia},
  title = {{A}ttention is {A}ll you {N}eed},
  booktitle = {{N}{I}{P}{S}},
  year = {2017},
}

Help

usage: semantic_bibtool [-h] [-o OUTPUT_FILE] [--add-url] input

A tool for converting paper titles (with optional author names as keywords) to formatted latex bib format using Semantic Scholar API.

NOT AFFILIATED WITH Semantic Scholar.

You need to obtain an API key for Semantic Scholar, which you can request here: https://www.semanticscholar.org/product/api#Partner-Form Export it in your environment as `export SEMANTIC_SCHOLAR_API_KEY="..."`

positional arguments:
  input                 input, either:
                                * a (quoted) string
                                * a .txt file with one title per line
                                * a zotero .csv export
                        This tool infers data type from file extension, make sure it matches!

options:
  -h, --help            show this help message and exit
  -o OUTPUT_FILE, --output-file OUTPUT_FILE
                        stdout by default
  --add-url             whether to add the url to the paper in the bib file

Example use:
        $ pip install .
        $ semantic_bibtool "attention is all you need"
        $ semantic_bibtool titles.txt -o references.bib
        $ semantic_bibtool zotero.csv

Metadata

Release files for semantic-bibtool 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for semantic-bibtool 0.2.1
File Interpreter ABI Platform
semantic_bibtool-0.2.1-py3-none-any.whl Python 3 none any Details

Release files / semantic_bibtool-0.2.1-py3-none-any.whl

Download URL semantic_bibtool-0.2.1-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
721e195de09539b537dbe6b2fc750a249e9683973286a40b5db7e88ec1d6f460
BLAKE2b-256 checksum
How to use checksums
3f06523a2188aae81a9184d1f32c9c65920023fb130cc07773a1cdfea5409ceb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file

0.2.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page