The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more

#!perl
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2020-09-09'; # DATE
our $DIST = 'App-YoutubeDlUtils'; # DIST
our $VERSION = '0.007'; # VERSION
# FRAGMENT id=shcompgen-hint command=_youtube-dl
use 5.010001;
use strict;
system "youtube-dl", "-o", '%(upload_date)s-%(title)s-%(id)s.%(ext)s', @ARGV;
# PODNAME: youtube-dl-timestamp
# ABSTRACT: Download video with youtube-dl, prefix filename with upload date
__END__
=pod
=encoding UTF-8
=head1 NAME
youtube-dl-timestamp - Download video with youtube-dl, prefix filename with upload date
=head1 VERSION
This document describes version 0.007 of youtube-dl-timestamp (from Perl distribution App-YoutubeDlUtils), released on 2020-09-09.
=head1 SYNOPSIS
=head1 DESCRIPTION
This is a wrapper for B<youtube-dl> which does the following:
=over
=item * add upload date prefix (YYYYMMDD) to the filename
The wrapper adds this option:
C
-o '%(upload_date)s-%(title)s-%(id)s.%(ext)s'
So instead of the default '%(title)s-%(id)s.%(ext)s' filename pattern like
these:
Introduction to Astronomy: Crash Course Astronomy #1-0rHUDWjR5gg.mp4
Naked Eye Observations: Crash Course Astronomy #2-L-Wtlev6suc.mp4
Cycles in the Sky: Crash Course Astronomy #3-01QWC-rZcfE.mp4
...
you get:
20150115-Introduction to Astronomy: Crash Course Astronomy #1-0rHUDWjR5gg.mp4
20150122-Naked Eye Observations: Crash Course Astronomy #2-L-Wtlev6suc.mp4
20150129-Cycles in the Sky: Crash Course Astronomy #3-01QWC-rZcfE.mp4
...
=back
=head1 HOMEPAGE
Please visit the project's homepage at L<https://metacpan.org/release/App-YoutubeDlUtils>.
=head1 SOURCE
=head1 BUGS
Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=App-YoutubeDlUtils>
When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.
=head1 SEE ALSO
Other youtube-dl wrappers in L<App::YoutubeDlUtils> and L<App::YoutubeDlIf>.
=head1 AUTHOR
perlancar <perlancar@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut