dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 60e4266cc742ca6cc25ee356c2dc85174d4419a9
parent 0964eea54ea442c1cf92a30364c7fe3f9ea69641
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Mon, 16 Sep 2019 16:18:40 +0200

articlesearch script moved to scholarref

Diffstat:
D.local/bin/articlesearch | 27---------------------------
1 file changed, 0 insertions(+), 27 deletions(-)

diff --git a/.local/bin/articlesearch b/.local/bin/articlesearch @@ -1,27 +0,0 @@ -#!/bin/sh -set -e - -browser=${BROWSER:-firefox} -dir="$HOME/articles $HOME/books" - -query="$(find $dir -type f | sed "s|$HOME/||" | dmenu_themed -i -l 10 -p "Search publications:")" || exit 1 - -action="$(printf "Open\nGet DOI\nSci-Hub\nAdd citation" | dmenu_themed -i -p "Action:")" - -if [ "$action" = "Open" ]; then - if [ -f "$HOME/$query" ]; then - xdg-open "$HOME/$query" - else - $browser "https://scholar.google.com/scholar?q=$query" - fi -elif [ "$action" = "Get DOI" ]; then - getdoi -n -c "$query" -elif [ "$action" = "Sci-Hub" ]; then - getdoi "$query" | shdl --tor-socks --notify --open -elif [ "$action" = "Add citation" ]; then - reference="$(scholarref "$query")" - echo "$reference" >> "$BIB" - notify-send "Added citation" "$reference" -else - notify-send --category=error "${0##*/}" "Action not understood" -fi