Skip to content

Add superfence notation #45

@timvink

Description

@timvink

(inspired by this discussion)

Instead of {{ read_csv('table.csv') }} we could take inspiration from https://github.com/coddingtonbear/obsidian-csv-table and create a custom superfences notation like so:

```table-reader
filepath: table.csv
```

We could add the following extra options:

  • reader (str) one of the pandas functions, like read_csv
  • keyword_arguments, a dictionary, with named arguments, for example encoding: 'utf-8'
  • filter (list of strings), where each is successively passed to .query()
  • sortBy (list of strings), passed to pandas's .sort_values()
  • maxRows (int), passed to pandas's .head()
  • columnVariables (list of strings), passed to pandas's .rename()`

You can already do all this by just using a mkdocs hook to preprocess tables.

So if you read this & have a use-case for this, let me know!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions