add contents to databases
This commit is contained in:
parent
d2934bf8a3
commit
b4683a8681
3
Makefile
3
Makefile
@ -4,6 +4,8 @@ EDITOR ?= vi
|
|||||||
FZF != command -v sk || command -v fzy || command -v fzf || \
|
FZF != command -v sk || command -v fzy || command -v fzf || \
|
||||||
{ echo install a fuzzy finder && exit 1 ;}
|
{ echo install a fuzzy finder && exit 1 ;}
|
||||||
|
|
||||||
|
spill_contents = sed -e '1,/---/d'
|
||||||
|
|
||||||
help: ## Print the help message
|
help: ## Print the help message
|
||||||
@awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z._-]+:.*?## / {printf "\033[36m%s\033[0m : %s\n", $$1, $$2}' $(MAKEFILE_LIST) | \
|
@awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z._-]+:.*?## / {printf "\033[36m%s\033[0m : %s\n", $$1, $$2}' $(MAKEFILE_LIST) | \
|
||||||
sort | \
|
sort | \
|
||||||
@ -29,6 +31,7 @@ $(databases): .dbs/%.rec: %/ | .dbs/
|
|||||||
done > $@
|
done > $@
|
||||||
for entry in $(shell find $< -type f -name "*.md"); do \
|
for entry in $(shell find $< -type f -name "*.md"); do \
|
||||||
recset $@ -e "file = '$${entry}'" -f wordcount --set-add="$$(wc -w < $${entry})" ;\
|
recset $@ -e "file = '$${entry}'" -f wordcount --set-add="$$(wc -w < $${entry})" ;\
|
||||||
|
recset $@ -e "file = '$${entry}'" -f contents --set-add="$$($(spill_contents) $${entry})" ;\
|
||||||
done
|
done
|
||||||
|
|
||||||
db.rec: $(databases)
|
db.rec: $(databases)
|
||||||
|
Loading…
Reference in New Issue
Block a user