Skip to content
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

Pass useful information via STDOUT #3442

Closed
kevinburke opened this issue Aug 5, 2014 · 3 comments
Closed

Pass useful information via STDOUT #3442

kevinburke opened this issue Aug 5, 2014 · 3 comments

Comments

@kevinburke
Copy link

@kevinburke kevinburke commented Aug 5, 2014

A common flow for me is something like

  • download a file
  • perform an operation on the just-downloaded file

Currently I have to download the file, identify the filename as part of the output (Destination: blah), then manually take action - it's impossible to predict the filename beforehand.

It would be really nice if there was a flag that made all of the "Downloading webpage" etc information go to stderr, and the filename get printed to stdout, so you can pipe it to further programs or capture it in a shell script.

For reference, this is what curl does by default - the information about file transfer is sent to stderr so the downloaded webpage can be interacted with at the command line.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 5, 2014

You can specify the filename yourself with --output flag. As well as you can predict the default filename using simulation run with --get-filename flag just before the actual download.

@phihag
Copy link
Contributor

@phihag phihag commented Aug 5, 2014

Use -o - - this does precisely what you request.

Can you tell us where you searched for this option? We'll add a note there.

@phihag phihag closed this Aug 5, 2014
@kevinburke
Copy link
Author

@kevinburke kevinburke commented Aug 5, 2014

Ah, great. I found --get-filename and was using that:

https://bitbucket.org/kevinburke/small-dotfiles/src/fab0e092dbf11ceab623895b8c2964550e9c49ea/bin/sc?at=master

I ran youtube-dl --help and scanned the output for anything that looked
useful. I found --get-filename but must have just missed --output. :(

Kevin Burke
phone: 925.271.7005 | kev.inburke.com

On Tue, Aug 5, 2014 at 8:51 AM, Philipp Hagemeister <
notifications@github.com> wrote:

Closed #3442 #3442.


Reply to this email directly or view it on GitHub
#3442 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.