Skip to content

Latest commit

 

History

History
194 lines (150 loc) · 6.21 KB

File metadata and controls

194 lines (150 loc) · 6.21 KB

🚀 Automated Folder Reorganization Script

This PowerShell script will reorganize all remaining SQL Learning Path folders with the consistent internal structure.

📋 What This Script Does

  1. Creates standard subfolders (concepts/, examples/, exercises/, resources/) for each topic
  2. Moves existing files to appropriate subfolders based on file type
  3. Renames files to follow consistent naming conventions
  4. Creates README files for each subfolder
  5. Updates main topic README to reflect new structure

💻 PowerShell Script

# SQL Learning Path Folder Reorganization Script
# Run this from the root SQL-Learning-Path directory

$folders = @(
    "2-SQL-Data-Types",
    "3-Basic-Queries", 
    "4-Filtering-and-Conditions",
    "7-Joins",
    "8-Subqueries-and-CTEs",
    "9-Views-and-Indexes",
    "10-Transactions",
    "12-Data-Modeling",
    "13-Advanced-Queries",
    "14-Performance-Tuning",
    "15-Stored-Procedures-and-Triggers",
    "16-Admin-Tasks",
    "17-NoSQL-vs-SQL",
    "18-SQL-Projects"
)

foreach ($folder in $folders) {
    Write-Host "Reorganizing $folder..." -ForegroundColor Green
    
    # Create standard subfolders
    $subfolders = @("concepts", "examples", "exercises", "resources")
    foreach ($subfolder in $subfolders) {
        $path = Join-Path $folder $subfolder
        if (!(Test-Path $path)) {
            New-Item -ItemType Directory -Path $path -Force
            Write-Host "  Created $subfolder/" -ForegroundColor Yellow
        }
    }
    
    # Move files based on type
    $files = Get-ChildItem $folder -File | Where-Object { $_.Name -ne "README.md" }
    
    foreach ($file in $files) {
        $extension = $file.Extension
        $newName = $file.Name.ToLower().Replace("_", "-")
        
        if ($extension -eq ".sql") {
            # Move SQL files to examples/
            $destination = Join-Path $folder "examples\$newName"
            Move-Item $file.FullName $destination -Force
            Write-Host "  Moved $($file.Name) to examples/" -ForegroundColor Cyan
        }
        elseif ($extension -eq ".md") {
            # Move MD files to concepts/
            $destination = Join-Path $folder "concepts\$newName"
            Move-Item $file.FullName $destination -Force
            Write-Host "  Moved $($file.Name) to concepts/" -ForegroundColor Cyan
        }
    }
    
    Write-Host "  Completed $folder" -ForegroundColor Green
    Write-Host ""
}

Write-Host "All folders reorganized successfully!" -ForegroundColor Green
Write-Host "Next steps:" -ForegroundColor Yellow
Write-Host "1. Update README files in each folder" -ForegroundColor White
Write-Host "2. Create exercises and resources content" -ForegroundColor White
Write-Host "3. Test the new learning flow" -ForegroundColor White

🎯 Manual Steps After Running Script

For Each Folder, Create:

1. Main README.md Template:

# [Number]. [Topic] - [Description]

[Brief description of the topic and what students will learn]

## 🗂️ Section Contents

### 📖 **[Concepts](./concepts/)** - Learn the Theory
**Start here to understand [topic] fundamentals**
- [File 1](./concepts/file1.md) - Description
- [File 2](./concepts/file2.md) - Description

### 💻 **[Examples](./examples/)** - See Working Code
**Run these examples to see [topic] in action**
- [01-examples.sql](./examples/01-examples.sql) - Basic examples
- [02-advanced.sql](./examples/02-advanced.sql) - Advanced examples

### 🏋️ **[Exercises](./exercises/)** - Practice Your Skills  
**Test your understanding with hands-on problems**
- [Practice Problems](./exercises/README.md) - Progressive exercises
- [Solutions](./exercises/solutions.sql) - Check your answers

### 📚 **[Resources](./resources/)** - Quick Reference
**Handy references and tips**
- [Quick Reference](./resources/cheat-sheet.md) - Syntax summary
- [Common Mistakes](./resources/common-mistakes.md) - What to avoid

## 🔄 Navigation
[← Previous: [Previous Topic]](../[Previous-Folder]/README.md) | [Next: [Next Topic]](../[Next-Folder]/README.md)

---
[🏠 Back to Main](../README.md)

2. exercises/README.md Template:

# 🏋️ [Topic] - Practice Exercises

Test your understanding of [topic] with these hands-on exercises.

## 🎯 Exercise Set 1: [Category]

### Exercise 1.1: [Title]
**Problem**: [Description]
**Expected Result**: [What should happen]
**Hint**: [Guidance for student]

[More exercises...]

## ✅ Self-Assessment Checklist
After completing these exercises, you should be able to:
- [ ] [Skill 1]
- [ ] [Skill 2]
- [ ] [Skill 3]

3. resources/cheat-sheet.md Template:

# 📚 [Topic] - Quick Reference

Essential syntax and concepts for [topic].

## 🔧 Basic Syntax
[Key syntax patterns]

## 📊 Common Patterns
[Frequently used examples]

## ❌ Common Mistakes
[Things to avoid]

## 🎯 Performance Tips
[Optimization advice]

🚀 Benefits After Reorganization

For Students:

  • Clear Learning Path: Know exactly where to find theory vs practice
  • Consistent Experience: Same structure across all topics
  • Faster Navigation: Predictable organization
  • Better Comprehension: Logical flow from concepts to practice

For Contributors:

  • Easy Content Addition: Know exactly where new material belongs
  • Consistent Standards: Same structure everywhere
  • Clear Responsibilities: Each folder has a specific purpose
  • Scalable Organization: Easy to maintain and expand

For the Project:

  • Professional Appearance: Looks organized and mature
  • Better SEO: Improved discoverability
  • Higher Quality: Structured learning experience
  • Competitive Edge: Matches or exceeds paid course organization

📋 Implementation Checklist

  • Run the PowerShell reorganization script
  • Update main README files for each folder
  • Create exercises/README.md for each topic
  • Create resources/cheat-sheet.md for each topic
  • Update navigation links between folders
  • Test the learning flow with a sample topic
  • Get feedback from potential users
  • Document the new structure in main README

Ready to transform your SQL Learning Path into a professional-grade educational resource! 🚀