_search__convert_binary_to_text (private)
_search__convert_binary_to_text
Defined in packages/search/tcl/test/search-procs.tcl
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set _aa_export {} set body_count 1 foreach testcase_body {{ # # .ppt conversion is currently only best-effort, as the # underlying tool catppt seems to be unreliable even for a # trivial document as the one we test here. # # We comment this test until a better solution is found, # e.g. one based on LibreOffice, unoconv or other similar # tools. # # ppt application/mspowerpoint # foreach {extension mime_type} { txt text/plain html text/html doc application/msword xls application/msexcel pdf application/pdf odt application/vnd.oasis.opendocument.text ott application/vnd.oasis.opendocument.text-template odp application/vnd.oasis.opendocument.presentation otp application/vnd.oasis.opendocument.presentation-template ods application/vnd.oasis.opendocument.spreadsheet ots application/vnd.oasis.opendocument.spreadsheet-template docx application/vnd.openxmlformats-officedocument.wordprocessingml.document xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet pptx application/vnd.openxmlformats-officedocument.presentationml.presentation } { set filename [acs_root_dir]/packages/search/tcl/test/data/test.$extension set text [search::convert::binary_to_text -filename $filename -mime_type $mime_type] set ok_p [expr {[string first "OpenACS" $text] >= 0}] aa_true "Text was extracted correctly for '.$extension'/'$mime_type'" $ok_p if {!$ok_p} { aa_log "Extracted text: [ns_quotehtml $text]" } } }} { aa_log "Running testcase body $body_count" set ::__aa_test_indent [info level] set catch_val [catch $testcase_body msg] if {$catch_val != 0 && $catch_val != 2} { aa_log_result "fail" "convert_binary_to_text (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }XQL Not present: Generic, PostgreSQL, Oracle