diff --git a/writing/.config/papis/config b/writing/.config/papis/config new file mode 100644 index 0000000..9b7bf01 --- /dev/null +++ b/writing/.config/papis/config @@ -0,0 +1,35 @@ +[settings] +#opentool = zathura +#picktool = fzf +default-library = master +file-browser = vifm +ref-format = {doc[author_list][0][surname]}{doc[year]} + +# edit info.yaml as new papers are added +add-edit = True +add-folder-name = {doc[ref]}-{doc[title]} +add-file-name = {doc[author_list][0][family]}{doc[year]} +header-format-file = ~/.config/papis/headerformat +extra-bibtex-keys = ["tags", "readstatus"] + +database-backend = whoosh +whoosh-schema-fields = ["doi", "ref", "author", "year", "title", "publisher", "tags", "readstatus", "date", "isbn", "type", "keyword", "qualityassured"] +# to make whoosh list everything by default +default-query-string = * + +notes-name = notes.qmd +notes-template = {doc[author_list][0][family]}{doc[year]}--{doc[title]} + +mark-opener = zathura -P {mark[value]} + +[tui] +editmore = vi + +[master] +dir = ~/documents/library + +[academia] +dir = ~/documents/library/academia + +[cs] +dir = ~/documents/library/cs diff --git a/writing/.config/papis/headerformat b/writing/.config/papis/headerformat new file mode 100644 index 0000000..fb86095 --- /dev/null +++ b/writing/.config/papis/headerformat @@ -0,0 +1,3 @@ +{doc.html_escape[title]} +{doc.html_escape[author]} +({doc.html_escape[year]}) [{doc.html_escape[tags]}] [{doc.html_escape[readstatus]}] diff --git a/writing/.config/papis/scripts/papis-reload b/writing/.config/papis/scripts/papis-reload new file mode 100755 index 0000000..35a6640 --- /dev/null +++ b/writing/.config/papis/scripts/papis-reload @@ -0,0 +1,16 @@ +#!/usr/bin/env python +# papis-short-help: Manually rebuild cache for all libraries +# +# This tiny script updates all libraries by rebuilding their caches. +# Useful to invoke after manual edits in one of your library folders +# so you don't have to think about which library you changed stuff in +# and just get everything updated. Might take a little time but +# should generally be a quick process (even with 1000s of entries). + +import papis.api + +libs = papis.api.get_libraries() + +for lib in libs: + papis.api.clear_lib_cache(lib) + papis.api.get_all_documents_in_lib() diff --git a/writing/.config/papis/scripts/papis-show b/writing/.config/papis/scripts/papis-show new file mode 100755 index 0000000..7c6779d --- /dev/null +++ b/writing/.config/papis/scripts/papis-show @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +# papis-short-help: Display pretty human-readable document overview +# +# TODO strip {} from bibtex entries to really pretty print + +papis -l "${PAPIS_LIB}" list --format "{doc[author]} ({doc[year]}). {doc[title]}." "$@"