coddingtonbear / obsidian-csv-table

Have a CSV file you want to render some or all of the data from? This plugin allows you to display that data in your obsidian preview.
MIT License
113 stars 5 forks source link

csvOptions help #8

Closed kosnik-ng closed 2 years ago

kosnik-ng commented 2 years ago

Hello, I don't understand how to use the csv options to change the delimiters, I would like some help.

My cvs file contains the items below:

"Nom";"Localité"
"Zoé";"Paris"
"Léa";"Lyon"

In the source file, I wrote:

csvOptions: delimiter: semicolon
source: contact/test-csvoption.csv

or

csvOptions: delimiter: ;
source: contact/test-csvoption.csv

or

csvOptions: delimiter: ";"
source: contact/test-csvoption.csv

I get this error :

Could not parse CSV table spec: Nested mappings are not allowed in compact mappings at line 1, column 13:
csvOptions: delimiter: semicolon

and with this source code

delimiter: semicolon
source: contact/test-csvoption.csv

or

delimiter: ;
source: contact/test-csvoption.csv

or

delimiter: ";"
source: contact/test-csvoption.csv

I get this error :

Invalid Closing Quote: got ";" at line 1 instead of delimiter, record delimiter, trimable character (if activated) or comment
coddingtonbear commented 2 years ago

I believe what you'll want to do is create your table spec with

```csvtable
source: /path/to/source/
csvOptions:
  delimiter: ";"
```

Good luck!