platers / obsidian-linter

An Obsidian plugin that formats and styles your notes with a focus on configurability and extensibility.
https://platers.github.io/obsidian-linter/
MIT License
1.25k stars 83 forks source link

FR: Remove/replace 'space' in {{keywords}} tags: frontmatter yaml citation-plugin #364

Open Gornag opened 2 years ago

Gornag commented 2 years ago

Is Your Feature Request Related to a Problem? Please Describe.

using the obsidian-citation plugin and Better BibLatex export, I would like the frontmatter under the the {{keywords}} (technically {{entry.data.fields.keywords}} ) to output the keywords with spaces as either with an underscore or no space at all,

Describe the Solution You'd Like

Removes spaces from keywords exported from zotero, to either underscores, or no space at all

Please include an example where applicable:

tags: Cannabinoid Receptor Agonists,Cannabinoid Receptor Antagonists,Cannabinoids,Drug Discovery,Endocannabinoids,Humans,Ligands,Piperazines,Protein Binding,Pyrazoles,Receptors,Cannabinoid,Receptors,G-Protein-Coupled
tags: Cannabinoid_Receptor_Agonists,Cannabinoid_Receptor_Antagonists,Cannabinoids,Drug_Discovery,Endocannabinoids,Humans,Ligands,Piperazines,Protein_Binding,Pyrazoles,Receptors,Cannabinoid,Receptors,G-Protein-Coupled

Describe Alternatives You've Considered

Doing it by hand each time :/

Additional Context

Ideally, I would like comma separation of keywords to replaced by spaces...... Or rather than 'underscore's replacing the 'space's, the spaces are removed, and the comma's are replaced with spaces

tags:  Cannabinoid_Receptor_Agonists Cannabinoid_Receptor_Antagonists Cannabinoids Drug_Discovery Endocannabinoids Humans Ligands Piperazines Protein_Binding Pyrazoles Receptors Cannabinoid Receptors G-Protein-Coupled

OR

Cannabinoid_Receptor_Agonists, Cannabinoid_Receptor_Antagonists, Cannabinoids, Drug_Discovery, Endocannabinoids, Humans, Ligands, Piperazines, Protein_Binding, Pyrazoles, Receptors, Cannabinoid, Receptors, G-Protein-Coupled
pjkaufman commented 2 years ago

@Gornag , would an option to remove/replace spaces in tags when commas and or array syntax is used satisfy what you are looking for? It sounds like that is what is being asked, but I wanted to make sure.

Gornag commented 2 years ago

Sorry for the delay. Thank you for taking the time to reply. Yes, I believe that would satisfy what I'm looking for! Thanks :)

micahchoo commented 1 year ago

I have been trying to find a way to do this as well

juandpinto commented 1 year ago

+1

This would be very helpful for tags coming in from citation managers like Zotero. Ideally we could select specific YAML fields so that spaces aren't removed from author names.