Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
WWW::YoutubeViewer::UtUser3Contributed Perl DocumeWWW::YoutubeViewer::Utils(3)

NAME
       WWW::YoutubeViewer::Utils - Various utils.

SYNOPSIS
	   use WWW::YoutubeViewer::Utils;

	   my $yv_utils	= WWW::YoutubeViewer::Utils->new(%opts);

	   print $yv_utils->format_time(3600);

SUBROUTINES/METHODS
   new(%opts)
       Options:

       thousand_separator => ""
	   Character used as thousand separator.

       months => []
	   Month names for format_date()

       youtube_url_format => ""
	   A youtube URL format	for sprintf(format, videoID).

   extension($type)
       Returns the extension format from a given type.

       From a string like 'video/webm;+codecs="vp9"', it returns 'webm'.

   format_time($sec)
       Returns time from seconds.

   format_duration($duration)
       Return time (01:20:10) from duration (PT1H20M10S).

   format_date($date)
       Return string "04 May 2010" from	"2010-05-04T00:25:55.000Z"

   date_to_age($date)
       Return the (approximated) age for a given date of the form
       "2010-05-04T00:25:55.000Z".

   has_entries($result)
       Returns true if a given result has entries.

   normalize_video_title($title, $fat32safe)
       Replace file-unsafe characters and trim 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)
       Return the number with thousand separators.

   get_video_id($info)
       Get videoID.

   get_description($info)
       Get description.

   get_title($info)
       Get title.

   get_thumbnail_url($info;$type='default')
       Get thumbnail URL.

AUTHOR
       Trizen, "<echo dHJpemVuQHByb3Rvbm1haWwuY29tCg== | base64	-d>"

SUPPORT
       You can find documentation for this module with the perldoc command.

	   perldoc WWW::YoutubeViewer::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 <http://dev.perl.org/licenses/> for more information.

perl v5.32.1			  2021-03-01	  WWW::YoutubeViewer::Utils(3)

NAME | SYNOPSIS | SUBROUTINES/METHODS | AUTHOR | SUPPORT | LICENSE AND COPYRIGHT

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=WWW::YoutubeViewer::Utils&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help