Closed betaveros closed 10 years ago
Thanks for this PR. As a convention, the UNIX way is to use -
to represent stdin or stdout, e.g.:
$ pngpaste -
I would probably have a constant called kStdoutFilename
and then perform an equality comparison before writing the file to stdout with [(NSFileHandle*)[NSFileHandle fileHandleWithStandardOutput] writeData:pngData];
.
I am currently blocked by an environment which can properly compile things (yay Mavericks), but am working to remedy that soon.
That's odd, I'm on Mavericks too and it works like a charm.
It's a problem with my environment, unfortunately.
This feature has been implemented slightly differently in https://github.com/jcsalterego/pngpaste/commit/10435cf896bd7c068c365146781a2753bff27d9e. Usage is pngpaste - > awesome.png
. Thanks!
It's a good idea to avoid dumping binary to the console, but I added a flag to override it so I can use it as a process with an output stream from a program (I'm using it as a terrible workaround for this Java bug.)
It wasn't obvious to me what letter to use for the option, and these are the first lines of Objective-C code I've ever written; I hope it's satisfactory.