{"id":19263549,"url":"https://github.com/trapd00r/with","last_synced_at":"2025-02-23T19:13:53.335Z","repository":{"id":1385654,"uuid":"1350230","full_name":"trapd00r/with","owner":"trapd00r","description":"Execute Perl code on files matching pattern","archived":false,"fork":false,"pushed_at":"2024-06-08T08:07:41.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-05T10:42:07.445Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trapd00r.png","metadata":{"files":{"readme":"README.pod","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-02-10T10:46:39.000Z","updated_at":"2021-04-19T09:05:40.000Z","dependencies_parsed_at":"2025-01-05T14:46:56.819Z","dependency_job_id":null,"html_url":"https://github.com/trapd00r/with","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapd00r%2Fwith","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapd00r%2Fwith/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapd00r%2Fwith/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapd00r%2Fwith/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trapd00r","download_url":"https://codeload.github.com/trapd00r/with/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240364364,"owners_count":19789760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T19:36:10.710Z","updated_at":"2025-02-23T19:13:53.262Z","avatar_url":"https://github.com/trapd00r.png","language":"Perl","readme":"=pod\n\n=head1 NAME\n\nwith - execute Perl code on files matching pattern\n\n=head1 SYNOPSIS\n\n  with -pattern PATTERN -do CODE FILES\n\n=head1 DESCRIPTION\n\nB\u003cwith\u003e takes a PATTERN, possibly a regular expression, a PATH and a piece of\nPerl code that'll be executed on every matching file in turn.\n\nThe Perl code will be injected in a C\u003cfor(@_) { ... }\u003e block.\n\n    sub {\n        use strict 'refs';\n        BEGIN {\n            $^H{'feature_say'} = q(1);\n        }\n        foreach $_ (@_) {\n          # YOUR CODE INJECTED HERE\n        }\n    }\n\nNote that C\u003csay()\u003e is imported for convience.\n\nThe C\u003c--depth\u003e flag controls how many directories we'll descend into. The\ndefault is infinite.\n\n=head1 OPTIONS\n\n  -do,    --do        execute \u003ccode\u003e for every file\n  -p,     --pattern   match files with pattern\n  -mp,    --mplayer   play with mplayer\n  -de,    --depth     descend at most n levels of directories\n\n  -h,     --help      show the help and exit\n  -v,     --version   show version info and exit\n  -m,     --man       show the documentation and exit\n\n=head1 EXAMPLES\n\nFind all music videos by Laleh, in 720p and mkv format. Print the results with\nLS_COLORS attributes (Need L\u003cFile::LsColor\u003e).\n\n  with -pattern 'laleh.*720.*\\.mkv$' -do 'say ls_color($_)' $HOME/Mvids\n\nFind all persistent undo files vim has created and remove them.\n\n  with -pattern '\\.un~$' -do 'print \"$_ deleted\\n\" if unlink $_'\n\n\n=head1 AUTHOR\n\n  Magnus Woldrich\n  CPAN ID: WOLDRICH\n  magnus@trapd00r.se\n  http://japh.se\n\n=head1 CONTRIBUTORS\n\nNone required yet.\n\n=head1 COPYRIGHT\n\nCopyright 2011 the B\u003cwith\u003e L\u003c/AUTHOR\u003e and L\u003c/CONTRIBUTORS\u003e as listed above.\n\n=head1 LICENSE\n\nThis program is free software; you may redistribute it and/or modify it under\nthe same terms as Perl itself.\n\n=cut\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrapd00r%2Fwith","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrapd00r%2Fwith","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrapd00r%2Fwith/lists"}