Packs
Add fields and rules for a kind of library, with a pack of your own.
A pack adds fields and rules for a kind of library: extra properties copied from Calibre, wording added to summaries, folders for groups of shelves. A pack is also a layer of your template: its fields are read the same way, and you can override them there.
Write your own#
- On the Packs tab, check the Packs folder. The default is
Books/Packs. - Add a folder there with a
pack.ymlfile in it. - Run Sync: Reload packs and templates. Packs also load when Obsidian starts.
name: My library
fields: # copied from Calibre columns into book notes (filled when empty)
- name: genre
from: "#genre"
list: true
prompts: # text added to a task's instructions
library-hub.summarize: "Mention the book's setting."
groups: # shelf notes go into a group folder by words in their name and genre
- name: Story
match: "fiction|tales|poem"
note:
frontmatter: # given to new book notes
sticker: "lucide//book-open"
banner_from_cover: true # also set `banner` to the cover
reading: # an older status field to read when reading_status is empty
field: status
map: { unread: want to read, read: read }
A pack with a mistake is named in a notice and left out.
Example: a pack for Buddhist texts#
This pack suits a library of Buddhist and other contemplative texts. It reads four Calibre columns: #tradition, #text_type, #composed and #translators. It files names that end in a title, such as Rinpoche or Lama, whole, and adds tradition-aware wording to summaries and shelf names.
Earlier versions had it built in. If you had it switched on, the Packs tab and a notice say so; save it as Books/Packs/Buddhism/pack.yml and reload to keep using it.
To adapt it to your library:
- Change each
from:to the name of your own Calibre column,#included. Calibre lists the names in Preferences → Add your own columns (the Lookup name). A field whose column you don't have copies nothing; delete it. - Change
name:under a field to the property you want in your notes. - Change or delete the
vocabulary:lists. They are the values a model may propose for that field. - The
promptsare added to what each task tells the model. Rewrite them for your library, or delete them.
name: Buddhism
description: Traditions and schools, text types and composition dates for Buddhist and other contemplative texts.
fields:
- name: tradition
from: "#tradition"
list: true
vocabulary: [Tibetan Buddhism, Bön, Theravada, Zen, Chan, Pure Land, Indian Buddhism, Buddhism (general), Hinduism, Taoism, Christianity, Judaism, Islam, Sufism, Shamanism, Indigenous traditions, Nyingma, Kagyu, Sakya, Gelug, Jonang, Rimé, Kadam]
- name: text_type
from: "#text_type"
list: true
vocabulary: [root text, sutra, tantra, commentary, teachings, sadhana, liturgy, terma, hagiography, biography, autobiography, history, poetry, songs, philosophy, guide, dictionary, reference, anthology, study, fiction]
- name: composed
from: "#composed"
- name: translators
from: "#translators"
list: true
prompts:
library-hub.summarize: "If this is a Buddhist or other contemplative text, say from the text which tradition and school it belongs to, when the original was composed if it says, and what place it holds in that tradition."
library-hub.chapters: "For a Buddhist text, keep its own technical terms (in the translation used) and name the practices and views each chapter teaches."
library-hub.shelf-name: "Genre paths for Buddhist books start with the tradition and school, e.g. Buddhism/Tibetan/Nyingma/Dzogchen or Buddhism/Theravada/Meditation."
library-hub.title-page: "For a translated Buddhist text, the author is the original teacher or composer; translators and editors go in \"translators\"."
honorifics: [rinpoche, rimpoche, lama, tulku, khenpo, geshe, roshi, sayadaw, ajahn, lotsawa, karmapa]