Categories: None [Edit]

txt2pdf

https://rubygems.org/gems/txt2pdf
https://github.com/isene/txt2pdf
Reads a text file (if supplied as the first argument) and creates a pdf file with the same name but with .pdf as extension in the current directory via the program pdflatex (the only requirement besides ruby itself). If '-h' is the first argument, then the program displays the helptext and exits. The program can also read the input text from STDIN (STanDard IN) and create the pdf file in the user's home directory. When this method is used, no argument is given to the program and the text is simply piped directly into the program like this: $ echo 'Hello' | txt2pdf This would create a pdf file with only 'Hello' and the page number at the bottom of the resulting pdf page. With this, you could map a key binding in your window manager to create a pdf file from the text you selected in any program, be it the terminal, your browser or your text editor. In my wm of choice, i3, I have added the following to my i3 config: bindsym $mod+p exec xclip -o | txt2pdf This would create a pdf file from the text I have selected as I hit the 'Window Button' and 'p'.

Total

Ranking: 173,184 of 183,127
Downloads: 1,836

Daily

Ranking: 74,510 of 183,106
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName

Owners

#GravatarHandle
1iconisene