bookcrop

Miscellaneous tools for digitizing books
git clone git://lumidify.org/bookcrop.git (fast, but not encrypted)
git clone https://lumidify.org/bookcrop.git (encrypted, but very slow)
git clone git://4kcetb7mo7hj6grozzybxtotsub5bempzo4lirzc3437amof2c2impyd.onion/bookcrop.git (over tor)
Log | Files | Refs | README

everysecond.pl (264B)


      1 #!/usr/bin/env perl
      2 
      3 # give every second file
      4 
      5 use strict;
      6 use warnings;
      7 
      8 my $start = shift;
      9 my $end = shift;
     10 
     11 while ($ARGV[0] ne $start) {
     12 	shift;
     13 }
     14 
     15 foreach my $i (0..$#ARGV) {
     16 	if ($i % 2 == 0) {
     17 		print(" $ARGV[$i]");
     18 	}
     19 	if ($ARGV[$i] eq $end) {
     20 		last;
     21 	}
     22 }