scrappy 1002 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/usr/bin/env perl
  2. use strict;
  3. use warnings;
  4. use File::Basename 'dirname';
  5. use File::Spec;
  6. =head1 NAME
  7. scrappy - The Scrappy Command-Line Utility
  8. =head1 SYNOPSIS
  9. $ scrappy
  10. $ scrappy ...
  11. $ scrappy generate project MyApp
  12. For fun, download a web page using the Scrappy Action Download, .e.g ....
  13. $ scrappy download page http://search.cpan.org/
  14. ... easy huh, checkout some of the existing actions or create your own with
  15. Scrappy, your All Powerful Web Spidering, Scraping, Creeping Crawling Framework.
  16. =head1 DESCRIPTION
  17. List and run L<Scrappy> actions to build web crawlers, generate boiler-plate code
  18. and more. Install actions from the L<Scrappy::Action> namespace.
  19. =cut
  20. # is Scrappy installed
  21. eval 'use Scrappy::Action';
  22. die <<EOF if $@;
  23. It looks like you don't have the Scrappy Framework installed.
  24. Please visit http://search.cpan.org/dist/Scrappy/ for detailed installation instructions.
  25. EOF
  26. # Start the command system
  27. Scrappy::Action->new->execute(@ARGV);
  28. 1;