Index: openacs-4/packages/search/tcl/search-convert-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/search/tcl/search-convert-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/search/tcl/search-convert-procs.tcl 21 Aug 2006 22:21:07 -0000 1.2 +++ openacs-4/packages/search/tcl/search-convert-procs.tcl 19 Nov 2007 19:20:15 -0000 1.3 @@ -26,36 +26,46 @@ set result "" switch $mime_type { - {application/msword} - - {application/vnd.ms-word} { - set convert_command {/usr/local/bin/catdoc $filename >$tmp_filename} - } - {application/msexcel} - - {application/vnd.ms-excel} { - set convert_command {/usr/local/bin/xls2csv $filename >$tmp_filename} - } - {application/mspowerpoint} - - {application/vnd.ms-powerpoint} { - set convert_command {/usr/local/bin/ppthtml $filename >$tmp_filename} - } - {application/pdf} { - set convert_command {/usr/local/bin/pdftotext $filename $tmp_filename} - } - {text/html} { - return [catch {[ns_striphtml $filename]} error] - } - default { - # If there's nothing implemented for a particular mime type + {application/msword} - + {application/vnd.ms-word} { + set convert_command {catdoc $filename >$tmp_filename} + } + {application/msexcel} - + {application/vnd.ms-excel} { + set convert_command {xls2csv $filename >$tmp_filename} + } + {application/mspowerpoint} - + {application/vnd.ms-powerpoint} { + set convert_command {ppthtml $filename >$tmp_filename} + } + {application/pdf} { + set convert_command {pdftotext $filename $tmp_filename} + } + {application/vnd.oasis.opendocument.text} - + {application/vnd.oasis.opendocument.text-template} - + {application/vnd.oasis.opendocument.text-web} - + {application/vnd.oasis.opendocument.text-master} - + {application/vnd.oasis.opendocument.presentation} - + {application/vnd.oasis.opendocument.presentation-template} - + {application/vnd.oasis.opendocument.spreadsheet} - + {application/vnd.oasis.opendocument.spreadsheet-template} { + set convert_command {unzip -p $filename content.xml >$tmp_filename} + } + {text/html} { + return [catch {[ns_striphtml $filename]} error] + } + default { + # If there's nothing implemented for a particular mime type # we'll just index filename and pathname return "" - } + } } if {[catch {eval exec $convert_command} err]} { - catch {file delete $tmp_filename} - puts "DIRK conversion failed - $convert_command: $err" - file delete $tmp_filename - return + catch {file delete $tmp_filename} + ns_log Error "SEARCH: conversion failed - $convert_command: $err" + file delete $tmp_filename + return } set fd [open $tmp_filename "r"] Index: openacs-4/packages/search/tcl/search-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/search/tcl/search-procs.tcl,v diff -u -r1.41 -r1.42 --- openacs-4/packages/search/tcl/search-procs.tcl 20 Jul 2007 10:41:15 -0000 1.41 +++ openacs-4/packages/search/tcl/search-procs.tcl 19 Nov 2007 19:20:15 -0000 1.42 @@ -262,33 +262,6 @@ } } -ad_proc -private search::choice_bar { - items links values {default ""} -} { - @author Neophytos Demetriou -} { - - set count 0 - set return_list [list] - - foreach value $values { - if {$default eq $value } { - lappend return_list "[lindex $items $count]" - } else { - lappend return_list "[lindex $items $count]" - } - - incr count - } - - if {[llength $return_list] > 0} { - return "[join $return_list " "]" - } else { - return "" - } - -} - ad_proc -callback search::datasource { -object_id:required } {