Package: heprefs
heprefs: CLI for high-energy physics referencesDo you think the commands are too long? Simply configure your shell by editing.zshrc; for example,function xa()      { if [ $# != 0 ]; then for i in $*; do heprefs abs $i; done; fi }
function xx()      { if [ $# != 0 ]; then for i in $*; do heprefs pdf $i; done; fi }
function xget()    { if [ $# != 0 ]; then for i in $*; do heprefs get -o $i; done; fi }
function xsource() { if [ $# != 0 ]; then for i in $*; do heprefs source -u $i; done; fi }(or see below) and you will just typexget 1802.07720 1708.00283etc. to download multiple PDFs!Set upFor Python 2 or 3.Install$pipinstallheprefsor you can install specific version by, e.g.,$pipinstallgit+https://github.com/misho104/heprefs.git@v0.1.0# for v0.1.0$pipinstallgit+https://github.com/misho104/heprefs.git@development# for development versionUpgrade$pipinstall--upgradeheprefsUninstall$pipuninstallheprefsUsageOpen abstract pages by a browser$heprefsabs1505.02996# arXiv$heprefsabshep-th/9711200# arXiv (old style)$heprefsabsATLAS-CONF-2017-018# CERN Document Server$heprefsabs10.1038/nphys3005# DOI (inspireHEP)$heprefsabs"fin a Ellis"# inspireHEP (first result is only shown)$heprefsabs9709356# equivalent to 'hep-ph/9709356'Open PDF by browser, or Download PDF filePDF may not be found for CDS or inspireHEP queries.$heprefspdf1505.02996# arXiv$heprefspdfATLAS-CONF-2017-018# CERN Document Server$heprefsget10.1038/nphys3005# DOI (inspireHEP)$heprefsget"fin a Ellis"# inspireHEP (first result)$heprefsget-o"fin a Giudice"# open the PDF fileShow information$heprefsauthors1505.02996$heprefsfirst_authorhep-th/9711200$heprefstitle10.1038/nphys3005$heprefsshort_infoATLAS-CONF-2017-018Advanced usageSpecify search engineThere are threetypes: arXiv, inspireHEP, and CDS. They are automatically guessed, but you can specify a type:$heprefsabs-tarxiv1505.02996# arXiv$heprefsabs-tcds"top asymmetry"# CDS$heprefsabs-tins"top asymmetry"# inspireHEP$heprefsabsATLAS-CONF-2017-018# guessed as CDS search$heprefsabs-tinsATLAS-CONF-2017-018# forced to use inspireHEPCommands are too long?In your.zshrc,.bashrc, etc...alias xa='heprefs abs'
alias xx='heprefs pdf'
alias xget='heprefs get'or if you want to handle multiple arguments,function xa()      { if [ $# != 0 ]; then for i in $*; do heprefs abs $i; done; fi }
function xx()      { if [ $# != 0 ]; then for i in $*; do heprefs pdf $i; done; fi }
function xget()    { if [ $# != 0 ]; then for i in $*; do heprefs get -o $i; done; fi }
function xsource() { if [ $# != 0 ]; then for i in $*; do heprefs source -u $i; done; fi }(You may want to use inspire search as well, though this is not a feature of this software.)function browser() {
  google-chrome $* &             # on Linux
  # open $* -a Google\ Chrome    # on macOS
}

function fin() {
  local query; if [ $# != 0 ]; then; for i in $*; do; query="$query+$i"; done; fi
  query=`echo $query | sed 's/^\+//'`
  browser http://inspirehep.net/search\?p=fin+$query &
}

function insp() {
  local query; if [ $# != 0 ]; then; for i in $*; do; query="$query+$i"; done; fi
  query=`echo $query | sed 's/^\+//'`
  browser http://inspirehep.net/search\?p=$query &
}and now you can invoke$xa1505.02996$xget9709356$finaGiudiceandMasiero$finbbhep-th/9711200$insprelaxionDebug command for developers$heprefsdebug1505.02996