Skip to content

Instantly share code, notes, and snippets.

@tzok
Last active November 25, 2020 12:44
Show Gist options
  • Save tzok/3d017b4b35601aa1330adee38e827403 to your computer and use it in GitHub Desktop.
Save tzok/3d017b4b35601aa1330adee38e827403 to your computer and use it in GitHub Desktop.
How to use pantable using Docker

1 2 3


A B C


1,2,3
A,B,C

Steps:

  1. Download Dockerfile and Makefile

  2. Build the image with:

    docker build -t pandoc-2.9 .
    
  3. Place your Markdown files in the same directory as the Makefile

  4. Run make

Notice! This gist is a simple demonstration. The Makefile will get *.md files and create new *-out.md files. Each subsequent run will generate next files in the directory :). Take note of that and edit the files to your own need. Enjoy!

FROM pandoc/core:2.9.2.1
RUN apk add \
python3 \
py3-pip \
&& pip3 install pantable
inputs = $(wildcard *.md)
outputs = $(patsubst %.md,%-out.md,$(inputs))
all: $(outputs)
%-out.md: %.md
docker run --rm -v $(shell pwd):/data test -F pantable -s -o $@ $^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment