[solved 2] Re: pretty print diff OR print terminal output in color

2010-01-21 Thread Johannes Wiedersich
-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.

Just copy/paste to kate or redirect to a file to be opened with kate.
kate has a highlight mode for 'diff' output:

Tools -- Highlighting -- Other -- diff

It is possible to print with the highlighting preserved on paper.

I assume that vim and emacs might have similar capabilities.

- --
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)

iEYEARECAAYFAktYLU0ACgkQC1NzPRl9qEWZrQCfcl0S6T2S4iOKC5NWdsVjMl70
Cu0An1Zn3iYl4nJDSl/ZVLmqFTDeXBaf
=eyEq
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



[solved!] Re: pretty print diff OR print terminal output in color

2009-12-08 Thread Johannes Wiedersich
-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-


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



pretty print diff OR print terminal output in color

2009-11-04 Thread Johannes Wiedersich
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

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!

Cheers,
Johannes

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkrxUNQACgkQC1NzPRl9qEWqhwCfT2U6QkkK98mWKLofGv98KBMU
uH8An2MFWtMm8rQi37VthID+6RRdenXd
=RclH
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org