On Thu, Aug 27, 2020 at 08:47:55AM +0200, Jürgen Spitzmüller wrote: > Am Montag, den 24.08.2020, 14:24 +0200 schrieb Jürgen Spitzmüller: > > Am Montag, den 24.08.2020, 14:08 +0200 schrieb Pavel Sanda: > > > I saw that coming :) > > > I am all fine with that, except I don't want to be the one who > > > is commanded to implement it. > > > > I won't do it either. So let's keep this feature hidden under its > > stone. > > I couldn't resist (once more).
Given that you decided to kill the shell part I guess I am not going to commit one more (bash) script I had in pipeline. For interested parties the following script takes author1 [author2] [ye]ar [some words in title] and returns back result given by google scholar. I regularly use this script and the experience is that two authors + year + single meaningful word from title is enough to filer out false positives in almost all cases (at least in my field). This could be either standalone solution of lyxpaperview script or for those who prefer web or fallback when local file is not found. > The price for you to pay is that this now requires the python script. Didn't try yet, but I hope my shell script renamed to .py in $PATH would suffice to work ;) Pavel
# paper auth1 [auth2] [ye]ar [words in title] if [ $# == 0 ]; then exit; fi author="$1" shift if [ $# == 0 ]; then exit; fi if [ $1 == - ]; then shift; fi year=`echo "$1"| grep -E '^[0-9]+$'` if [ -z $year ]; then #second author actually author="${author}+${1}" #TODO google syntax shift if [ $1 == - ]; then shift; fi fi year=`echo "$1"| grep -E '^[0-9]+$'` if [ -z $year ]; then exit; fi if [ $year -lt 100 ]; then if [ $year -gt 40 ]; then year=$((year+1900)) else year=$((year+2000)) fi fi shift if [ a$1 == a- ]; then shift; fi tit=`echo "$*"|tr -s ' '|tr ' ' '+'` #echo auth: $author #echo year: $year #echo titl: $tit URL="https://scholar.google.com/scholar?as_q=${tit}&as_epq=&as_oq=&as_eq=&as_occt=title&as_sauthors=${author}&as_publication=&as_ylo=${year}&as_yhi=${year}&hl=en&as_sdt=0%2C5" firefox -P schola "$URL"
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel