Support printing to stdout #61
Replies: 4 comments
-
It's a "nice to have" for sure, but I can't see the necessity of it especially since we can I can't actually fix the issue or anything but I'm curious to see how you use it. |
Beta Was this translation helpful? Give feedback.
-
It's a unix philosophy thing, mostly. Writing to stdout makes it easier to chain together programs without intermediate files. Something like:
It's especially important when you're processing a whole bunch at once (with parallel for instance) and don't want to litter your filesystem with temporary files you need to clean up later. |
Beta Was this translation helpful? Give feedback.
-
Ah, fair enough. Thanks for the explanation. |
Beta Was this translation helpful? Give feedback.
-
I generally adhere strongly to Unix principles when designing CLI applications, but not supporting output to stdout has so far been a deliberate design decision here. Although I've since incorporated ways to more flexibly export individual files, In many cases, when you invoke it, it will export multiple files. Exporting only a single file is a little bit of a special case right now. If I were to support writing to stdout, what should happen when multiple files are being exported? Should it print everything to stdout, effectively concatenating all notes with no way to distinguish where one ends and another one begins? Should this cause an error? (It's also likely that if I implement this, one will have to explicitly pass |
Beta Was this translation helpful? Give feedback.
-
It would be useful to support printing the output to stdout instead of providing a filename.
That way you could pipe the output to another program like:
obsidian-export doc.md | pandoc -f markdown -t html
Beta Was this translation helpful? Give feedback.
All reactions