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
#!/bin/bash | |
# NOTE: I recommend pdfsandwich instead of this script, partly because imagemagick (and pdftoppm) fail on large detailed images. | |
# While that technique does not preserve the original graphics, it can come close. | |
# To preserve color: | |
# pdfsandwich -rgb input.pdf | |
# To preserve grey tones: | |
# pdfsandwich -gray input.pdf | |
# To disable all preprocessing: | |
# pdfsandwich -nopreproc input.pdf |
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
#!/usr/bin/env perl6 | |
use Test; | |
my IO::Path $root-dir = ".".IO.absolute.IO; | |
sub setup { | |
mkdir 'files/40001/20006/10002'; | |
'files/40001/20006/10002/0111'.IO.open(:w).close; | |
mkdir 'files/40009/20032'; |
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
#!/usr/bin/env perl6 | |
# I run this in a directory with 30k files. | |
# I suggest using a SSD if you have one, for your sanity. | |
use v6; | |
sub gather-files(Str $start-path --> List) { | |
# Gather a list of all files. Run this is a huge directory. | |
my $files = Channel.new; |