2 ###APPNAME: epub_manifest_add
3 ###APPAUTHOR: xiaoranzzz
4 ###APPDATE: Wed Apr 28 01:12:41 2010
6 ###APPDESC: epub_manifest_add
8 ###APPEXAMPLE: epub_manifest_add
12 #ENV variable MUST be defined somewhere,
13 #FOR perl to search modules from,
15 use lib
$ENV{XR_PERL_MODULE_DIR
};
17 use MyPlace
::Script
::Usage qw
/help_required help_even_empty/;
18 exit 0 if(help_required
($0,@ARGV));
19 #exit 0 if(help_even_empty($0,@ARGV));
21 use File
::Glob qw
/bsd_glob/;
22 use MyPlace
::Epub qw
/get_media_type get_file_id/;
27 my $id = get_file_id
($item);
28 my $type = get_media_type
($item);
30 print "<item id=\"$id\" href=\"$item\" media-type=\"$type\"/>\n";
39 $glob_exp = "$path/*";
44 foreach my $filename (bsd_glob
($glob_exp)) {
46 push @result,&get_item
($filename);
49 push @result,$filename;
56 foreach my $path (@ARGV) {
57 print_item
($_) foreach(get_item
($path));
61 print_item
($_) foreach(get_item
());