App-YoutubeDlUtils
view release on metacpan or search on metacpan
script/youtube-dl-timestamp view on Meta::CPAN
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;
use warnings;
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
% youtube-dl-timestamp https://www.youtube.com/playlist?list=PL8dPuuaLjXtPAJr1ysd5yGIyiSFuh0mIL
=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:
( run in 1.295 second using v1.01-cache-2.11-cpan-b16cb0d3907 )