distsys-class icon indicating copy to clipboard operation
distsys-class copied to clipboard

Generated a pretty PDF version of the Markdown document, based on the last commit (06f63fc7).

Open jonathanmarvens opened this issue 7 years ago • 4 comments

Command used to generate the PDF document:

pandoc --from=markdown_github --latex-engine=xelatex --output=./article-kingsbury-k-2017-10-05-git-06f63fc7-an-introduction-to-distributed-systems.pdf ./README.markdown

The PDF file name is basically an article--prefixed “slugified” transformation of an APA-formatted-like citation of the document (with the date part being <git-commit-date.yyyy-mm-dd> + + git- + <git-commit-hash>[0:8]):

Kingsbury, K. (2017-10-05 git-06f63fc7). An introduction to distributed systems.

I’m not sure if you want this or not, but I thought I’d submit the PR anyway …

- Jonathan

jonathanmarvens avatar Oct 18 '17 07:10 jonathanmarvens

I like this idea, but I'm not sure how to keep it in sync with the repo as it changes. Maybe some kind of a precommit hook? Can we put those in github?

aphyr avatar Nov 28 '17 19:11 aphyr

You could do it with Travis and paste the PDFs as releases.

andrewhowdencom avatar Apr 11 '18 12:04 andrewhowdencom

https://docs.travis-ci.com/user/deployment/releases/

Using docker a PDF could be created with such a command:

docker run -v `pwd`:/source jagregory/pandoc --from=markdown_github --latex-engine=xelatex --output=./article-kingsbury-k-2017-10-05-git-06f63fc7-an-introduction-to-distributed-systems.pdf ./README.markdown

A travis ci configuration could look similar to this:

sudo: required

services:
  - docker

script:
  - docker run -v `pwd`:/source jagregory/pandoc --from=markdown_github --latex-engine=xelatex --output=./article-kingsbury-k-2017-10-05-git-06f63fc7-an-introduction-to-distributed-systems.pdf ./README.markdown

deploy:
  provider: releases
  api_key: "GITHUB OAUTH TOKEN"
  file: "FILE TO UPLOAD"
  skip_cleanup: true
  on:
    tags: true

shoeper avatar Apr 11 '18 16:04 shoeper

How about using github actions for that?

abailly avatar Mar 28 '19 12:03 abailly