From a45117a755d3cb767111685ba217a209cc83b479 Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Tue, 29 Jul 2025 17:06:38 +0200 Subject: [PATCH] Update papis default template --- README.md | 25 +++++++++++++------------ modules/papis.nix | 16 +++++++++++++++- 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index dd898f0..6679ae8 100644 --- a/README.md +++ b/README.md @@ -434,29 +434,30 @@ papis add --from url https://example.com/paper.pdf **Searching and browsing:** ```bash -# Search documents (uses fzf picker) -papis open -papis search "machine learning" -papis search author:smith year:2023 - -# List all documents +# List/search documents papis list +papis list "machine learning" +papis list author:smith year:2023 -# Open specific document -papis open smith2023 +# Open documents (uses fzf picker) +papis open +papis open bohm + +# Open document folder +papis open -d einstein ``` **Document management:** ```bash # Edit document metadata -papis edit +papis edit bohm # Export to BibTeX papis export --all --format bibtex > references.bib -papis export search_term --format bibtex +papis export --format bibtex query_term > references.bib -# Show document information -papis show document_key +# List documents with custom format +papis list --format '{doc[author]} - {doc[title]} ({doc[year]})' ``` **Configuration location**: `modules/papis.nix` with embedded configuration diff --git a/modules/papis.nix b/modules/papis.nix index 438de83..3fefbf5 100644 --- a/modules/papis.nix +++ b/modules/papis.nix @@ -2,7 +2,7 @@ { # Papis configuration - home.file.".config/papis/config".text = '' + home.file."Library/Application Support/papis/config".text = '' [settings] default-library = main editor = nvim @@ -38,4 +38,18 @@ home.activation.createPapisDir = '' mkdir -p ~/Documents/Library/papis ''; + + # Papis bibliography template + home.file."Library/Application Support/papis/templates/bibitem.template".text = '' + {doc[title]} ({doc[year]}). {doc[author]}. + Venue: {doc[journal]} {doc[booktitle]} {doc[eprinttype]} {doc[eprint]} {doc[eventtitle]} + Tags: {doc[tags]} + URL: {doc[url]} + --- + ''; + + # Shell alias for convenient bibliography formatting + programs.zsh.shellAliases = { + papis-bib = "papis list --template \"$HOME/Library/Application Support/papis/templates/bibitem.template\""; + }; }