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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jonathanmarvens
Copy link

@jonathanmarvens jonathanmarvens commented Oct 18, 2017

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

… last commit (06f63fc).

Command used to generate the PDF document:

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

aphyr commented Nov 28, 2017

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?

@andrewhowdencom
Copy link

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

@shoeper
Copy link

shoeper commented Apr 11, 2018

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

@abailly
Copy link

abailly commented Mar 28, 2019

How about using github actions for that?

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

Successfully merging this pull request may close these issues.

None yet

5 participants