Closed nejch closed 3 years ago
Hi @nejch,
Thanks for the contribution, looks good!
yaml
optional, but this plugin already relies on pandas
which is pretty heavy, and yaml
is quite common. Let's keep it. {{ read_yaml('file_path', missing='' }}
) or as a plugin parameter (read_yaml__missing: ""
)I will add some extra references to other mkdocs packages that work with yaml, and when to use them, and release right after.
I just found this neat little project looking for some YAML -> md conversions for mkdocs and this PR would make life easier for me :) Closes #17.
A few things I wasn't sure of:
install_requires
, not sure if this should be an optionalextra_requires
and installed asmkdocs-table-reader-plugin[yaml]
?open()
, I couldn't imagine people doing anything fancy here. I do pass**kwargs
to pandas though.NaN
(numpy.nan
) for missing values in the table, which is kind of ugly. It might be nice to have adefault_cell_value=""
arg and replace it. People could then useN/A
,0
, etc). Also since YAML is usually more of a machine format it might be nice to have something likecapitalize_headers=False
, so people could get prettier header titles (e.g. withstring.capwords()
). I tried both of these and it should work, but not sure if it's in the scope of this PR.