Skip to content

Commit 564977a

Browse files
Create generate_readme.py
1 parent 71f7703 commit 564977a

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/scripts/generate_readme.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import os
2+
3+
BASE_DIR = "."
4+
TEMPLATE = """# {project_name}
5+
6+
## 📌 Project Overview
7+
This project is part of the **Machine Learning Projects Collection (100+ projects with source code)**.
8+
9+
## 🛠️ Potential Technologies / Tools
10+
- Python
11+
- Pandas
12+
- Scikit-learn
13+
- TensorFlow/Keras (if deep learning)
14+
15+
## 🚀 How to Run
16+
1. Clone this repository
17+
2. Navigate to this project folder
18+
3. Install dependencies (`pip install -r requirements.txt`)
19+
4. Run the code
20+
21+
---
22+
✅ Auto-generated by [ML Projects Bot] 🤖
23+
"""
24+
25+
def format_name(folder):
26+
return folder.replace("-", " ").replace("_", " ").title()
27+
28+
for folder in os.listdir(BASE_DIR):
29+
if os.path.isdir(folder) and folder not in [".github", ".git"]:
30+
readme_path = os.path.join(folder, "README.md")
31+
if not os.path.exists(readme_path):
32+
project_name = format_name(folder)
33+
with open(readme_path, "w") as f:
34+
f.write(TEMPLATE.format(project_name=project_name))
35+
print(f"Generated README for {project_name}")

0 commit comments

Comments
 (0)