Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
hirusha-adi committed Jan 23, 2024
1 parent db09575 commit 5482d88
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions search.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
import os
from docx_search import docx_search


def main():
parser = argparse.ArgumentParser(description='Search for a word in .docx files in a specified directory.')
parser.add_argument(
'--dir', dest='target_dir', type=str, default=os.getcwd(),
help='The target directory to search for .docx files. Defaults to the current working directory.'
)
parser.add_argument('--dir', dest='target_dir', type=str, default=os.getcwd(),
help='The target directory to search for .docx files. Defaults to the current working directory.')
parser.add_argument('--word', dest='target_word', type=str,
help='The word to search for in the documents. If not provided, user will be prompted.')
help='The word to search for in the documents. If not provided, the user will be prompted.')
args = parser.parse_args()

target_dir = args.target_dir
Expand All @@ -20,5 +19,6 @@ def main():

docx_search(target_dir=target_dir, target_word=target_word)


if __name__ == "__main__":
main()

0 comments on commit 5482d88

Please sign in to comment.