farling42 / obsidian-import-json

Plug-in for Obsidian.md which will create Notes from JSON files
MIT License
85 stars 5 forks source link

How to work with multiple tags? #23

Closed seed78 closed 2 years ago

seed78 commented 2 years ago

I has a JSON file that is exported from Zotero with the "BetterBibTex JSON" format. For a reference, I have one or more tags.

With the following code, the Importer can import each tag in separative lines. {{#each tags}}

{{tag}}

{{/each}}

It will look like the following.

tag1

tag2

tag3

If I want the tags to be arranged as the following, what code should I write?

tag1, #tag2, #tag3

Thank you!

farling42 commented 2 years ago

I recently found out about doing something like {{~tag}} or {{tag~}} or {{~tag~}}

The tilde ~ means to ignore whitespace generated by the markup.

Also, I think that #each allows use of a count variable, so you can put "," before each entry except the first?

On 10/07/2022 23:00, seed78 wrote:

I has a JSON file that is exported from Zotero with the "BetterBibTex JSON" format. For a reference, I have one or more tags.

With the following code, the Importer can import each tag in separative lines. {{#each tags}}

{{tag}}

{{/each}}

It will look like the following.

tag1

tag2

tag3

If I want the tags to be arranged as the following, what code should I write?

tag1, #tag2, #tag3

Thank you!

— Reply to this email directly, view it on GitHub https://github.com/farling42/obsidian-import-json/issues/23, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEFM4SHCHJII6U74ANHNJJLVTNBWVANCNFSM53FUV64A. You are receiving this because you are subscribed to this thread.Message ID: @.***>