Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Support printing to stdout #12

Closed
maxhawkins opened this issue Feb 20, 2021 · 3 comments
Closed

Support printing to stdout #12

maxhawkins opened this issue Feb 20, 2021 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@maxhawkins
Copy link

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
@zoni zoni added enhancement New feature or request good first issue Good for newcomers labels Jul 27, 2021
@AB1908
Copy link

AB1908 commented Sep 20, 2021

It's a "nice to have" for sure, but I can't see the necessity of it especially since we can cat the output. Could you explain a use-case where a pipe is a necessity?

I can't actually fix the issue or anything but I'm curious to see how you use it.

@maxhawkins
Copy link
Author

maxhawkins commented Sep 20, 2021

It's a unix philosophy thing, mostly. Writing to stdout makes it easier to chain together programs without intermediate files.

Something like:

obsidian-export doc.md | sed 's/today/9-19-21/' | pandoc -f markdown -t html | ./upload-to-server.sh

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.

@AB1908
Copy link

AB1908 commented Sep 20, 2021

Ah, fair enough. Thanks for the explanation.

Repository owner locked and limited conversation to collaborators Jan 2, 2022
@zoni zoni converted this issue into discussion #61 Jan 2, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants