mgmeyers / obsidian-zotero-integration

Insert and import citations, bibliographies, notes, and PDF annotations from Zotero into Obsidian.
GNU General Public License v3.0
1.02k stars 55 forks source link

How to add today's date to output path? #141

Closed DumbledoreCalrissian closed 1 year ago

DumbledoreCalrissian commented 1 year ago

I would like to create a new folder with today's date ("YYYYMMDD") as the title and store the .md file inside that folder. I don't know how to do that. {{date}} gives me "1028152800000", I don't understand what this number indicates.

Please help!

DumbledoreCalrissian commented 1 year ago

I used /{{date | format("YYYY-MM-DD")}}/ and it worked. :)

DumbledoreCalrissian commented 1 year ago

My bad, that was the date of the article. How do I add today's date?

bartosz-mccormick commented 1 year ago

There's several "date" variables you can access:

You can take a look yourself using the plugin's "Data explorer"

Maybe this one will work well for you: {{importDate| format("YYYY-MM-DD")}}

Here's how I have implemented my output path: Zettelkasten/zotero/{{importDate| format("YYYY-MM-DD")}} {{citekey}}.md

DumbledoreCalrissian commented 1 year ago

Thank you :)