|
This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html Set by lizmat on 8 June 2022. |
|||
|
01:36
Manifest0 left
|
|||
| nikshalark | would anyone want to help a humble raku beginner spruce up their scripts | 01:48 | |
| show me the light on how things could possibly be done | |||
| perl for dir(test => rx{:i '.' mov $}) -> $filename { say $filename; run 'ffmpeg', '-i', $filename, "frames/{$filename}%05d.png"; } indir( "frames", { my @frames = dir(); @frames .= @frames.pick(@frames); my @ordered = map {$_ ~ ".png"}, 1..@frames; say @ordered; for @frames X @ordered -> $source, $dest { say $source; say $dest; move $source, | 01:49 | ||
| $dest or die "nah"; } }); | |||
| ive gotten to here, but i need my @frames to be their basename instead of the IO::Path object i think, thats why move is dying (i think) | 01:50 | ||
| i ask for someone to tell me what the heck i could do better | 02:04 | ||
| .landyacht. | I wouldn't say anything is wrong with it honestly | 02:34 | |
| there are things you could do differently, but I don't know if they're better | 02:35 | ||
| map {$_ ~ ".png"}, 1..@frames could become (1..@frames) »~» '.png' | 02:38 | ||
| also, isn't this going to mix different videos? | 02:39 | ||
| or maybe that's intended | 02:40 | ||
| nikshalark | thats the intention!! | 03:24 | |
| i had the thought of taking all the videos i have in a folder and combining all the frames together | 03:25 | ||
| like im playing 52-card pickup | |||
| even if theres nothing wrong, id like to know how else i could do this | |||
|
03:53
discord-raku-bot left
03:54
discord-raku-bot joined
|
|||
| .landyacht. | you could get rid of some variables with something like this indir('frames', { for dir.pick(*) -> $source { state $i++; move $source, "$i.png" or die 'A horrible death'; } }); | 05:24 | |
|
10:01
Manifest0 joined
|
|||