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

-o Add template for dd, mm, yy (day-month-year) #228

Closed
non7top opened this issue Nov 25, 2011 · 4 comments
Closed

-o Add template for dd, mm, yy (day-month-year) #228

non7top opened this issue Nov 25, 2011 · 4 comments

Comments

@non7top
Copy link

@non7top non7top commented Nov 25, 2011

As of now there is %(autonumber)s, which allows to add autoincreament number which is handy to get autosort of files. But when there is a new video added to list the numbers will shift and '--no-overwrites' option will become useless, as well as there will now be two files with each number 0001, 0002 etc.

Having day,month,year in template will still make use of no overwrites and will still allow to get latest file in top of list, i.e.
%(yy)s.%(mm)s.%(dd)s-%(title)s.%(ext)s

@phihag
Copy link
Contributor

@phihag phihag commented Nov 25, 2011

Day, month, and year would refer to the date of the video (since you can easily use $(date) to get the current date in the filename). Shouldn't be too hard, but we'll have to decide what to print when the number is not available. None? noday? `` (empty string)?

@non7top
Copy link
Author

@non7top non7top commented Nov 25, 2011

Yes, I meant the video date. As for the case when video date is not available, returning current date seems to be quite reasonable, it will be more close to autoincreament and will not break sorting

@non7top
Copy link
Author

@non7top non7top commented Nov 27, 2011

After some digging in the code I've found that it is possible to use upload_date in template%(upload_date)s-%(stitle)s.%(ext)s which gives me '20111117-Американский_пирог_Все_в_сборе_Русский_трейлер.mp4' almost exactly what I need.
It might still make sense to have something like --list-template-values and/or --dump to dump the contents of info_dict in order to improve user experience and documentation.

@phihag
Copy link
Contributor

@phihag phihag commented Nov 27, 2011

Since some of the info_dict values are an implementation detail, offering to list them would be a bad idea.

@phihag phihag closed this in 31a2ec2 Nov 28, 2011
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.