Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add other ways of injecting PanTableOption #31

Open
ickc opened this issue Nov 15, 2017 · 1 comment
Open

Add other ways of injecting PanTableOption #31

ickc opened this issue Nov 15, 2017 · 1 comment

Comments

@ickc
Copy link
Owner

ickc commented Nov 15, 2017

See #28 by @ber532k

Thoughts:

  • it could be related to pantable as a cli tool #10, when pantable is turned into a cli tool, what is suggested in Set default options from command line #28 is doable.

  • use env. var. to setup the default. In that case people can setup their own defaults in .bash_profile or .bashrc permanently. This is easy to do. And considering that pandoc is unlikely to provide a better way to pass cli options to filter, and the current recommended ways of passing info to filter is via env. var., this might be just the way to solve pantable as a cli tool #10

  • global defaults in YAML front matter. Another often suggested way to pass info to filter. A bit more complicated to do, since another function to walk the YAML is needed. This is more self-contained in the document though (i.e. more reproducible).

In the end may be all 3 methods should be provided as a hierarchy ways of defining the defaults. (priority, higher first: YAML in CSV table, YAML front matter, cli args, env. var., default)

@ickc ickc changed the title Customized defaults Add other ways of injecting PanTableOption Dec 19, 2020
@ickc
Copy link
Owner Author

ickc commented Dec 19, 2020

Currently only YAML options within the YAML codeblock is used.

Add multiple hierarchical places for setting options, some are global:

  • ICA? Not general enough, but a natural place to put options for input Table (output to CodeBlock such as in pantable2csv)
  • metadata
  • command line (may dup on metadata above)
  • env var (say PANTABLEOPTION='json or yaml representation of the options? or argparse like?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant