diff auto-weave.pl @ 13:be73e58d4b24 v0.1

cleanup
author Robert McIntyre <rlm@mit.edu>
date Tue, 25 Oct 2011 08:09:06 -0700
parents 24ff8a9c76c4
children 6ef9ccf7a17e
line wrap: on
line diff
     1.1 --- a/auto-weave.pl	Tue Oct 25 08:01:43 2011 -0700
     1.2 +++ b/auto-weave.pl	Tue Oct 25 08:09:06 2011 -0700
     1.3 @@ -7,7 +7,6 @@
     1.4  my $inotify = new Linux::Inotify2
     1.5    or die "unable to create new inotify object: $!";
     1.6  
     1.7 -
     1.8  @org_files =  glob("./org/*.org");
     1.9  
    1.10  $" = "\n";
    1.11 @@ -28,32 +27,19 @@
    1.12  	$ignore_next = 0;
    1.13  	return;
    1.14      }
    1.15 +    $ignore_next = 1;
    1.16  
    1.17      my $e = shift;
    1.18      my $name = $e->fullname;
    1.19      print "$name was modified\n" if $e->IN_MODIFY;
    1.20      $output = `weave $name`;
    1.21 -    print ("$name\n");
    1.22      $path = `readlink -f $name`;
    1.23      $path =~ s|/home/r/proj|http://aurellem.localhost|;
    1.24 -    print ("$path\n");
    1.25      $path =~ s|org|html|g;
    1.26 -    print ("$path\n");
    1.27 -    #system ("firefox $path");
    1.28      $mech->get($path);
    1.29 -    $ignore_next = 1;
    1.30 -
    1.31  });
    1.32  }
    1.33  
    1.34  
    1.35 -
    1.36 -
    1.37 -# integration into AnyEvent (works with EV, Glib, Tk, POE...)
    1.38 -#my $inotify_w = AnyEvent->io 
    1.39 -#  (
    1.40 -#   fh => $inotify->fileno, poll => 'r', cb => sub { $inotify->poll }
    1.41 -#  );
    1.42 -
    1.43 - # manual event loop
    1.44 +# manual event loop
    1.45  1 while $inotify->poll;