List
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
Research direction
No repository file, test, or requested change is identified; start by clarifying what “List” should add to PatternLanguage and locating any relevant entry point. Done cannot be defined until the expected behavior and acceptance criteria are specified.
Written by the indexing model from the issue text.
Description
import os
def find_files_by_keyword(root_directory, keyword):
"""
Searches for files containing a specific keyword in their name within a directory
and all its subdirectories.
Args:
root_directory (str): The absolute path to the folder to start searching from.
keyword (str): The word to search for in the filenames.
"""
found_files = []
print(f"Searching for files with '{keyword}' in the name, starting from '{root_directory}'...\n")
# os.walk() is a powerful generator that "walks" a directory tree
for dirpath, dirnames, filenames in os.walk(root_directory):
for filename in filenames:
# Check if the keyword (case-insensitive) is in the filename
if keyword.lower() in filename.lower():
full_path = os.path.join(dirpath, filename)
found_files.append(full_path)
return found_files
--- HOW TO USE THIS SCRIPT ---
if name == "main":
# 1. SET THE FOLDER YOU WANT TO SEARCH
# Example for Windows: 'C:\Users\YourUsername\Documents'
# Example for macOS/Linux: '/Users/YourUsername/Documents'
# IMPORTANT: Use an absolute path for best results.
search_path = "C:\Users\YourUsername\Documents"
# 2. SET THE KEYWORD YOU ARE LOOKING FOR
keyword_to_find = "report"
# Run the search function
results = find_files_by_keyword(search_path, keyword_to_find)
# 3. PRINT THE RESULTS
if results:
print("--- Found Files ---")
for file_path in results:
print(file_path)
else:
print(f"No files found with the keyword '{keyword_to_find}' in that location.")
- Dominant language
- C++
- Stars
- 278
- Forks
- 77
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 7
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from WerWolv/PatternLanguage
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
WerWolv/PatternLanguage#236 · 12 comments ·
Maintainers usually reply within 3 days
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
WerWolv/PatternLanguage#226 · 3 comments ·
Maintainers usually reply within 3 days
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
WerWolv/PatternLanguage#221 · 4 comments ·
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
WerWolv/PatternLanguage#219 ·
Maintainers usually reply within 3 days
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
WerWolv/PatternLanguage#218 ·
Maintainers usually reply within 3 days
All issues in WerWolv/PatternLanguage
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
MerginMaps/mobile#4741 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Icinga/icinga2#11077 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
agent:WSL bug linux LOW ui
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Copter: PosHold brake-entry threshold became 16 deg instead of 0.16 deg after the radians conversionPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 78/100
ArduPilot/ardupilot#34617 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day