Recoll finds keywords inside documents as well as file names. Here's a script that can be use in the same way #!/bin/bash shopt -s globstar; for file in "$2"/**/*.ods ; do if { text=$(unzip -p "$file" content.xml | xmllint --format - | grep -e "$1"); } 2>/dev/null; then echo "$file:$text"; fi; done I evoke it with ./libreoffice-search.sh test /path/ However, neither Recoll nor my script is part of LO. Would it not be able to search documents with libreoffice from the terminal instead?
Hi David - I've talked to a couple QA people about this an no one really understands what you are requesting. Can you please clarify and then set the bug to UNCONFIRMED. Thanks
I meant: Would it not be nice if it would be be possible to search LO documents with libreoffice from the terminal.
Or from any LO GUI.
This script is a Fulltext search for all *.ods Documents in a folder. You open a terminal, enter the search command and the search term, and it shows you, which document contains the text. I never saw that in a Richt text editor, but each good text editor contains such a functionality, usually called "Find in files" (e.g. available in Notepad++) So if you have a folder with .ods document, and search for a specific word WITHIN all these documents, you can search it that way. I would also recommend such a feature ;-) But for standard users it has to be a GUI dialog, not a commandline script.
I agree that it should be GUI for that reason.
https://askubuntu.com/questions/938834/grep-for-text-in-odt-or-doc-files/938914#938914 lists a script for fulltext search for _all_ LibreOffice (OD* files) documents in a folder. #!/bin/bash find . -type f -name "*.od*" | while read i ; do [ "$1" ] || { echo "You forgot search string!" ; exit 1 ; } unzip -ca "$i" 2>/dev/null | grep -iq "$*" if [ $? -eq 0 ] ; then echo "string found in $i" | nl fi done
Hi. This feature is interesting also for me. It would be very useful. Thanks, Davide.
Changing priority back to 'medium' since the number of duplicates is lower than 5