Add some examples to doc.
Only try to read piped data if STDIN is not a TTY.