3 ms·
Hi everyone - I'm the author of this post/site. This is last weekend's project. I got frustrated with not having a good way to print Markdown files from GitHub
by flog 13y ago
Hi everyone - I'm the author of this post/site. This is last weekend's project.
I got frustrated with not having a good way to print Markdown files from GitHub (root level repo READMEs and individual .md/mdown files).
It's super simple to use: just replace 'github.com' with 'gitprint.com' (when on a GitHub markdown file page) and it will convert it to a beautiful print-friendly PDF and prompt you to print.
Any feedback would be appreciated. (It's just a fun side project, but would like to improve it as I think it could be useful for like-minded people)
- alexbilbie 13y agoGreat service, thank you! I've already used it to print out https://gitprint.com/hueniverse/hawk https://gitprint.com/hueniverse/hawk
- jredburn 13y agoThis is great. Would happily pay a few $$$ to be able to use on private repositories.
- flog 13y agoI haven't looked into private repos yet, but good idea: will add it to the todo list.
- joshpeek 13y agoPrivate markdown files should be accessible from a tokenized raw.github.com link. So it'd be neat if https://gitprint.com/josh/secret/master/REAMDE.md?token=123 https://gitprint.com/josh/secret/master/REAMDE.md?token=123 worked.
- dfc 13y agoWhat is doing the typesetting? I do not recognize: Producer: Qt 4.8.4 (C) 2011 Nokia Corporation and/or its subsidiary(-ies) Why didn't you use pandoc+latex: $ pandoc -s -S -o gitprint.pdf FILE.md
- 616c 13y agoAs a fun exercise, you should checkout the Gitit README[0], which is a cool VCS-managed wiki that renders everything via Pandoc, using this Gitprint service. Or not. I see you or someone else constantly retorting with "Why not Pandoc?" and I agree with you. I started to get interest in Haskell again just because Pandoc, and Gitit, and some other very impressive stuff, is written in Haskell and seems to do some stuff very powerfully. However, a caveat. It is not mentioned in the documentation, but Gitit does not enable PDF export by default, when Pandoc is more than capable of doing so? Why? Because, in all fairness, it can add significant load. According to the conf file comments. > pdf-export: yes > # if yes, PDF will appear in export options. PDF will be created using > # pdflatex, which must be installed and in the path. Note that PDF > # exports create significant additional server load. How much load, I am not sure. I would love to see a similar Happstack app like this program that runs gitit or the new fork gitit2, rewritten for Happstack updates now that the API has matured. This makes me think performance is an issue. As an aside, I know ShareLatex opened up their code. I have not had time to check, but I was curious if they do use standard Latex for generating files and if they do, how they make it performant (I know they have a couple layers, I watched their old Node/JS London talk, I mean hear Latex in particular) so fast for potentially thousands of people at once. [0] https://gitprint.com/jgm/gitit/blob/master/README.markdown https://gitprint.com/jgm/gitit/blob/master/README.markdown
- dfc 13y agoThe server load is due to using Latex for the typesetting. Is it surprising that publication quality typesetting takes more resources than the ragged right text that this puts out? No. Is it surprising that processing inline TeX equations or Bibtex citations takes more resources? No. Compare and Contrast: Gitprint's pdf of README: https://gitprint.com/jgm/gitit/blob/master/README.markdown https://gitprint.com/jgm/gitit/blob/master/README.markdown Gitit's html export of README: http://gitit.net/README?printable http://gitit.net/README?printable If I don't care about the quality of the text layout gitit's printable html page is equivalent to the gitprint pdf. Adding Merriweather to default.html is trivial. But as another commentator pointed out maybe using a new trendy font might not be the best choice if you want decent unicode coverage; just in case one of your users is among the "minority" of people who were unsatisfied by the basic ASCII charset. Moreover comparing gitprint's markdown support to pandoc as if it is apples to apples is silly.