Skip to content

Instantly share code, notes, and snippets.

@tbrowder
Created November 4, 2024 13:39
Show Gist options
  • Save tbrowder/fb3348a69929d0b7c9f907e83e477ca2 to your computer and use it in GitHub Desktop.
Save tbrowder/fb3348a69929d0b7c9f907e83e477ca2 to your computer and use it in GitHub Desktop.
use rak in a script
#!/usr/bin/env raku
use rak;
my $rak = rak
#{.meets-the-test},
:find,
#:extensions<pbf otf ttf woff t1>,
:file(/'.' [pfb|t1|ttf|woff|otf] $/),
:paths</usr/share/fonts /Users ~/Library/Fonts>,
:absolute,
:is-readable,
#:encoding<ascii>,
:quietly,
:silently<err>,
#:unique,
;
for $rak.result -> (:key($path), :value(@found)) {
if @found {
say "$path:";
say .key ~ ':' .value for @found;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment