How to print from GitHub

前端 未结 20 1177
伪装坚强ぢ
伪装坚强ぢ 2021-01-29 20:17

If I want to print a markdown file from GitHub as it appears on screen, for example: https://github.com/RestKit/RestKit/blob/master/Docs/Object%20Mapping.md

Then how can

20条回答
  •  日久生厌
    2021-01-29 20:39

    Simple Hack:

    I've been opening the markdown file in something like Marked or the online tool Dillinger and then print from there. Some of these tools allow you to set the formatting to Github or other styles.

    A better way:

    Since I first wrote the above answer I found a better way:

    I've discovered a better way than what I said earlier.

    1. Git clone your wiki to a local directory
    2. Use gitbook & Calibre's ebook-convert to generate the PDF as per the instructions in https://github.com/GitbookIO/gitbook

      • On the Mac, you have to symlink the ebook-convert from within the /Application/calibre.app directory to someplace suitable before running the gitbook pdf command, with a command like:

      ln -s /Applications/calibre.app/Contents/console.app/Contents/MacOS/ebook-convert /usr/local/bin

提交回复
热议问题