Skip to content

Search contents in a .docx file | GUI with Tkinter

License

Notifications You must be signed in to change notification settings

Sinhala-Typing/docx-search-tk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docx-search




Description:

The docx-search Python script is a tool designed to search for a specified word within Microsoft Word (.docx) documents in a given directory. It utilizes the python-docx library for handling Word documents and implements multi-threading to improve search efficiency.

Features:

  • Word Search: The script searches for a specified target word within the paragraphs of each Word document in the provided directory.

  • Logging: Detailed logging is implemented, capturing information about the search process, including the presence or absence of the target word in each document.

  • Multi-threading: The script utilizes the concurrent.futures.ThreadPoolExecutor to concurrently process multiple Word documents, improving overall search performance.

  • Graphical User Interface

    • Check out the below demonstration:
2024-01-24.10-36-56.mp4

Getting Started:

  1. Requirements:

    • Python 3.x
    • Install required Python packages using
    pip install -r requirements.txt
    
  2. Usage:

    • Run the script from the command line:
      python search.py
      
  3. Logging:

    • Logs are saved in the 'logs' directory with filenames in the format 'YYYY-MM-DD_HH-MM-SS.log.'
  4. Output:

    • The script outputs information about the presence or absence of the target word in each processed document.

Contributing:

  • Contributions are welcome! Feel free to fork the repository, make improvements, and create a pull request.

License:

  • This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments:

  • This readme.md and the docstrings were generated with ChatGPT, a language model developed by OpenAI.

About

Search contents in a .docx file | GUI with Tkinter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%