### ----------------------------------------------------
### -- Collection-Plugin-Development
### -- Licenses: Artistic-2.0
### -- Authors: Richard Hainsworth, aka finanalyst
### -- File: lib/plugins/html/secondaries/cleanup.raku
### ----------------------------------------------------
#!/usr/bin/env raku
use v6.d;
sub ($pr, %processed, %options --> Array) {
    for <html html/routine html/syntax html/hashed> -> $d {
        for $d.IO.dir(test => *.ends-with('html')) {
            note "deleting $_"
               if %options<collection-info>;
            .unlink
        }
    }
    'prettyurls'.IO.unlink if 'prettyurls'.IO ~~ :e & :f;
    []
}


