Skip to content

Commit

Permalink
terminal lag issue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aarinz committed Sep 1, 2024
1 parent efdb183 commit d3f63b0
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions quickdoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ from docx2pdf import convert as DOCX2PDFConverter

def find_file(filename):
try:
result = subprocess.run(['find', '/', '-name', filename], capture_output=True, text=True, shell=False)
found_files = result.stdout.strip().split('\n')
if found_files and found_files[0]:
return found_files[0]
else:
return None
for root, dirs, files in os.walk(os.getcwd()):
if filename in files:
return os.path.join(root, filename)
return None
except Exception as e:
print(f"Error finding file '{filename}': {e}")
return None
Expand Down Expand Up @@ -89,6 +87,5 @@ def main():
elif args.conversion_type == 'docx2pdf':
docx_pdf(args.i, args.o)

if __name__ == '__main__':
main()

if __name__ == '_main_':
main()

0 comments on commit d3f63b0

Please sign in to comment.