Changelog0000644000175000017500000000336513775412244013366 0ustar mechtildemechtilde loook.py 0.8.6 - Search in Office Documents 0.8.6 to 0.9.0: Make it fit for Python 3.9.x 0.8.5 to 0.8.6: Bugfix:"loook does not find document" 0.8.4 to 0.8.5: Fixed password protected files 0.8.3 to 0.8.4: Add French localisation 0.8.2 to 0.8.3: Add Spanish localisation (Castellano) 0.8.1 to 0.8.2: Add Czech localisation 0.8.0 to 0.8.1: Fixed Error handling 0.7.3 to 0.8.0: Save file list. Add *.pptx support 0.7.2 to 0.7.3: Add *.docx and *.xlsx support and fixes 0.7.1 to 0.7.2: More small fixes 0.7 to 0.7.1: Small fixes 0.6.8 to 0.7: Integration of localisation 0.6.7 to 0.6.8: Search embedded files (thanks to Hanna Ruotsalainen) 0.6.6 to 0.6.7: Fixes to make loook work with Python 3.1.1 when started with parameters 0.6.5 to 0.6.6: Made Loook work with Python 3.1.1 0.6.4 to 0.6.5: Fixed problems with filenames that contain special (non-ASCII) characters -- thanks to Roman Shiryaev 0.6.3 to 0.6.4: Fixed starting OpenOffice.org on Windows -- thanks to Matthias Hüning 0.6.2 to 0.6.3: Added support for the new file formats of OpenOffice.org 2.x; sort results by file name; made saving configuration more robust 0.6.1 to 0.6.2: Should now also work on Windows98 0.6 to 0.6.1: Search directory can now be set via command line, e.g.: loook.py ~/Documents term1 term2 The number of searched OpenOffice.org files is now printed in the status bar. 0.5 to 0.6: loook.py now remembers your directory settings (path to OOo and search path). Homepage: http://www.danielnaber.de/loook/ New Home: http://mechtilde.de/Loook (since version 0.7) Copyright0000644000175000017500000003560613267046604013451 0ustar mechtildemechtilde GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS install.sh0000755000175000017500000000513313775412551013555 0ustar mechtildemechtilde#!/bin/bash # -*- coding: utf-8 -*- # # install-loook.sh # # Copyright 2013,2014 Mechtilde Stehmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA. InstP="/usr/local/lib/loook" ManP="/usr/share/man" if test $(whoami) == "root" then if test -e "/usr/bin/python3" then mkdir -pv $InstP && cp -av loook.py $InstP/loook.py && chmod +x $InstP/loook.py && mkdir -pv $InstP/locale/en/LC_MESSAGES/ && cp -av locale/en/LC_MESSAGES/loook.mo \ $InstP/locale/en/LC_MESSAGES/loook.mo && mkdir -pv $InstP/locale/de/LC_MESSAGES/ && cp -av locale/de/LC_MESSAGES/loook.mo \ $InstP/locale/de/LC_MESSAGES/loook.mo && mkdir -pv $InstP/locale/nl/LC_MESSAGES/ && cp -av locale/nl/LC_MESSAGES/loook.mo \ $InstP/locale/nl/LC_MESSAGES/loook.mo && mkdir -pv $InstP/locale/it/LC_MESSAGES/ && cp -av locale/it/LC_MESSAGES/loook.mo \ $InstP/locale/it/LC_MESSAGES/loook.mo && mkdir -pv $InstP/locale/cs/LC_MESSAGES/ && cp -av locale/cs/LC_MESSAGES/loook.mo \ $InstP/locale/cs/LC_MESSAGES/loook.mo && mkdir -pv $InstP/locale/es/LC_MESSAGES/ && cp -av locale/es/LC_MESSAGES/loook.mo \ $InstP/locale/es/LC_MESSAGES/loook.mo && mkdir -pv $InstP/locale/fr/LC_MESSAGES/ && cp -av locale/fr/LC_MESSAGES/loook.mo \ $InstP/locale/fr/LC_MESSAGES/loook.mo && ln -sv $InstP/loook.py /usr/local/bin/loook && mkdir -pv $ManP/man1/ && gzip man/loook.1 > $ManP/man1/loook.1.gz && mkdir -pv $ManP/de/man1/ && gzip man/de/loook.1 > $ManP/de/man1/loook.1.gz && cp -av loook.desktop /usr/share/applications/loook.desktop && cp -av loook.png /usr/share/pixmaps/loook.png echo "You can start loook from the menu." else echo "Python3 isn't installed.\nPlease install first!" fi else echo "You must be root!" fi exit loook.bat0000755000175000017500000000003413267046604013357 0ustar mechtildemechtildestart pythonw loook.py exit loook.cs.po0000644000175000017500000000600013267046574013635 0ustar mechtildemechtilde# Czech translation for Loook package # Czech messages for Loook. # Copyright (C) 2015-2016 Radek Tříška # This file is distributed under the same license as the Loook package. # Radek Tříška , 2015-2016. # msgid "" msgstr "" "Project-Id-Version: Loook 0.8.6\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-04-22 10:53+0200\n" "PO-Revision-Date: 2015-10-31 22:54+0100\n" "Last-Translator: Radek Tříška \n" "Language-Team: Czech\n" "Language: cs_CZ\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" "X-Generator: Poedit 1.8.5\n" #: loook.py:63 msgid "Cannot find home directory, settings will not be saved." msgstr "Nelze najít domovský adresář, nastavení nebude neuloženo." #: loook.py:70 msgid "Viewer:" msgstr "Prohlížeč:" #: loook.py:71 loook.py:474 msgid "Search path:" msgstr "Kde hledat:" #: loook.py:72 loook.py:475 msgid "Search terms:" msgstr "Hledané výrazy:" #: loook.py:73 loook.py:476 msgid "Mode:" msgstr "Režim:" #: loook.py:74 loook.py:477 msgid "Matches:" msgstr "Nalezeno:" #: loook.py:105 loook.py:107 loook.py:189 loook.py:249 msgid "AND" msgstr "a (AND)" #: loook.py:108 loook.py:193 loook.py:258 msgid "OR" msgstr "nebo (OR)" #: loook.py:109 loook.py:197 loook.py:242 msgid "Phrase" msgstr "Fráze" #: loook.py:129 msgid "Search" msgstr "Hledat" #: loook.py:133 msgid "Quit" msgstr "Konec" #: loook.py:137 msgid "Stop" msgstr "Zastavit" #: loook.py:142 msgid "Save" msgstr "Uložit" #: loook.py:149 msgid "Ready." msgstr "Připraveno." #: loook.py:220 loook.py:406 msgid "Error" msgstr "Chyba" #: loook.py:220 msgid "Set viewer first." msgstr "Nejdříve nastavte prohlížeč." #: loook.py:224 msgid "Starting viewer..." msgstr "Spouští se prohlížeč..." #: loook.py:229 msgid "Warning: Command returned code != 0: " msgstr "Upozornění: Příkaz vrátil kód != 0: " #: loook.py:391 msgid "Warning: Supposed ZIP file " msgstr "" #: loook.py:391 loook.py:393 msgid "could not be opened: " msgstr "nelze otevřít: " #: loook.py:393 msgid "Warning: File " msgstr "Upozornění: Soubor " #: loook.py:406 msgid "Path " msgstr "Cesta" #: loook.py:406 msgid "doesn't exist." msgstr "neexistuje." #: loook.py:412 msgid "in" msgstr "v" #: loook.py:412 msgid "files" msgstr "souborech" #: loook.py:414 msgid "matches so far" msgstr "shod nalezeno" #: loook.py:414 msgid "(search stopped)" msgstr "(hledání zastaveno)" #: loook.py:417 msgid "matches" msgstr "nalezeno" #: loook.py:436 msgid "Searching in " msgstr "Hledá se v " #: loook.py:441 msgid "Warning: " msgstr "Varování:" #: loook.py:444 msgid "Warning: Unicode problem with directory name..." msgstr "Upozornění: Unicode problém s názvem adresáře ..." #: loook.py:575 msgid "Usage:" msgstr "Použití:" #: loook.py:575 msgid "[search path] [search term]..." msgstr "" #: loook.py:579 msgid "OpenOffice.org File Finder" msgstr "" loook.de.po0000644000175000017500000000601013267046574013621 0ustar mechtildemechtilde# German translation for Loook package # German messages for Loook. # Copyright (C) 2013-2016 Mechtilde Stehmann # This file is distributed under the same license as the Loook package. # Mechtilde Stehmann , 2013-2016. # msgid "" msgstr "" "Project-Id-Version: Loook 0.8.6\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-04-22 10:53+0200\n" "PO-Revision-Date: 2014-07-10 19:59+0200\n" "Last-Translator: Mechtilde Stehmann \n" "Language-Team: German\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: loook.py:63 msgid "Cannot find home directory, settings will not be saved." msgstr "" "Kann das Nutzerverzeichnis nicht finden. Die Einstellungen werden nicht " "gespeichert." #: loook.py:70 msgid "Viewer:" msgstr "Betrachter:" #: loook.py:71 loook.py:474 msgid "Search path:" msgstr "Suchpfad:" #: loook.py:72 loook.py:475 msgid "Search terms:" msgstr "Suchbegriffe:" #: loook.py:73 loook.py:476 msgid "Mode:" msgstr "Modus:" #: loook.py:74 loook.py:477 msgid "Matches:" msgstr "Treffer:" #: loook.py:105 loook.py:107 loook.py:189 loook.py:249 msgid "AND" msgstr "UND" #: loook.py:108 loook.py:193 loook.py:258 msgid "OR" msgstr "ODER" #: loook.py:109 loook.py:197 loook.py:242 msgid "Phrase" msgstr "Ausdruck" #: loook.py:129 msgid "Search" msgstr "Suchen" #: loook.py:133 msgid "Quit" msgstr "Beenden" #: loook.py:137 msgid "Stop" msgstr "Stopp" #: loook.py:142 msgid "Save" msgstr "Speichern" #: loook.py:149 msgid "Ready." msgstr "Fertig." #: loook.py:220 loook.py:406 msgid "Error" msgstr "Fehler" #: loook.py:220 msgid "Set viewer first." msgstr "Bestimmen Sie erst den Betrachter." #: loook.py:224 msgid "Starting viewer..." msgstr "Betrachter starten..." #: loook.py:229 msgid "Warning: Command returned code != 0: " msgstr "Warnung: Befehl gibt Code != 0 zurück: " #: loook.py:391 msgid "Warning: Supposed ZIP file " msgstr "Warnung: Vermeintliche ZIP Datei " #: loook.py:391 loook.py:393 msgid "could not be opened: " msgstr "kann nicht geöffnet werden" #: loook.py:393 msgid "Warning: File " msgstr "Warnung: Datei " #: loook.py:406 msgid "Path " msgstr "Pfad" #: loook.py:406 msgid "doesn't exist." msgstr "existiert nicht." #: loook.py:412 msgid "in" msgstr "in" #: loook.py:412 msgid "files" msgstr "Dateien" #: loook.py:414 msgid "matches so far" msgstr "Übereinstimmungen soweit" #: loook.py:414 msgid "(search stopped)" msgstr "(Suche gestoppt)" #: loook.py:417 msgid "matches" msgstr "Treffer" #: loook.py:436 msgid "Searching in " msgstr "Suchen in " #: loook.py:441 msgid "Warning: " msgstr "Warnung: " #: loook.py:444 msgid "Warning: Unicode problem with directory name..." msgstr "Warnung: Unicode Problem mit Verzeichnisnamen..." #: loook.py:575 msgid "Usage:" msgstr "Verwendung:" #: loook.py:575 msgid "[search path] [search term]..." msgstr "[Suchpfad] [Suchbegriff]..." #: loook.py:579 msgid "OpenOffice.org File Finder" msgstr "OpenOffice.org Suche" loook.desktop0000644000175000017500000000053013267046604014260 0ustar mechtildemechtilde[Desktop Entry] X-AppInstall-Package=Loook X-AppInstall-Popcon=504 X-AppInstall-Section=main Version=1.0 Name=Loook Comment=Search strings in ODF documents Comment[de]=Sucht Begriffe in ODF Dokumenten Exec=loook Icon=loook Terminal=false Type=Application Categories=Office;Utility Keywords=Office;Utility;ODF Files; Search StartupNotify=true loook.en.po0000644000175000017500000000565513267046574013651 0ustar mechtildemechtilde# English original text for Loook package # English messages for Loook. # Copyright (C) 2013-2016 Mechtilde Stehmann # This file is distributed under the same license as the Loook package. # Mechtilde Stehmann , 2013-2016. # msgid "" msgstr "" "Project-Id-Version: Loook 0.8.6\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-04-22 10:53+0200\n" "PO-Revision-Date: 2014-07-10 19:59+0200\n" "Last-Translator: Mechtilde Stehmann \n" "Language-Team: English\n" "Language: en\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: loook.py:63 msgid "Cannot find home directory, settings will not be saved." msgstr "Cannot find home directory, settings will not be saved." #: loook.py:70 msgid "Viewer:" msgstr "Viewer:" #: loook.py:71 loook.py:474 msgid "Search path:" msgstr "Search path:" #: loook.py:72 loook.py:475 msgid "Search terms:" msgstr "Search terms:" #: loook.py:73 loook.py:476 msgid "Mode:" msgstr "Mode:" #: loook.py:74 loook.py:477 msgid "Matches:" msgstr "Matches:" #: loook.py:105 loook.py:107 loook.py:189 loook.py:249 msgid "AND" msgstr "AND" #: loook.py:108 loook.py:193 loook.py:258 msgid "OR" msgstr "OR" #: loook.py:109 loook.py:197 loook.py:242 msgid "Phrase" msgstr "Phrase" #: loook.py:129 msgid "Search" msgstr "Search" #: loook.py:133 msgid "Quit" msgstr "Quit" #: loook.py:137 msgid "Stop" msgstr "Stop" #: loook.py:142 msgid "Save" msgstr "Save" #: loook.py:149 msgid "Ready." msgstr "Ready." #: loook.py:220 loook.py:406 msgid "Error" msgstr "Error" #: loook.py:220 msgid "Set viewer first." msgstr "Set viewer first." #: loook.py:224 msgid "Starting viewer..." msgstr "Starting viewer..." #: loook.py:229 msgid "Warning: Command returned code != 0: " msgstr "Warning: Command returned code != 0: " #: loook.py:391 msgid "Warning: Supposed ZIP file " msgstr "Warning: Supposed ZIP file " #: loook.py:391 loook.py:393 msgid "could not be opened: " msgstr "could not be opened: " #: loook.py:393 msgid "Warning: File " msgstr "Warning: File " #: loook.py:406 msgid "Path " msgstr "Path " #: loook.py:406 msgid "doesn't exist." msgstr "doesn't exist." #: loook.py:412 msgid "in" msgstr "in" #: loook.py:412 msgid "files" msgstr "files" #: loook.py:414 msgid "matches so far" msgstr "matches so far" #: loook.py:414 msgid "(search stopped)" msgstr "(search stopped)" #: loook.py:417 msgid "matches" msgstr "matches" #: loook.py:436 msgid "Searching in " msgstr "Searching in " #: loook.py:441 msgid "Warning: " msgstr "Warning: " #: loook.py:444 msgid "Warning: Unicode problem with directory name..." msgstr "Warning: Unicode problem with directory name..." #: loook.py:575 msgid "Usage:" msgstr "Usage:" #: loook.py:575 msgid "[search path] [search term]..." msgstr "[search path] [search term]..." #: loook.py:579 msgid "OpenOffice.org File Finder" msgstr "OpenOffice.org File Finder" loook.es.po0000644000175000017500000000567113267046574013654 0ustar mechtildemechtilde# Spanish translation for Loook package # Spanish messages for Loook. # Copyright (C) 2015-2016 Loook project # This file is distributed under the same license as the Loook package. # Victor 2015-2016. # msgid "" msgstr "" "Project-Id-Version: Loook 0.8.6\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-04-22 10:53+0200\n" "PO-Revision-Date: 2014-07-10 21:39+0100\n" "Last-Translator: Victor \n" "Language-Team: Spanish\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: loook.py:63 msgid "Cannot find home directory, settings will not be saved." msgstr "Carpeta de inicio no encontrado. No se guardarán los ajustes." #: loook.py:70 msgid "Viewer:" msgstr "Viewer:" #: loook.py:71 loook.py:474 msgid "Search path:" msgstr "Ruta de búsqueda:" #: loook.py:72 loook.py:475 msgid "Search terms:" msgstr "Termine di ricerca: " #: loook.py:73 loook.py:476 msgid "Mode:" msgstr "Modo:" #: loook.py:74 loook.py:477 msgid "Matches:" msgstr "Resultados:" #: loook.py:105 loook.py:107 loook.py:189 loook.py:249 msgid "AND" msgstr "Y" #: loook.py:108 loook.py:193 loook.py:258 msgid "OR" msgstr "O" #: loook.py:109 loook.py:197 loook.py:242 msgid "Phrase" msgstr "Expresión" #: loook.py:129 msgid "Search" msgstr "Busca" #: loook.py:133 msgid "Quit" msgstr "Escapa" #: loook.py:137 msgid "Stop" msgstr "Para" #: loook.py:142 msgid "Save" msgstr "Guarda" #: loook.py:149 msgid "Ready." msgstr "Listo." #: loook.py:220 loook.py:406 msgid "Error" msgstr "falta" #: loook.py:220 msgid "Set viewer first." msgstr "Seleccione viewer primero." #: loook.py:224 msgid "Starting viewer..." msgstr "Iniciar viewer... " #: loook.py:229 msgid "Warning: Command returned code != 0: " msgstr "Aviso: Comando devolver código != 0: " #: loook.py:391 msgid "Warning: Supposed ZIP file " msgstr "Aviso: Supuesto ZIP file " #: loook.py:391 loook.py:393 msgid "could not be opened: " msgstr "no se puede abrir:" #: loook.py:393 msgid "Warning: File " msgstr "Aviso: fichero " #: loook.py:406 msgid "Path " msgstr "Ruta " #: loook.py:406 msgid "doesn't exist." msgstr "no existe." #: loook.py:412 msgid "in" msgstr "en" #: loook.py:412 msgid "files" msgstr "archivo" #: loook.py:414 msgid "matches so far" msgstr "resultados hasta el momento" #: loook.py:414 msgid "(search stopped)" msgstr "(búsqueda suspendido)" #: loook.py:417 msgid "matches" msgstr "emparejars" #: loook.py:436 msgid "Searching in " msgstr "Buscando en " #: loook.py:441 msgid "Warning: " msgstr "Aviso: " #: loook.py:444 msgid "Warning: Unicode problem with directory name..." msgstr "Aviso: Problema Unicode con el nombre de la carpeta... " #: loook.py:575 msgid "Usage:" msgstr "Uso: " #: loook.py:575 msgid "[search path] [search term]..." msgstr "[ruta de búsqueda] [palabra de búsqueda]..." #: loook.py:579 msgid "OpenOffice.org File Finder" msgstr "OpenOffice.org buscador de archivo " loook.fr.po0000644000175000017500000000607513267046574013653 0ustar mechtildemechtilde# French messages for Loook. # Copyright (C) 2013-2016 Lady , 2016. # This file is distributed under the same license as the Loook package. # msgid "" msgstr "" "Project-Id-Version: Loook 0.8.6\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-04-22 10:53+0200\n" "PO-Revision-Date: 2016-02-04 13:37+0100\n" "Last-Translator: Lady \n" "Language-Team: French \n" "Language: en\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Lokalize 2.0\n" #: loook.py:63 msgid "Cannot find home directory, settings will not be saved." msgstr "" "Le dossier utilisateur n'a pas pu être trouvé, la configuration ne sera pas " "sauvegardée." #: loook.py:70 msgid "Viewer:" msgstr "Visionneuse:" #: loook.py:71 loook.py:474 msgid "Search path:" msgstr "Chemin de recherche:" #: loook.py:72 loook.py:475 msgid "Search terms:" msgstr "Rechercher les mots:" #: loook.py:73 loook.py:476 msgid "Mode:" msgstr "Mode:" #: loook.py:74 loook.py:477 msgid "Matches:" msgstr "Correspondances:" #: loook.py:105 loook.py:107 loook.py:189 loook.py:249 msgid "AND" msgstr "ET" #: loook.py:108 loook.py:193 loook.py:258 msgid "OR" msgstr "OU" #: loook.py:109 loook.py:197 loook.py:242 msgid "Phrase" msgstr "Expression" #: loook.py:129 msgid "Search" msgstr "Recherche" #: loook.py:133 msgid "Quit" msgstr "Quitter" #: loook.py:137 msgid "Stop" msgstr "Arrêt" #: loook.py:142 msgid "Save" msgstr "Enregistrer" #: loook.py:149 msgid "Ready." msgstr "Prêt." #: loook.py:220 loook.py:406 msgid "Error" msgstr "Erreur" #: loook.py:220 msgid "Set viewer first." msgstr "Installer la visionneuse en premier." #: loook.py:224 msgid "Starting viewer..." msgstr "Démarrer la visionneuse..." #: loook.py:229 msgid "Warning: Command returned code != 0: " msgstr "Attention: Commande retour code != 0: " #: loook.py:391 msgid "Warning: Supposed ZIP file " msgstr "Attention: Fichier ZIP présumé" #: loook.py:391 loook.py:393 msgid "could not be opened: " msgstr "ne peut pas être ouvert: " #: loook.py:393 msgid "Warning: File " msgstr "Attention: Fichier " #: loook.py:406 msgid "Path " msgstr "Chemin " #: loook.py:406 msgid "doesn't exist." msgstr "n'existe pas." #: loook.py:412 msgid "in" msgstr "dans" #: loook.py:412 msgid "files" msgstr "fichiers" #: loook.py:414 msgid "matches so far" msgstr "correspond à" #: loook.py:414 msgid "(search stopped)" msgstr "(recherche arrêtée)" #: loook.py:417 msgid "matches" msgstr "correspond à" #: loook.py:436 msgid "Searching in " msgstr "Chercher dans " #: loook.py:441 msgid "Warning: " msgstr "Attention: " #: loook.py:444 msgid "Warning: Unicode problem with directory name..." msgstr "Attention: Problème Unicode avec le nom de dossier..." #: loook.py:575 msgid "Usage:" msgstr "Usage:" #: loook.py:575 msgid "[search path] [search term]..." msgstr "[recherche du chemin] [recherche du mot]..." #: loook.py:579 msgid "OpenOffice.org File Finder" msgstr "Recherche de Fichier OpenOffice.org" loook.it.po0000644000175000017500000000577713267046574013670 0ustar mechtildemechtilde# Italian translation for Loook package # Italian messages for Loook. # Copyright (C) 2014-2016 David Hofmann # This file is distributed under the same license as the Loook package. # David Hofmann 2014-2016. # msgid "" msgstr "" "Project-Id-Version: Loook 0.8.6\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-04-22 10:53+0200\n" "PO-Revision-Date: 2014-07-10 21:39+0100\n" "Last-Translator: David Hofmann \n" "Language-Team: Italian\n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: loook.py:63 msgid "Cannot find home directory, settings will not be saved." msgstr "Cartella d'utente non trovata. Le impostazioni non vengono salvate." #: loook.py:70 msgid "Viewer:" msgstr "Viewer:" #: loook.py:71 loook.py:474 msgid "Search path:" msgstr "Percorso di ricerca: " #: loook.py:72 loook.py:475 msgid "Search terms:" msgstr "Termine di ricerca: " #: loook.py:73 loook.py:476 msgid "Mode:" msgstr "Modalità:" #: loook.py:74 loook.py:477 msgid "Matches:" msgstr "Risultati:" #: loook.py:105 loook.py:107 loook.py:189 loook.py:249 msgid "AND" msgstr "E" #: loook.py:108 loook.py:193 loook.py:258 msgid "OR" msgstr "O" #: loook.py:109 loook.py:197 loook.py:242 msgid "Phrase" msgstr "Espressione" #: loook.py:129 msgid "Search" msgstr "Ricerca " #: loook.py:133 msgid "Quit" msgstr "Esci" #: loook.py:137 msgid "Stop" msgstr "Stop" #: loook.py:142 msgid "Save" msgstr "Salvare " #: loook.py:149 msgid "Ready." msgstr "Terminato. " #: loook.py:220 loook.py:406 msgid "Error" msgstr "Errore " #: loook.py:220 msgid "Set viewer first." msgstr "Determinate prima il viewer." #: loook.py:224 msgid "Starting viewer..." msgstr "Avviamento viewer... " #: loook.py:229 msgid "Warning: Command returned code != 0: " msgstr "Avviso: Comando ritorna code != 0: " #: loook.py:391 msgid "Warning: Supposed ZIP file " msgstr "Supposto ZIP file " #: loook.py:391 loook.py:393 msgid "could not be opened: " msgstr "non può essere aperto:" #: loook.py:393 msgid "Warning: File " msgstr "Avviso: file " #: loook.py:406 msgid "Path " msgstr "Percorso" #: loook.py:406 msgid "doesn't exist." msgstr "non è esistente." #: loook.py:412 msgid "in" msgstr "in" #: loook.py:412 msgid "files" msgstr "files" #: loook.py:414 msgid "matches so far" msgstr "risultati fino ad ora" #: loook.py:414 msgid "(search stopped)" msgstr "(ricerca fermata)" #: loook.py:417 msgid "matches" msgstr "Risultati:" #: loook.py:436 msgid "Searching in " msgstr "Ricerca in " #: loook.py:441 msgid "Warning: " msgstr "Avviso: " #: loook.py:444 msgid "Warning: Unicode problem with directory name..." msgstr "Avviso: Problema Unicode con il nome di cartella... " #: loook.py:575 msgid "Usage:" msgstr "Utilizzo: " #: loook.py:575 msgid "[search path] [search term]..." msgstr "[percorso di ricerca] [termine di ricerca]..." #: loook.py:579 msgid "OpenOffice.org File Finder" msgstr "OpenOffice.org ricerca file " loook.nl.po0000644000175000017500000000602313267046574013646 0ustar mechtildemechtilde# Dutch text for Loook package # Dutch messages for Loook. # Copyright (C) 2013-2016 Arthur Buijs # This file is distributed under the same license as the Loook package. # Arthur Buijs arthur@artietee.nl, 2013-2016. # msgid "" msgstr "" "Project-Id-Version: Loook 0.8.6\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-04-22 10:53+0200\n" "PO-Revision-Date: 2014-07-10 19:59+0200\n" "Last-Translator: Arthur Buijs \n" "Language-Team: Dutch\n" "Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Poedit 1.5.7\n" #: loook.py:63 msgid "Cannot find home directory, settings will not be saved." msgstr "" "Kan de home-directory niet vinden, de instellingen worden niet opgeslagen." #: loook.py:70 msgid "Viewer:" msgstr "ODF-viewer:" #: loook.py:71 loook.py:474 msgid "Search path:" msgstr "Zoekpad:" #: loook.py:72 loook.py:475 msgid "Search terms:" msgstr "Zoekbegrippen:" #: loook.py:73 loook.py:476 msgid "Mode:" msgstr "Modus:" #: loook.py:74 loook.py:477 msgid "Matches:" msgstr "Overeenkomsten:" #: loook.py:105 loook.py:107 loook.py:189 loook.py:249 msgid "AND" msgstr "EN" #: loook.py:108 loook.py:193 loook.py:258 msgid "OR" msgstr "OF" #: loook.py:109 loook.py:197 loook.py:242 msgid "Phrase" msgstr "Zin" #: loook.py:129 msgid "Search" msgstr "Zoeken" #: loook.py:133 msgid "Quit" msgstr "Afsluiten" #: loook.py:137 msgid "Stop" msgstr "Stoppen" #: loook.py:142 msgid "Save" msgstr "Opslaan" #: loook.py:149 msgid "Ready." msgstr "Klaar." #: loook.py:220 loook.py:406 msgid "Error" msgstr "Fout" #: loook.py:220 msgid "Set viewer first." msgstr "Stel eerst de ODF-viewer in." #: loook.py:224 msgid "Starting viewer..." msgstr "ODF-viewer starten..." #: loook.py:229 msgid "Warning: Command returned code != 0: " msgstr "Waarschuwing: Opdracht komt met code!=0 terug:" #: loook.py:391 msgid "Warning: Supposed ZIP file " msgstr "Waarschuwing: Verondersteld ZIP-bestand " #: loook.py:391 loook.py:393 msgid "could not be opened: " msgstr "kan niet geopend worden: " #: loook.py:393 msgid "Warning: File " msgstr "Waarschuwing: Bestand " #: loook.py:406 msgid "Path " msgstr "Pad" #: loook.py:406 msgid "doesn't exist." msgstr "bestaat niet." #: loook.py:412 msgid "in" msgstr "in" #: loook.py:412 msgid "files" msgstr "bestanden" #: loook.py:414 msgid "matches so far" msgstr "tot dusverre gevonden" #: loook.py:414 msgid "(search stopped)" msgstr "(zoeken gestopt)" #: loook.py:417 msgid "matches" msgstr "overeenkomsten" #: loook.py:436 msgid "Searching in " msgstr "Zoeken in" #: loook.py:441 msgid "Warning: " msgstr "Waarschuwing: " #: loook.py:444 msgid "Warning: Unicode problem with directory name..." msgstr "Waarschuwing: Unicode-probleem met directory-naam..." #: loook.py:575 msgid "Usage:" msgstr "Gebruik:" #: loook.py:575 msgid "[search path] [search term]..." msgstr "[Zoekpad] [Zoekbegrip]..." #: loook.py:579 msgid "OpenOffice.org File Finder" msgstr "OpenOffice.org File Zoeken" loook.png0000644000175000017500000000312412233426744013374 0ustar mechtildemechtildePNG  IHDRw=bKGD pHYs B(xtIME   t9LIDATHǵYlT޹0c=cwǀc0)&! 5@JiTB*]UiTUj}C+uU$JDHCZL:7.kY t,<  }::sV}8ޱQj߅y:3YDNjj ʏcT"{osP[{ׁWO]ϝ_d](LkpATbx&Am@Pߝ;ҟFL}5!|tv+pٴ1D<ő |mW׬|{ccW @ ѶR<=_&, ᛻rtܠ]{߾}_@ǓRrWω#[ǎ X 1]nWmk!~w:ihinrǀ?(kW,MNkg=>$ʐ,R((+U4 9ŚPcX4Q{KJl5=z&3ˣ!D[,J6#aKU!#2J#)j+894Jm0OZӇH:ۛ ER)s)t2Mza"’6-LEtMG@JKB1nn$PWndG)p@:tElp8$ ot)Ňk}.ѽ^'"Dne4669 0Id If3Ě膎eWn.[25W|O a߀h8p879 3{CRHRD|1Q{X6NC7oIC 4 ó発)I<7Cn[ޝA_n{Ņ'V0r&#&\ 8 OCD]\J^R~ _+$(W< 7/12Ln&3::̡#5:|=^X@?2֬"*R9,)tB> sys.stderr, _("Cannot find home directory, settings will not be saved.") self.configfile = None self.createWidgets() return def createWidgets(self): """Build and show the GUI elements.""" Label(self.master, text=_("Viewer:")).grid(row=0, sticky=E) Label(self.master, text=_("Search path:")).grid(row=1, sticky=E) Label(self.master, text=_("Search terms:")).grid(row=2, sticky=E) Label(self.master, text=_("Mode:")).grid(row=3, sticky=E) Label(self.master, text=_("Matches:")).grid(row=4, sticky=N+E) self.ooo_path = Entry(self.master) if self.ooo_path_str: self.ooo_path.insert(END, self.ooo_path_str) else: self.ooo_path.insert(END, "soffice") self.ooo_path_b = Button(self.master) self.ooo_path_b.bind("", self.selectOOoPath) self.ooo_path_b["text"] = ">" self.search_path = Entry(self.master) if len(sys.argv) >= 2: self.search_path.insert(END, sys.argv[1]) elif self.search_path_str: self.search_path.insert(END, self.search_path_str) else: self.search_path.insert(END, os.getcwd()) self.search_path_b = Button(self.master) self.search_path_b.bind("", self.selectSearchPath) self.search_path_b["text"] = ">" self.search_query = Entry(self.master) self.search_query.bind('', self.startSearch) if len(sys.argv) >= 2: lang, enc = locale.getdefaultlocale() self.search_query.insert(END, ' '.join(sys.argv[2:])) self.search_query.focus() self.mode_button = Button(self.master) self.mode_button.bind("", self.popupMode) self.mode_button["text"] = _("AND") self.mode_menu = Menu(self.master, tearoff=0) self.mode_menu.add_command(label=_("AND"), command=self.setModeAND) self.mode_menu.add_command(label=_("OR"), command=self.setModeOR) self.mode_menu.add_command(label=_("Phrase"), command=self.setModePhrase) pad = 1 self.ooo_path.grid(columnspan=2, row=0, column=1, sticky=E+W, pady=pad, padx=pad) self.ooo_path_b.grid(row=0, column=3, sticky=E+W, pady=pad, padx=pad) self.search_path.grid(columnspan=2, row=1, column=1, sticky=E+W, pady=pad, padx=pad) self.search_path_b.grid(row=1, column=3, sticky=E+W, pady=pad, padx=pad) self.search_query.grid(columnspan=3, row=2, column=1, sticky=E+W, pady=pad, padx=pad) self.mode_button.grid(columnspan=3, row=3, column=1, sticky=W, pady=pad, padx=pad) self.scrollbar = Scrollbar(self.master) self.scrollbar.grid(row=4, column=3, sticky=N+S, pady=pad, padx=pad) self.listbox = Listbox(self.master, yscrollcommand=self.scrollbar.set) self.listbox.bind('', self.showDoc) self.listbox.grid(columnspan=2, row=4, column=1, sticky=E+W+S+N, pady=pad, padx=pad) self.scrollbar.config(command=self.listbox.yview) f = Frame(self.master) self.search = Button(f) self.search["text"] = _("Search") self.search["command"] = self.startSearch self.search.pack(side=LEFT) self.quit_button = Button(f) self.quit_button["text"] = _("Quit") self.quit_button["command"] = self.doQuit self.quit_button.pack(side=RIGHT) self.stop_button = Button(f) self.stop_button["text"] = _("Stop") self.stop_button["command"] = self.stop self.stop_button["state"] = DISABLED self.stop_button.pack(side=RIGHT) self.save_button = Button(f) self.save_button["text"] = _("Save") self.save_button["command"] = self.doSave self.save_button["state"] = DISABLED self.save_button.pack(side=LEFT) f.grid(row=5, column=2, sticky=E, pady=pad, padx=pad) self.status = Label(self.master, text="", bd=1, relief=SUNKEN, anchor=W) self.status.config(text=_("Ready.")) self.status.grid(row=6, columnspan=4, column=0, sticky=E+W, pady=pad, padx=pad) return def doQuit(self): """Save configuration, the quit.""" self.saveConfig() self.master.quit() return def saveConfig(self): """Save path settings in configuration file in the user's HOME.""" if self.configfile: file = codecs.open(self.configfile, "w", "utf-8") if not self.config.has_section("General"): self.config.add_section("General") file.write("[General]\n") file.write("ooo_path=%s\n" % self.ooo_path.get()) file.write("search_path=%s\n" % self.search_path.get()) file.close() return def selectOOoPath(self, event): d = tkinter.filedialog.askopenfilename() self.ooo_path.delete(0, END) self.ooo_path.insert(END, d) return def selectSearchPath(self, event): d = tkinter.filedialog.askdirectory() self.search_path.delete(0, END) self.search_path.insert(END, d) return def setMode(self, mode): self.mode = mode self.mode_button["text"] = mode return def setModeAND(self): self.setMode(_("AND")) return def setModeOR(self): self.setMode(_("OR")) return def setModePhrase(self): self.setMode(_("Phrase")) return def popupMode(self, event): try: self.mode_menu.tk_popup(event.x_root, event.y_root, 0) finally: # make sure to release the grab (Tk 8.0a1 only) self.mode_menu.grab_release() return def stop(self): self.stopped = 1 return def showDoc(self, event): """Start OOo to view the file. This method lacks error handling (TODO).""" items = event.widget.curselection() filename = "%s%s" % (self.search_path.get(), event.widget.get(items[0])) filename = os.path.normpath(filename) prg = self.ooo_path.get() if not prg: tkinter.messagebox.showwarning(_('Error'), _('Set viewer first.')) else: filename = filename.replace('"', '\\" ') cmd = "\"%s\" \"%s\" &" % (prg, filename) self.status.config(text=_("Starting viewer...")) print(cmd) res = os.system(cmd) if res != 0: # don't show a dialog, this check might not be system-indepenent: print(_("Warning: Command returned code != 0: ") + cmd) return def removeXMLMarkup(self, s, replace_with_space): s = re.compile("", re.DOTALL).sub('', s) repl = '' if replace_with_space: repl = ' ' s = re.compile("<[^>]*>", re.DOTALL).sub(repl, s) return s def match(self, query, docstring): mode = self.mode_button["text"] if mode == _("Phrase"): # match only documents that contain the phrase: regex = re.compile(re.escape(query.lower()), re.DOTALL) if regex.search(docstring): return 1 else: parts = re.split("\s+", query.strip()) if mode == _("AND"): # match only documents that contain all words: match = 1 for part in parts: regex = re.compile(re.escape(part.lower()), re.DOTALL) if not regex.search(docstring): match = 0 break return match elif mode == _("OR"): # match documents that contain at leats one word: match = 0 for part in parts: regex = re.compile(re.escape(part.lower()), re.DOTALL) if regex.search(docstring): match = 1 break return match else: print("Error: unknown search mode '%s'" % mode) return 0 def processFile(self, filename, query): suffix = self.getSuffix(filename) # needed for error messages fsfilename =filename try: # Handle OpenOffice.org files: if suffix in ('sxw', 'stw', # OOo 1.x swriter 'sxc', 'stc', # OOo 1.x scalc 'sxi', 'sti', # OOo 1.x simpress 'sxg', # OOo 1.x master document 'sxm', # OOo 1.x formula 'sxd', 'std', # OOo 1.x sdraw 'odt', 'ott', # OOo > 2.x swriter 'odp', 'otp', # OOo > 2.x simpress 'odf', # OOo > 2.x formula 'odg', 'otg', # OOo > 2.x sdraw 'ods', 'ots', # OOo > 2.x scalc ): zip = zipfile.ZipFile(filename, "r") content = "" docinfo = "" try: # search embedded files: filelist = zip.namelist() for filename in filelist: if filename.endswith("content.xml"): content += str(zip.read(filename), 'utf-8') if filename.endswith("document.xml"): content += str(zip.read(filename), 'utf-8') content = self.removeXMLMarkup(content, replace_with_space=0) docinfo = str(zip.read("meta.xml"), 'utf-8') docinfo = self.removeXMLMarkup(docinfo, replace_with_space=0) self.ooo_count = self.ooo_count + 1 except KeyError as err: print("Warning: %s not found in '%s'" % (err, filename)) return None # Patch for encrypted files except UnicodeDecodeError: print("Warning: cannot open '%s'" % (fsfilename)) return None title = "" title_match = re.compile("(.*?)", re.DOTALL|re.IGNORECASE).search(docinfo) if title_match: title = title_match.group(1) if self.match(query, "%s %s" % (content.lower(), docinfo.lower())): return (filename, title) # Handle MS-Office (>= 2007) files: if suffix in ('docx', 'dotx', # MS-Word Documents >= 2007 'xlsx', 'xltx', # MS-Excel-Documents >= 2007 ): zip = zipfile.ZipFile(filename, "r") content = "" docinfo = "" try: # search embedded files: filelist = zip.namelist() for filename in filelist: if filename.endswith("document.xml"): content += str(zip.read(filename), 'utf-8') if filename.endswith("sharedStrings.xml"): content += str(zip.read(filename), 'utf-8') content = self.removeXMLMarkup(content, replace_with_space=0) docinfo = str(zip.read("docProps/core.xml"), 'utf-8') docinfo = self.removeXMLMarkup(docinfo, replace_with_space=0) self.ooo_count = self.ooo_count + 1 except KeyError as err: print("Warning: %s not found in '%s'" % (err, filename)) return None # Patch for encrypted files except UnicodeDecodeError: print("Warning: cannot open '%s'" % (fsfilename)) return None title = "" title_match = re.compile("(.*?)", re.DOTALL|re.IGNORECASE).search(docinfo) if title_match: title = title_match.group(1) if self.match(query, "%s %s" % (content.lower(), docinfo.lower())): return (filename, title) # Handle MS-Office (>= 2007) MS-PowerPoint files: if suffix in ('pptx', # MS-PowerPoint-Documents >= 2007 ): zip = zipfile.ZipFile(filename, "r") content = "" docinfo = "" try: # search embedded files: filelist = zip.namelist() slideslist = [] for element in filelist: if element[4:12] == "slides/s": slideslist.append(element) content ="" for element in slideslist: content += str(zip.read(element), 'utf-8') content = self.removeXMLMarkup(content, replace_with_space=0) docinfo = str(zip.read("docProps/core.xml"), 'utf-8') docinfo = self.removeXMLMarkup(docinfo, replace_with_space=0) except KeyError as err: print("Warning: %s not found in '%s'" % (err, filename)) return None # Patch for encrypted files except UnicodeDecodeError: print("Warning: cannot open '%s'" % (fsfilename)) return None title = "" title_match = re.compile("(.*?)", re.DOTALL|re.IGNORECASE).search(docinfo) if title_match: title = title_match.group(1) if self.match(query, "%s %s" % (content.lower(), docinfo.lower())): return (filename, title) self.ooo_count = self.ooo_count + 1 except zipfile.BadZipfile as err: print(_("Warning: Supposed ZIP file ") + filename + _("could not be opened: ") + str(err)) except IOError as err: print(_("Warning: File ") + filename + _("could not be opened: ") + str(err)) return None def startSearch(self, event=None): self.stopped = 0 self.last_update = 0 self.match_count = 0 self.ooo_count = 0 self.savestring = "" self.listbox.delete(0, END) self.stop_button["state"] = NORMAL self.quit_button["state"] = DISABLED if not os.path.exists(self.search_path.get()): tkinter.messagebox.showwarning(_("Error"), _("Path ") + self.search_path.get() +_("doesn\'t exist.")) else: #start_time = time.time() self.recursiveSearch(self.search_path.get()) #duration = time.time() - start_time #print("time=%.2f" % duration) count_str = "%s %d %s" % (_("in"), self.ooo_count, _("files")) if self.stopped: self.status.config(text="%d %s %s %s" % (self.match_count, _("matches so far"), count_str, _("(search stopped)"))) self.stopped = 0 else: self.status.config(text="%d %s %s" % (self.match_count, _("matches"), count_str)) self.stop_button["state"] = DISABLED self.quit_button["state"] = NORMAL return def getSuffix(self, filename): suffix_match = re.compile(".*\.(.*)").match(filename) if suffix_match: suffix = suffix_match.group(1).lower() else: suffix = None return suffix def recursiveSearch(self, directory): len_limit = 15 # avoid resizing window dir_part = os.path.split(directory)[1] if len(dir_part) > len_limit: dir_part = "%s..." % dir_part[0:len_limit] #print("'%s'" % dir_part) self.status.config(text=_("Searching in ") + "%s" % dir_part) try: dir_content = os.listdir(directory) dir_content.sort(key=str.lower) except OSError as err: print(_("Warning: ") + directory + (": ") + str(err)) return except UnicodeError as err: print(_("Warning: Unicode problem with directory name...")) return enable_save = False for filename in dir_content: if self.stopped != 0: return filename = os.path.join(directory, filename) if os.path.isfile(filename): match = self.processFile(filename, self.search_query.get()) update_interval = 0.05 time_diff = time.time() - self.last_update if time_diff > update_interval: self.master.update() self.last_update = time.time() if match: title = match[1] if not title: title = "Untitled" display_filename = filename.replace(self.search_path.get(), '') self.listbox.insert('end', "%s" % display_filename) self.savestring = self.savestring + filename + "\n" if enable_save == False: self.save_button["state"] = NORMAL enable_save = True self.match_count = self.match_count + 1 elif os.path.isdir(filename) and not os.path.islink(filename): self.recursiveSearch(filename) return def doSave(self): savestring = _("Search path:") + " " + self.search_path.get() + "\n" savestring = savestring + _("Search terms:") + " " + self.search_query.get() + "\n" savestring = savestring + _("Mode:") + " " + self.mode_button["text"] + "\n\n" savestring = savestring + _("Matches:") + "\n" + self.savestring fo = tkinter.filedialog.asksaveasfile() fo.write(savestring) self.stopped = 1 self.save_button["state"] = DISABLED return # Begin gettext integration class TranslationIntegration(object): """GNU-gettext for GNU/Linux""" def __init__(self, pname): self.moname = pname + ".mo" self.syslanguage() # check, whether it's a unix system installation _localepath = "/usr/share/locale/" _result = self.look4mo(_localepath) if _result == "xxx": self.syslanguage() _localepath = "locale/" _result = self.look4mo(_localepath) if not _result == "xxx": # chooses the right .mo file and installs translation trans = gettext.translation(pname, _localepath, [self.language]) trans.install() else: # Translating the following strings is absurd! serror = "Bad package! No "+self.moname+" file found!" from tkinter import messagebox messagebox.showerror('Error!', serror) import sys; sys.exit(1) def syslanguage(self): """which is the language of the system (GNU/Linux)?""" _loclang = locale.getdefaultlocale() self.language = _loclang[0] if self.language == None: self.language = "en" return self.language def look4mo(self, localepath): """choose only a language which a .mo file exists for, else use english or return 'xxx' """ _lpath = localepath + self.language + "/LC_MESSAGES/" + self.moname if not os.path.exists(_lpath): _newlang = self.dosplit(self.language, "_") _lpath = localepath + _newlang + "/LC_MESSAGES/"+self.moname if os.path.exists(_lpath): self.language = _newlang else: _newlang = self.dosplit(self.language, "@") _lpath = localepath + _newlang + "/LC_MESSAGES/" + self.moname if os.path.exists(_lpath): self.language = _newlang else: _lpath = localepath + "en/LC_MESSAGES/" + self.moname if os.path.exists(_lpath): self.language = "en" else: self.language = "xxx" return self.language def dosplit(self, language, splitter): """ splits language descriptor >>> gnugettext.dosplit(gnugettext, "de_DE", "_") 'de' >>> gnugettext.dosplit(gnugettext, "be@latin", "@") 'be' """ _newlang = language.split(splitter) _newlang = _newlang[0] return _newlang # End gettext integration if __name__ == "__main__": version = "0.9.0" loookversion = "loook" g = TranslationIntegration(loookversion) if len(sys.argv) >= 2 and (sys.argv[1] == '--help' or sys.argv[1] == '-h'): print(_("Usage:") +" loook [-h|--help] " + _("[search path] [search term]...")) sys.exit(1) root = Tk() root.minsize(380, 200) root.title("Loook " + version + " - " + _("OpenOffice.org File Finder")) root.columnconfigure(1, weight=1) root.rowconfigure(4, weight=1) root.columnconfigure(1, weight=1) root.rowconfigure(5, weight=0) app = Application(root) root.protocol("WM_DELETE_WINDOW", app.doQuit) root.mainloop() man/0000755000175000017500000000000013264432061012310 5ustar mechtildemechtildeman/de/0000755000175000017500000000000013264432061012700 5ustar mechtildemechtildeman/de/loook.10000644000175000017500000000140013267046604014107 0ustar mechtildemechtilde.\"Created with GNOME Manpages Editor Wizard gmanedit .TH LOOOK 1 "November 23 2013" "Mechtilde Stehmann" "Office" .SH NAME loook \- Durchsucht OpenOffice/Libreoffice Dateien .SH SYNTAX \fBloook\fP [\-h|\-\-help] [SUCHPFAD] [SUCHBEGRIFF1 SUCHBEGRIFF2 ... ] .br .SH Beschreibung Diese Manualseite beschreibt das Programm \fBloook\fP. Dieses Programm hilft, OpenOffice/Libreoffice Dateien zu finden, die bestimmte Suchbegriffe enthalten. .PP \fBLoook\fP kann ohne zus\[char228]tzliche Parameter gestartet werden. In diesem Fall werden der Suchpfad und die Suchbegiffe in den graphischen Dialog eingegeben. OpenOffice Dateien sind auch solche, die mit Libreoffice oder Apache OpenOffice erzeugt wurden. .SH Optionen .TP \fB\-h, \-\-help\fP Hilfe anzeigen und beenden man/loook.10000644000175000017500000000140513267046604013524 0ustar mechtildemechtilde.\"Created with GNOME Manpages Editor Wizard gmanedit .TH LOOOK 1 "November 23 2013" "Mechtilde Stehmann" "Office" .SH NAME loook \- Search in OpenOffice Files .SH SYNOPSIS \fBloook\fP [\-h|\-\-help] [SEARCHPATH] [SEARCHTERM1 SEARCHTERM2 ... ] .br .SH DESCRIPTION This manual page explains the \fBloook\fP program. This program helps to find OpenOffice files containing defined strings (Search terms). OpenOffice files are also files generates Libreoffice or Apache OpenOffice. .PP You can run \fBloook\fP without any arguments. In that case you insert the search path and the search terms into the graphical user interface. OpenOffice files are also files, which are created by Libreoffice or Apache OpenOffice. .SH Optionen .TP \fB\-h, \-\-help\fP show usage and exit uninstall.sh0000755000175000017500000000220713775413047014120 0ustar mechtildemechtilde#!/bin/bash # -*- coding: utf-8 -*- # # uninstall-loook.sh # # Copyright 2013, 2014 Mechtilde Stehmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA. InstP="/usr/local/lib/loook" ManP="/usr/share/man" if test $(whoami) == "root" then rm -rv $InstP rm -v $ManP/man1/loook.1.gz rm -v $ManP/de/man1/loook.1.gz rm -v /usr/local/bin/loook rm -v /usr/share/applications/loook.desktop rm -v /usr/share/pixmaps/loook.png else echo "You must be root!" fi exit