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

Patch for setting title of Command Prompt in windows #3

Closed
rg3 opened this issue Nov 1, 2010 · 3 comments
Closed

Patch for setting title of Command Prompt in windows #3

rg3 opened this issue Nov 1, 2010 · 3 comments
Labels

Comments

@rg3
Copy link
Collaborator

@rg3 rg3 commented Nov 1, 2010

Was: http://bitbucket.org/rg3/youtube-dl/issue/214/

So I have tweaked my little patch so that it doesn't do bad things on linux/mac. Note the check for the os.

def report_progress(self, percent_str, data_len_str, speed_str, eta_str):
                """Report download progress."""
                if self.params.get('noprogress', False):
                        return
                if (os.name == 'nt'):
                        os.system('title youtube-dl [%s]' % percent_str)                        
                self.to_stdout(u'\r[download] %s of %s at %s ETA %s' %
                                (percent_str, data_len_str, speed_str, eta_str), skip_eol=True)
@rg3
Copy link
Collaborator Author

@rg3 rg3 commented Nov 1, 2010

Just wanted to clarify that, even if this issue has been open for a long time, I'm not against this feature. However, I'd like it to be optional (because it does not work on Linux virtual terminals, for example), to work on every platform, and not to launch a program every time the title has to be changed.

@yaplik
Copy link

@yaplik yaplik commented Dec 9, 2010

setting title on linux: http://www.faqs.org/docs/Linux-mini/Xterm-Title.html

import sys
sys.stdout.write("\x1b]0;newtitle\x07")
@rg3
Copy link
Collaborator Author

@rg3 rg3 commented Jan 4, 2011

Implemented by grawity and merged.

@siddht4 siddht4 mentioned this issue Apr 25, 2016
1 of 8 tasks complete
@Jimi-James Jimi-James mentioned this issue Jul 13, 2016
4 of 8 tasks complete
@TammysHead TammysHead mentioned this issue Aug 4, 2017
4 of 8 tasks complete
@Rektis Rektis mentioned this issue Jul 30, 2018
5 of 9 tasks complete
@ghost ghost mentioned this issue Aug 17, 2018
1 of 5 tasks complete
@svalavuo svalavuo mentioned this issue Oct 2, 2020
6 of 6 tasks complete
This issue was closed.
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
2 participants
You can’t perform that action at this time.