-
-
Notifications
You must be signed in to change notification settings - Fork 2
Templates
Vino utilizes specific templates for creating different types of notes, each tailored to the note type. These templates are integral to various interactive functions within Vino. Below is an overview of the templates and their associated functions:
-
vino-rating-template
: Used in the wine rating process byvino-entry-rate
. -
vino-entry-template
: Used byvino-entry-create
for general wine entries. -
vino-country-template
: Used byvino-country-create
. Also triggered when selecting origin. -
vino-region-template
: Used byvino-region-create
. Also triggered when selecting origin. -
vino-appellation-template
: Used byvino-appellation-create
. Also triggered when selecting origin. -
vino-grape-template
: Used byvino-grape-create
and in wine entry creation flow. -
vino-producer-template
: Used byvino-producer-create
and in wine entry creation flow.
These templates adhere to the vulpea-create
API and are structured as property lists, supporting the following attributes:
-
:file-name
(Mandatory): File name, relative toorg-roam-directory
. -
:head
(Optional): Additional header content for the note. -
:body
(Optional): Main body of the note. -
:properties
(Optional): Additional properties for thePROPERTIES
block. -
:context
(Optional): Extra variables used in:file-name
,:head
,:body
. Seevulpea-create
for more details. -
:tags
(Optional): Additional tags, alongside mandatory ones specific to each note type (e.g.,wine
andgrape
for grape notes).
Here is an example of how a template might be configured for grape notes:
(setq vino-grape-template
'(:file-name "wine/grape/%<%Y%m%d%H%M%S>-${slug}.org"
:tags ("barberry/public")))
In this example, the vino-grape-template
is set up to create a file with a specific naming convention in the wine/grape directory, and it includes additional tags for categorization purposes.
When a new note is created in Vino, certain template values are enforced. First, required tags are automatically added, even if they are not included in the template. For example, if you omit the wine
or grape
tags in the vino-grape-template
, Vino will still enforce these tags.
Additionally, Vino ensures that region and appellation notes include the country and, optionally, the parent region (if provided).
Both behaviours are mandatory and cannot be disabled.