Skip to content

Add other ways of injecting PanTableOption #31

Open

Description

@ickc

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)

Activity

  1. changed the title [-]Customized defaults[/-] [+]Add other ways of injecting PanTableOption[/+] on Dec 19, 2020
  2. ickc commented on Dec 19, 2020

    @ickc
    OwnerAuthor

    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?)
  3. ickc commented on Oct 6, 2026

    @ickc
    OwnerAuthor

    Code block attributes are another place options could come from, e.g. {.table include="data.csv" caption="..."} as asked in #65.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions