How to use extracted %^{keywords} from pdf as seperate filetags in note

Hi @mshevchuk, I have ref template in a file as follows :

#+filetags: %^{keywords}

* %^{citekey}
:Custom_ID: %^{citekey}
:URL: %^{url}
:AUTHOR: %^{author-or-editor}


which gives filestags as single comma-separated tag entry as
#+filetags: keyword1,keyword2,keyword3

How can I set these keywords as separate tag entries as
#+filetags: :keyword1:keyword2:keyword3:

Hi @prashantnag93 just use the Elisp functionality of Org-capture templates. Something like this:

#+filetags: %(format ":%s:" (mapconcat #'identity (split-string "%^{keywords}" "," t " ") ":"))

You can wrap the Elisp expression into a custom function for brevity.

Thank you @mshevchuk it worked for the citekey which has keywords but it give the following output for the empty keyword citekey
#+filetags: ::

And what do you want it to be?

I am trying to write a function to split the authors as you suggested in here. Can you please explain what exactly is my function’s input?