WWW::P...:Utils(3pm)
π NAME π
okay bestie, this is WWW::PipeViewer::Utils β the WWW::P...:Utils(3pm) page from User Contributed Perl Documentation π«Ά. It's literally Various utils. no cap β¨.
π SYNOPSIS π
use WWW::PipeViewer::Utils;
my $yv_utils = WWW::PipeViewer::Utils->new(%opts);
print $yv_utils->format_time(3600);
π SUBROUTINES/METHODS π
here's the whole method lineup, no skips, no crumbs π₯
πΈ new(%opts) πΈ
the options are:
thousand_separator => ""β character used as thousand separator πΈmonths => []β month names forformat_date()πyoutube_video_url_format => ""β a video YouTube URL format forsprintf(format, videoID)π¬youtube_channel_url_format => ""β a channel YouTube URL format forsprintf(format, channelID)πΊyoutube_playlist_url_format => ""β a playlist YouTube URL format forsprintf(format, playlistID)πΆ
π¦ extension($type) π¦
returns the extension format from a given type. feed it something like 'video/webm;+codecs="vp9"' and it returns 'webm' β¨.
β° format_time($sec) β°
returns time from seconds β³.
π°οΈ format_duration($duration) π°οΈ
returns seconds from duration (PT1H20M10S) β yes, the other direction, slay π
.
π
format_date($date) π
returns the string "04 May 2010" from "2010-05-04T00:25:55.000Z" π.
π§ date_to_age($date) π§
returns the (approximated) age for a given date of the form "2010-05-04T00:25:55.000Z" π.
π₯ get_entries($result) π₯
returns the entries for a given result π«Ά.
β
has_entries($result) β
returns true if a given result has entries π.
π§Ό normalize_filename($title, $fat32safe) π§Ό
replaces file-unsafe characters and trims spaces π§.
π format_text(%opt) π
formats a text with information from streaming and video info. the structure of %opt is:
(
streaming => HASH,
info => HASH,
text => STRING,
escape => BOOL,
fat32safe => BOOL,
)
π’ set_thousands($num) π’
returns the number with thousand separators π―.
π₯ get_video_id($info) π₯
gets videoID π¬.
π get_description($info) π
gets description π.
π·οΈ get_title($info) π·οΈ
gets title π·οΈ.
πΌοΈ get_thumbnail($info;$xsize,$ysize) πΌοΈ
gets the smallest thumbnail of at least ${xsize}x${ysize} πΈ. the signature literally has that semicolon, iykyk π
.
π«Ά AUTHOR π«Ά
Trizen, "<echo dHJpemVuQHByb3Rvbm1haWwuY29tCg== | base64 -d>" β yes, the contact line is literally that command, iconic π.
π¬ SUPPORT π¬
you can find documentation for this module with the perldoc command π«Ά:
perldoc WWW::PipeViewer::Utils
π LICENSE AND COPYRIGHT π
Copyright 2012-2020 Trizen.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See <https://dev.perl.org/licenses/> for more information.
okay bestie that's the whole page π β source/version vibes: perl v5.42.2, dated 2024-09-28, footer manual WWW::P...:Utils(3pm) ππ
π¦ where this page comes from
- alpine 3.24: pipe-viewer-doc 0.5.3-r0 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms