NAME
App::perlmv::scriptlets::std - A collection of perlmv scriptlets
VERSION
This document describes version 0.608 of App::perlmv::scriptlets::std (from Perl distribution App-perlmv), released on 2023-07-15.
SCRIPTLETS
dedup-space
Replace multiple spaces into a single space, example (<space> signifies actual space): "1<space><space>2.txt " -> "1<space>2.txt"
keep-one-ext
Remove all but the last file extension if there are more than one, e.g. (1.tar, 2.mp3.mp3) -> (1.tar, 2.mp3). TODO: treat tar.gz/tar.bz2/etc as one extension.
pinyin
Rename Chinese characters in filename into their pinyin. Requires Lingua::Han::Pinyin.
remove-ext
Remove the last file extension, e.g. (1, 2.mp3, 3.tar.gz) -> (1, 2, 3.tar)
remove-all-ext
Remove all file extensions, e.g. (file.html.gz) -> (file)
to-number
Rename files into numbers. Ex: (file1.txt, foo.jpg, quux.mpg) -> (1.txt, 2.jpg, 3.mpg). See also: to-number-ext.
to-number-ext
Rename files into numbers. Preserve extensions. Ex: (file1.txt, foo.jpg, quux.mpg) -> (1.txt, 2.jpg, 3.mpg)
to-timestamp
Rename files into timestamp. Ex: file1.txt -> 2010-05-13-10_43_49. See also: to-timestamp-ext.
to-timestamp-ext
Rename files into timestamp. Preserve extensions. Ex: file1.txt -> 2010-05-13-10_43_49.txt
trim
Remove leading and trailing blanks, example: " abc def .txt " -> "abc def.txt"
unaccent
Remove accents in filename, e.g. accéder.txt -> acceder.txt. Requires Text::Unaccent::PurePerl.
HAVE MORE?
If you have cool scriptlets to share, feel free to contact me so I can include them here.
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/App-perlmv.
SOURCE
Source repository is at https://github.com/perlancar/perl-App-perlmv.
AUTHOR
perlancar <perlancar@cpan.org>
CONTRIBUTING
To contribute, you can send patches by email/via RT, or send pull requests on GitHub.
Most of the time, you don't need to build the distribution yourself. You can simply modify the code, then test via:
% prove -l
If you want to build the distribution (e.g. to try to install it locally on your system), you can install Dist::Zilla, Dist::Zilla::PluginBundle::Author::PERLANCAR, Pod::Weaver::PluginBundle::Author::PERLANCAR, and sometimes one or two other Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond that are considered a bug and can be reported to me.
COPYRIGHT AND LICENSE
This software is copyright (c) 2023, 2022, 2020, 2015, 2014, 2013, 2012, 2011, 2010 by perlancar <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.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-perlmv
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.