Created
November 16, 2014 21:58
-
-
Save barefootcoder/d49b6a4f24e80bc054c9 to your computer and use it in GitHub Desktop.
Code and example call for "Git-Like Menus". (see http://blogs.perl.org/users/buddy_burden/2014/11/git-like-menus.html)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mini_menu("ratsvc \n\$" => "What shall we do with it? ", | |
premenu => sub { | |
say ''; | |
say $album->basename, ':'; | |
say ''; | |
system qq{ ls -C "$album" }; | |
system qq{ check-picard "$album" }; | |
}, | |
help => { | |
r => "reset and reclean", | |
a => "reset artist sort order", | |
t => "reset title sort order", | |
s => "break title into title/subtitle", | |
v => "fix vocals frames", | |
c => "reset comments to v1 values", | |
"\n" => "check again", | |
' ' => "move on", | |
'$' => "go to a command prompt", | |
}, | |
dispatch => { | |
r => sub { die qq{ RE-PROCESS "$album" }; }, | |
a => sub { system qq{ sort-order "$album" A: }; 1 }, | |
t => sub { system qq{ sort-order "$album" T: }; 1 }, | |
s => sub { name_tweak qq{ subtitle "$album" }; 1 }, | |
v => sub { system qq{ comments-from-vocals "$album" }; 1 }, | |
c => sub { system qq{ comments-from-v1 "$album" }; 1 }, | |
' ' => undef, | |
"\n" => sub { 1 }, | |
'$' => sub { system("bash"); 1 }, | |
}, | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment