The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

File::Groups - File extensions and media types, grouped by application and type

SYNOPSIS

Methods on File::Groups return classes containing a set of media types and file extensions. These are accessible via the media_types and extensions methods, which return Array refs of values. By default only commonly used values are returned. To return all know values pass 1 to either method, e.g., class->media_types(1)

In some cases additional methods can be called on the object to further restrict the set.

Let's look at some examples.

IMAGES & VIDEO

Retrieve a list of file extensions or media types used by images and video:

 use File::Groups;

 File::Groups->image->extensions;   # ['bmp', 'gif', 'ico', 'jpeg', ... ]
 File::Groups->image->media_types;  # ['image/bmp', 'image/x-ms-bmp', 'image/gif', ... ]
 File::Groups->video->extensions;   # ['asf', 'mov', 'qt', 'movie', ... ]
 File::Groups->video->media_types;  # ['video/x-ms-asf', 'video/quicktime', ... ]

Images can be filtered on by raster, vector, or web:

 File::Groups->image->web->extensions;     # ['gif', 'jpeg', 'jpg', 'png', 'svg', 'webp']
 File::Groups->image->raster->extensions;  # ['bmp', 'gif', 'ico', 'jpeg', 'jpg', 'tif', 'tiff', 'webp']
 File::Groups->image->vector->extensions;  # ['svg']

For a complete list pass 1 to any of these methods:

 File::Groups->image->web->extensions(1);  # ['bmp', 'dib', 'gif', 'ico', 'jfif', 'jpe', 'jpeg', ... ]

SPREADSHEETS

Retrieve a list of file extensions or media types used by spreadsheets:

 use File::Groups;

 File::Groups->spreadsheet->extensions;  # ['csv', 'xls', 'xlsx', 'xlt', ... ]
 File::Groups->spreadsheet->media_types; # ['text/csv', 'application/vnd.ms-excel', ... ]

If you only want values specific to Microsoft Excel:

 File::Groups->spreadsheet->excel->extensions;  # ['xls', 'xlsx', 'xlt', 'xltx', 'xlw']
 File::Groups->spreadsheet->excel->media_types; # ['application/vnd.ms-excel', ... ]

Or for OpenOffice Calc:

 File::Groups->spreadsheet->calc->extensions;  # ['ods', 'ots']

By default these only return common extensions, to return all:

  File::Groups->spreadsheet->excel->extensions(1);  # ['xls', 'xlsx', 'xlt', 'xltx', ... ]

EVERYTHING ELSE

See https://github.com/sshaw/file_groups/blob/master/README.md#groups.

AUTHOR

Skye Shaw (skye.shaw -AT- gmail)

COPYRIGHT

Copyright (c) 2020 Skye Shaw. All rights reserved.

LICENSE

https://opensource.org/licenses/MIT

1 POD Error

The following errors were encountered while parsing the POD:

Around line 521:

alternative text 'https://github.com/sshaw/file_groups/blob/master/README.md#groups' contains non-escaped | or /