Changeset 26752 for gs3-extensions
- Timestamp:
- 2013-01-19T15:25:13+13:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-extensions/html-to-expeditee/trunk/src/perllib/cgiactions/HtmlToExpediteeAction.pm
r26731 r26752 64 64 } 65 65 66 ## 67 # Subroutine for writing a collection.inf file - 68 # this is just so that when we load GlamED, it will 69 # only try to process framesets containing this file. 70 ## 71 sub write_collection_info 72 { 73 my ($output_dir,$collect) = @_; 74 75 my $filename = &util::filename_cat($output_dir,"collection.inf"); 76 my $status = undef; 77 78 if(open(FNOUT,">$filename")){ 79 binmode(FNOUT,":utf8"); 80 81 print FNOUT "$collect"; 82 close(FNOUT); 83 $status =1; 84 }else{ 85 print STDERR "Failed to open $filename for outputting collection info\n"; 86 87 $status = 0; 88 } 89 90 return $status; 91 } 66 92 67 93 sub generate_frame … … 90 116 my $exp_frame_tree = decode_json $json_str_utf8; 91 117 92 my $output_dir = &util::filename_cat($collect_dir,$collect,"export"); 118 #output frameset to a subfolder within export directory. 119 my $output_dir = &util::filename_cat($collect_dir,$collect,"export",$collect); 120 #my $output_dir = &util::filename_cat($collect_dir,$collect,"export"); 93 121 94 122 if (!-d $output_dir) { … … 104 132 # write out next free frame num 105 133 $expeditee_frame_io->saveLastFrameNumber($fn,$collect); 106 134 135 # TODO: Have a parameter so that this file is only written out if requested. 136 write_collection_info($output_dir,$collect); 137 107 138 $gsdl_cgi->generate_message("html-to-expeditee saved frame $fn"); 108 139 }
Note:
See TracChangeset
for help on using the changeset viewer.