Open brian-bot opened 4 years ago
I was wondering if there is a way that tables can be generated from data files
Unfortunately, there is no built-in Pandoc support for this. It would be a nice feature for Manubot, because we want data to be defined in one and only one place.
Some comments on solutions in https://github.com/manubot/rootstock/issues/339. There are Pandoc filters like pandoc-placetable
that enable tables from CSV URLs. You'd have to install a haskel package on CI, which would be possible but perhaps not super easy.
So I think this is something you could add to a Manubot manuscript, but it would require a bit of customization.
Thanks for the note, Daniel - appreciate the response. I'll update this issue if I come up with a customized solution.
You'd have to install a haskel package on CI, which would be possible but perhaps not super easy.
If you do pursue the pandoc-placetable
option and need to install a Haskell package in the GitHub Actions workflow, the actions/setup-haskell
can simplify the process. You can check https://github.com/agitter/my-manuscript/pull/16 for an example. The two steps I added are:
- name: Setup Haskell
uses: actions/setup-haskell@v1.1
- name: Test Haskell
run: |
cabal update
cabal install pandoc-placetable
It looks like it installs pandoc-placetable
correctly, but I didn't actually test the Pandoc filter.
I didn't actually test the Pandoc filter.
@brian-bot the place you'd want to add the filter would be at:
I think you'd want to add - pandoc-placetable
. the order won't matter unless there is some interaction.
Forgive me if this is a naive question (I'm new to pandoc and manubot) - but I was wondering if there is a way that tables can be generated from data files (either delimited files or json/yaml) as can be done with jekyll (https://jekyllrb.com/docs/datafiles/). Any suggestions?
Thanks in advance!