-
-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API compatibility with asciidoctor-pdf Ruby version #155
Comments
I may be getting this wrong. I think It doesn't seem to be documented for the Ruby version either but is depended on in the asciidoctor-vscode extension (here) |
Ah. The documentation is in the user manual: https://asciidoctor.org/docs/user-manual/#piping-content-through-the-cli |
It should work both ways, reading from stdin and writing to stdout. We might need to port this code: https://github.com/asciidoctor/asciidoctor-cli.js/blob/693a9910d4d0a59103b7590ea57dbddf197d4135/lib/invoker.js#L26 |
Actually there's an issue here:
function convertUint8ArrayToBinaryString(u8Array) {
var i, len = u8Array.length, b_str = "";
for (i=0; i<len; i++) {
b_str += String.fromCharCode(u8Array[i]);
}
return b_str;
} @danyill To be clear, you want to write the PDF to stdout? or you want to read the AsciiDoc content from stdin? or maybe both? |
Well at the moment the vs-code extension only uses stdin to pipe the Asciidoc contents in and then writes to a file. Perhaps it makes sense to have stdout too (I'm not sure). I've been looking at the way reading from stdin is supported. It seems to require that I did a PR with "something like" the changes that are necessary. |
Thanks @Mogztter |
I wanted to recommend this project as a drop-in for the Ruby
asciidoctor-pdf
for the vscode extension (see this issue asciidoctor/asciidoctor-vscode#239) but found it didn't quite work.The Ruby version has the following:
-o, --out-file FILE output file (default: based on path of input file); use - to output to STDOUT
Whereas the js version has:
--out-file, -o output file (default: based on path of input file) use '' to output to STDOUT [string]
Would you be receptive to using
-
to enhance compatibility and portability with the Ruby version?The text was updated successfully, but these errors were encountered: