초기화
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import os
|
||||
|
||||
def search_files(directory):
|
||||
for root, dirs, files in os.walk(directory):
|
||||
if "venv" in root or "__pycache__" in root or ".git" in root or ".gemini" in root:
|
||||
continue
|
||||
for file in files:
|
||||
if file.endswith((".py", ".json", ".ini", ".conf", ".cfg", ".yml", ".yaml")):
|
||||
path = os.path.join(root, file)
|
||||
try:
|
||||
with open(path, "r", encoding="utf-8", errors="ignore") as f:
|
||||
content = f.read()
|
||||
if "mysql" in content.lower() or "db_host" in content.lower() or "host =" in content.lower():
|
||||
print(f"Found in {path}:")
|
||||
for line in content.splitlines():
|
||||
if any(x in line.lower() for x in ["host", "port", "user", "password", "db"]):
|
||||
print(f" {line.strip()}")
|
||||
except Exception as e:
|
||||
pass
|
||||
|
||||
search_files("D:\\04_CTNT\\01_카본절단MC(CC)\\CC0324_양산_V0\\02_전장제어\\PLC_Communication_MQTT\\step5_modify")
|
||||
Reference in New Issue
Block a user