seethroughdev / obsidian-recipe-grabber

MIT License
59 stars 8 forks source link

Fails with certain variables #27

Closed shimizurei closed 6 months ago

shimizurei commented 6 months ago

FM template

---
published: {{magicTime datePublished "yyyymmdd"}}
prep_time: {{magicTime prepTime}}
cooking_time: {{magicTime cookTime}}
total_time: {{magicTime totalTime}}
servings: {{{recipeYield}}}
macros:
  - calories: {{{nutrition.calories}}}
  - carbs: " grams"
  - protein: " grams"
  - fat: " grams"
description: |
    {{description}}
tags:
- {{{recipeCuisine}}}
- {{{recipeCategory}}}
{{splitTags keywords}}

Recipe in question

If I keep any of the lines using {{magicTime}} or {{splitTags keywords}}, the import will fail. Am I not using them correctly?

seethroughdev commented 6 months ago

Sorry for the delay @shimizurei . Just pushed a new version that has much improved templating. Can you see if you still have an issue or not with v0.19.0?

shimizurei commented 6 months ago

I don't see the updated version in the Community Plugins...

Does it take some time?

seethroughdev commented 6 months ago

I was wondering that as well. Lemme look into it now.

seethroughdev commented 6 months ago

Okay, I just fixed it. Updated and tested the plugin with your template, and it worked as expected! Please let me know if you get the same result.

shimizurei commented 6 months ago

Works perfectly!