[solved!] Re: pretty print diff OR print terminal output in color
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Johannes Wiedersich wrote:
> Hi list,
> I don't seem to be able to figure this out with google or
> /usr/share/doc, aptitude search etc.:
>
> Does Debian (lenny) have any tools to pretty print coloured terminal
> output (from colordiff, git diff etc.)?
>
> Preferably, I would like to print in colours just as or similar as on
> the console/terminal.
>
> If I use konsole's 'print sceen' option, I get a black and white version
> of just the contents of the current window (not the full output).
>
> If I redirect the output to file or a2ps, uniprint or other programs, I
> get the 'full' version, but the color coding is missing. Everything is
> dull black on white.
>
> If I just copy/paste to an editor, the color information is lost as well.
>
> If I do a screenshot of the window, I usually only get a small portion
> of the output at a time and it will print a pixelised image of the text.
>
> So, is there an easy way to print the terminal output to pdf (or paper)
> where the color coding (diff, ls, etc.) is preserved?
>
> I have also tried enscript's --color option, but I don't know how to
> pipe the output of 'git diff' to it.
>
> git diff |enscript --pretty-print --color -o diff.pdf
>
> does not preserve coloured information.
>
> Thanks for any pointers!
Someone posted this link off-list:
http://www.linuxjournal.com/content/convert-diff-output-colorized-html
This script converts diff's output (or that of git-diff) to coloured
html. (Which can be printed in colour.)
Cheers,
- --
Johannes
Three nations have not officially adopted the International System
of Units as their primary or sole system of measurement: Burma,
Liberia, and the United States.
http://en.wikipedia.org/wiki/Si_units
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkseJnwACgkQC1NzPRl9qEVJWwCdFaXq086+37Q6CDnmQjM8PZGv
JUgAnij5pWuH8exlvdlnl0QB62KWEIN6
=BhlV
-----END PGP SIGNATURE-----
Reply to: