Variables
You can use variables or functions inside your properties.
Pochoir provides internals one, but you can provide your owns.
Internal variables
date
The date object provides functions related to dates.
date.momentreturns moment object.date.today(FORMAT=YYYY-MM-DD)returns today's date with specified formatdate.time(FORMAT=HH:mm)returnsdate.tomorrow(FORMAT=YYYY-MM-DD)date.yesterday(FORMAT=YYYY-MM-DD)
Example
Create unique note.
---
date: "{{date.today()}}"
$.path: "inbox/{{date.today('YYYMMDDHHmmss')}}"
---
path and originalPath
Use path to get the note file path. If you want the file path before change you can use originalPath object.
path.pathreturns the file path (eg.:inbox/note.md).path.parentreturns the parent folder (eg.:inbox).path.namereturns the file name with extension (eg.:note.md).path.basenamereturns the file name without extension (eg.:note).path.extensionreturns the file extension (eg.:md).
Example
A snippet to append date to a note file name.
---
$.path: "{{path.parent}}/{{date.today('YYYMMDDHHmm')}} {{path.name}}"
---
Custom variables
You can create your own variable with the JavaScript API and use them with $.imports special properties.