Selaa lähdekoodia

bibtool personal token and search

Lukas Giner 8 kuukautta sitten
vanhempi
commit
f3226e4eeb
1 muutettua tiedostoa jossa 13 lisäystä ja 2 poistoa
  1. 13 2
      tools/Makefile

+ 13 - 2
tools/Makefile

@@ -1,3 +1,14 @@
+TOKEN = $(wildcard ~/token)
+ifeq (,${TOKEN})
+TOKEN = $(wildcard token)
+endif
+
+ifeq (bib,$(firstword $(MAKECMDGOALS)))
+  # use the rest as arguments for "bib"
+  SEARCH_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
+  # ...and turn them into do-nothing targets
+  $(eval $(SEARCH_ARGS):;@:)
+endif
 
 
 
@@ -9,8 +20,8 @@ clean:
 	latexmk -C 
 
 biblio:
-	-CHECK_DEP=${CHECK_DEP} python3 bibtool.py --server https://bib.gruss.cc get --exclude_sub_dirs
+	-CHECK_DEP=${CHECK_DEP} python3 bibtool.py --tokenfile=${TOKEN} --server https://bib.gruss.cc get --exclude_sub_dirs
 
 bib:
-	python3 bibtool.py --server https://bib.gruss.cc get --exclude_sub_dirs
+	python3 bibtool.py --tokenfile=${TOKEN} --server https://bib.gruss.cc --exclude_sub_dirs --query "$(SEARCH_ARGS)" search