Coder Social home page Coder Social logo

Accept input from stdin about wkpdf HOT 4 CLOSED

Walnuts avatar Walnuts commented on August 17, 2024
Accept input from stdin

from wkpdf.

Comments (4)

plessl avatar plessl commented on August 17, 2024

I had planned to add this feature for a long time since it is good Unix tool practice to read from stdin. However, due to a bug in a the NSUrlConnection class, supporting reading from stdin in a natural way was not possible.

The good news is, that I have tried, whether this bug in NSUrlConnection still exists and a quick test revealed that the problem has probably been fixed in a recent OS X upgrade.

Could you please check, whether the following command works? If so, I will revise the command line interface to read from stdin if no --input argument is specified.

$ Markdown.pl test.md | wkpdf --input file:///dev/stdin --output test.pdf

from wkpdf.

Walnuts avatar Walnuts commented on August 17, 2024

it works using --source instead of --input. In a similar vein, I think it would be nice to be able to easily direct output to stdout, maybe like wget does? In other words, maybe alias --output with -O, and make -O- or maybe -O -- redirect to stdout?

from wkpdf.

plessl avatar plessl commented on August 17, 2024

I have just released an update to wkpdf which reads from stdin if no --source argument is specified.

Unfortunately, it seems that the Cocoa printing libraries do not like printing to stdout. Hence, if wkpdf should support saving to stdout, a workaround needs to be implemented. Basically its no big deal, I just need to find some time to do this. Hence for the moment I will add this to the issue tracker as feature request.

If this feature is important/urgent for you, contributions are welcome.

from wkpdf.

Walnuts avatar Walnuts commented on August 17, 2024

Printing to stdout is not urgent, just wanted to suggest it. Thanks for the help with stdin!

from wkpdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.