public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Pandoc output to stdout
@ 2017-07-19 10:56 Mirjalol Norqulov
       [not found] ` <3e6f4efa-c3d5-4fd0-8692-38ecd6484ad8-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Mirjalol Norqulov @ 2017-07-19 10:56 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 851 bytes --]

Hi, 
I am new to pandoc. When using pandoc it writes output to file. Is it 
possible to write output to stdout. What I want to do is create a program 
for my own needs in some programming language. Is there a way to use pandoc 
with some programming language.
Thanks in advance!

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/3e6f4efa-c3d5-4fd0-8692-38ecd6484ad8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1281 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Pandoc output to stdout
       [not found] ` <3e6f4efa-c3d5-4fd0-8692-38ecd6484ad8-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-07-19 11:43   ` John O'Regan
       [not found]     ` <CALwjjMiABu3rX8P=kNic4B-n-yXLC-XtuSLCguvcr2p_kTHmKQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: John O'Regan @ 2017-07-19 11:43 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Hi Mirjalol,

If you don't specify an output file on the command line, Pandoc will
write to STDOUT by default.

John


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Pandoc output to stdout
       [not found]     ` <CALwjjMiABu3rX8P=kNic4B-n-yXLC-XtuSLCguvcr2p_kTHmKQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-07-19 17:13       ` Mirjalol Norqulov
  2017-07-19 17:26       ` Mirjalol Norqulov
  1 sibling, 0 replies; 10+ messages in thread
From: Mirjalol Norqulov @ 2017-07-19 17:13 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 890 bytes --]

Hi John. I did what you said but its returning empty string.

среда, 19 июля 2017 г., 16:43:08 UTC+5 пользователь John O'Regan написал:
>
> Hi Mirjalol, 
>
> If you don't specify an output file on the command line, Pandoc will 
> write to STDOUT by default. 
>
> John 
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/b8fba8a2-8ae5-49df-aa3e-f240117147fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1439 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Pandoc output to stdout
       [not found]     ` <CALwjjMiABu3rX8P=kNic4B-n-yXLC-XtuSLCguvcr2p_kTHmKQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2017-07-19 17:13       ` Mirjalol Norqulov
@ 2017-07-19 17:26       ` Mirjalol Norqulov
       [not found]         ` <b2bbef60-8140-41e9-bba9-a80f84bb776c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  1 sibling, 1 reply; 10+ messages in thread
From: Mirjalol Norqulov @ 2017-07-19 17:26 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 919 bytes --]

I'm converting to docx, it seems pandoc can not write docx output to 
stdout. Any ideas?

среда, 19 июля 2017 г., 16:43:08 UTC+5 пользователь John O'Regan написал:
>
> Hi Mirjalol, 
>
> If you don't specify an output file on the command line, Pandoc will 
> write to STDOUT by default. 
>
> John 
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/b2bbef60-8140-41e9-bba9-a80f84bb776c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1470 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Pandoc output to stdout
       [not found]         ` <b2bbef60-8140-41e9-bba9-a80f84bb776c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-07-19 18:06           ` John O'Regan
       [not found]             ` <CALwjjMjQDADwEYGPoM0mHqtdauQPKadgEJ4xuW=DDsAdLovTYg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2017-07-19 21:09           ` Albert Krewinkel
  2017-07-23  8:02           ` John MacFarlane
  2 siblings, 1 reply; 10+ messages in thread
From: John O'Regan @ 2017-07-19 18:06 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Hi Mirjalol,

Yes, .docx and .pdf files use a binary format and writing them to
STDOUT isn't a good idea.

You'll have to first create your .docx file using Pandoc, and then
read in the file using a programming language.  Pandoc is scriptable
and can be easily incorporated into programs, but to programatically
edit the contents of a .docx file requires expertise in the .docx file
format... and infinite patience! :)

Please explain in more detail what you're trying to do and we'll see
if we can find a simpler solution to your problem.

BFN!

John


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Pandoc output to stdout
       [not found]         ` <b2bbef60-8140-41e9-bba9-a80f84bb776c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2017-07-19 18:06           ` John O'Regan
@ 2017-07-19 21:09           ` Albert Krewinkel
  2017-07-23  8:02           ` John MacFarlane
  2 siblings, 0 replies; 10+ messages in thread
From: Albert Krewinkel @ 2017-07-19 21:09 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Mirjalol Norqulov <mirjalol2401-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> I'm converting to docx, it seems pandoc can not write docx output to stdout. Any
> ideas?

Some operating system have file-like devices that can be written to
to print to stdout. E.g., on linux one can do

    pandoc -f markdown -t docx MANUAL.txt -o /dev/stdout

Similar devices might exist on other platforms as well.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Pandoc output to stdout
       [not found]             ` <CALwjjMjQDADwEYGPoM0mHqtdauQPKadgEJ4xuW=DDsAdLovTYg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-07-20  2:52               ` Mirjalol Norqulov
       [not found]                 ` <f824b8a8-acef-4d19-9d88-f302b1681172-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Mirjalol Norqulov @ 2017-07-20  2:52 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1497 bytes --]

I have a data in a database in latex format and I want to convert it to 
docx. But for converting using pandoc I have to create a file. Is there 
other way to convert using pandoc without files?
среда, 19 июля 2017 г., 23:07:01 UTC+5 пользователь John O'Regan написал:
>
> Hi Mirjalol, 
>
> Yes, .docx and .pdf files use a binary format and writing them to 
> STDOUT isn't a good idea. 
>
> You'll have to first create your .docx file using Pandoc, and then 
> read in the file using a programming language.  Pandoc is scriptable 
> and can be easily incorporated into programs, but to programatically 
> edit the contents of a .docx file requires expertise in the .docx file 
> format... and infinite patience! :) 
>
> Please explain in more detail what you're trying to do and we'll see 
> if we can find a simpler solution to your problem. 
>
> BFN! 
>
> John 
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/f824b8a8-acef-4d19-9d88-f302b1681172%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2070 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Pandoc output to stdout
       [not found]                 ` <f824b8a8-acef-4d19-9d88-f302b1681172-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-07-20  5:11                   ` Ivan Lazar Miljenovic
  2017-07-21 21:24                   ` Kolen Cheung
  1 sibling, 0 replies; 10+ messages in thread
From: Ivan Lazar Miljenovic @ 2017-07-20  5:11 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 20 July 2017 at 12:52, Mirjalol Norqulov <mirjalol2401-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> I have a data in a database in latex format and I want to convert it to
> docx. But for converting using pandoc I have to create a file. Is there
> other way to convert using pandoc without files?

From the [user's guide]

> Output goes to stdout by default (though output to stdout is disabled for the odt, docx, epub, and epub3 output formats).

[user's guide]: http://pandoc.org/MANUAL.html#using-pandoc

Note that these four formats are all actually zip files; as such,
writing to stdout doesn't make as much sense for the usual case as it
wouldn't be textual output.  Something you could check is to try and
see if pandoc respects the semi-standard output file of "-" (sans
quotes) that represents "write to stdout".

I'd handle this by creating a temporary directory, writing to a file
there, reading the raw file and then doing whatever you need with
that.

Alternatively, if you are comfortable in Haskell, you may be able to
use the Pandoc API to not actually write to a file.

> среда, 19 июля 2017 г., 23:07:01 UTC+5 пользователь John O'Regan написал:
>>
>> Hi Mirjalol,
>>
>> Yes, .docx and .pdf files use a binary format and writing them to
>> STDOUT isn't a good idea.
>>
>> You'll have to first create your .docx file using Pandoc, and then
>> read in the file using a programming language.  Pandoc is scriptable
>> and can be easily incorporated into programs, but to programatically
>> edit the contents of a .docx file requires expertise in the .docx file
>> format... and infinite patience! :)
>>
>> Please explain in more detail what you're trying to do and we'll see
>> if we can find a simpler solution to your problem.
>>
>> BFN!
>>
>> John
>
> --
> You received this message because you are subscribed to the Google Groups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/f824b8a8-acef-4d19-9d88-f302b1681172%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
http://IvanMiljenovic.wordpress.com

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CA%2Bu6gbw9mjq_Li1J_8_Q%3DauCS1Dn2F3irsw_m3UkEXfCHwk7qg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Pandoc output to stdout
       [not found]                 ` <f824b8a8-acef-4d19-9d88-f302b1681172-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2017-07-20  5:11                   ` Ivan Lazar Miljenovic
@ 2017-07-21 21:24                   ` Kolen Cheung
  1 sibling, 0 replies; 10+ messages in thread
From: Kolen Cheung @ 2017-07-21 21:24 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 150 bytes --]

I think a more important detail is what you want to do with the docx if you don't want a file? It seems like you want to redirect it to another tool.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Pandoc output to stdout
       [not found]         ` <b2bbef60-8140-41e9-bba9-a80f84bb776c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2017-07-19 18:06           ` John O'Regan
  2017-07-19 21:09           ` Albert Krewinkel
@ 2017-07-23  8:02           ` John MacFarlane
  2 siblings, 0 replies; 10+ messages in thread
From: John MacFarlane @ 2017-07-23  8:02 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Starting with version 1.18, pandoc can write docx output to
stdout, but it will only do this when the output is being
piped, not when the output is to the terminal.

+++ Mirjalol Norqulov [Jul 19 17 10:26 ]:
>   I'm converting to docx, it seems pandoc can not write docx output to
>   stdout. Any ideas?
>   среда, 19 июля 2017 г., 16:43:08 UTC+5 пользователь John O'Regan
>   написал:
>
>     Hi Mirjalol,
>     If you don't specify an output file on the command line, Pandoc will
>     write to STDOUT by default.
>     John
>
>   --
>   You received this message because you are subscribed to the Google
>   Groups "pandoc-discuss" group.
>   To unsubscribe from this group and stop receiving emails from it, send
>   an email to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [3]https://groups.google.com/d/msgid/pandoc-discuss/b2bbef60-8140-41e9-
>   bba9-a80f84bb776c%40googlegroups.com.
>   For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. https://groups.google.com/d/msgid/pandoc-discuss/b2bbef60-8140-41e9-bba9-a80f84bb776c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20170723080219.GF67976%40macbook-air-2.home.
For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-07-23  8:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-19 10:56 Pandoc output to stdout Mirjalol Norqulov
     [not found] ` <3e6f4efa-c3d5-4fd0-8692-38ecd6484ad8-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-07-19 11:43   ` John O'Regan
     [not found]     ` <CALwjjMiABu3rX8P=kNic4B-n-yXLC-XtuSLCguvcr2p_kTHmKQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-07-19 17:13       ` Mirjalol Norqulov
2017-07-19 17:26       ` Mirjalol Norqulov
     [not found]         ` <b2bbef60-8140-41e9-bba9-a80f84bb776c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-07-19 18:06           ` John O'Regan
     [not found]             ` <CALwjjMjQDADwEYGPoM0mHqtdauQPKadgEJ4xuW=DDsAdLovTYg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-07-20  2:52               ` Mirjalol Norqulov
     [not found]                 ` <f824b8a8-acef-4d19-9d88-f302b1681172-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-07-20  5:11                   ` Ivan Lazar Miljenovic
2017-07-21 21:24                   ` Kolen Cheung
2017-07-19 21:09           ` Albert Krewinkel
2017-07-23  8:02           ` John MacFarlane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).