updated git and svn scripts
[xrzperl.git] / book_parser
blobbd371dc1249754990bf1239c33da92e0ae361447
1 #!/usr/bin/perl -w
2 ###APPNAME: book_parser
3 ###APPAUTHOR: xiaoranzzz
4 ###APPDATE: Sat Mar 22 22:43:48 2008
5 ###APPVER: 0.1
6 ###APPDESC: html book parser
7 ###APPUSAGE: domainName
8 ###APPEXAMPLE: book_parser http://www.shuku.net/novels/gulong/bianlang/bianlang.html
9 ###APPOPTION:
10 use strict;
11 $ARGV[0]="-h" unless(@ARGV);
12 foreach(@ARGV){
13 exit(system("plhelp",$0,@ARGV)) if($_ eq "-h" || $_ eq "--help");
16 do `plinclude AppMessage`;
17 do `plinclude BookParser`;
19 my $url=shift;
20 my $parser=BookParser::get_parser($url);
21 AppMessage::abort("Parser not found for $url\n") unless(-f $parser);
22 AppMessage::message("Using $parser\n");
23 system("netcat '$url' | $parser '$url'");