writing: Add papis configuration
This commit is contained in:
parent
9f5bca4a62
commit
c306e30219
4 changed files with 60 additions and 0 deletions
35
writing/.config/papis/config
Normal file
35
writing/.config/papis/config
Normal file
|
@ -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
|
3
writing/.config/papis/headerformat
Normal file
3
writing/.config/papis/headerformat
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{doc.html_escape[title]}
|
||||||
|
<ansigreen>{doc.html_escape[author]}</ansigreen>
|
||||||
|
<ansiblue>({doc.html_escape[year]})</ansiblue> [<ansiyellow>{doc.html_escape[tags]}</ansiyellow>] [<ansired>{doc.html_escape[readstatus]}</ansired>]
|
16
writing/.config/papis/scripts/papis-reload
Executable file
16
writing/.config/papis/scripts/papis-reload
Executable file
|
@ -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()
|
6
writing/.config/papis/scripts/papis-show
Executable file
6
writing/.config/papis/scripts/papis-show
Executable file
|
@ -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]}." "$@"
|
Loading…
Reference in a new issue