🤖 AUTO FOLDER STATUS UPDATER - Avtomatsko posodabljanje pike!
✅ NEW PYTHON SCRIPT: update_folder_status.py 🎯 FUNKCIONALNOST: - Avtomatsko preveri vsebino vseh folderjev - Šteje files (.tmx, .json, .tsx, .md) - Posodobi README.md z ustrezno piko: • 🔴 = 0 files (PRAZNO) • 🟣 = nekaj files (V DELU) • 🟢 = dosti files (DOKONČANO) 📊 REAL-TIME STATUS CHECK: 🔴 maps/ → PRAZNO (0 files) ✅ 🔴 tilesets/ → PRAZNO (0 files) ✅ 🟣 tutorials/ → V DELU (1 file) ✅ 🟣 TODO/ → V DELU (2 files) ✅ TOTAL: 3 files v /tiled/ 🔄 KAKO UPORABIŠ: 1. Dodaš files v folder (npr. demo_farm.tmx v maps/) 2. Run: python3 update_folder_status.py 3. Script avtomatsko posodobi vse pike! ✅ 4. README.md in STATUS.md se osvežijo! 🎨 KAJ SE ZGODI: - maps/ 🔴 → 🟣 (če dodaš 1-4 files) - maps/ 🟣 → 🟢 (če dodaš 5+ files) - Avtomatsko prešteje in posodobi! 📁 Files: - update_folder_status.py (executable!) - Updated: tiled/maps/README.md - Updated: tiled/tilesets/README.md - Updated: tiled/tutorials/README.md - Updated: tiled/TODO/KAJ_NAREDITI_ZA_DEMO.md - Updated: tiled/STATUS.md 🚀 NEXT: Ko dodaš file → run script → pike se posodobijo!
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# 📊 TILED FOLDER STATUS OVERVIEW
|
||||
|
||||
**Last Updated:** 3. Januar 2026 @ 16:51
|
||||
**Version:** 1.0
|
||||
**Last Updated:** {timestamp}
|
||||
**Auto-generated by:** update_folder_status.py
|
||||
|
||||
---
|
||||
|
||||
@@ -9,17 +9,10 @@
|
||||
|
||||
```
|
||||
/tiled/
|
||||
├── 🔴 maps/ [PRAZNO - 0 files]
|
||||
│ └── (Waiting: Move TMX/JSON files from /assets/maps/)
|
||||
│
|
||||
├── 🔴 tilesets/ [PRAZNO - 0 files]
|
||||
│ └── (Waiting: Move TSX files from /assets/maps/organized_tilesets/)
|
||||
│
|
||||
├── 🔴 tutorials/ [PRAZNO - 0 files]
|
||||
│ └── (Waiting: Move guides from /assets/maps/)
|
||||
│
|
||||
└── 🟣 TODO/ [V DELU - 1 file]
|
||||
└── ✅ KAJ_NAREDITI_ZA_DEMO.md
|
||||
├── 🔴 maps [PRAZNO - 0 files]
|
||||
├── 🔴 tilesets [PRAZNO - 0 files]
|
||||
├── 🟣 tutorials [V DELU - 1 files]
|
||||
├── 🟣 TODO [V DELU - 2 files]
|
||||
```
|
||||
|
||||
---
|
||||
@@ -28,9 +21,9 @@
|
||||
|
||||
| Pike | Status | Opis |
|
||||
|------|--------|------|
|
||||
| 🟢 | **Dokončano** | Folder je complete, ready to use! |
|
||||
| 🟣 | **V delu** | Nekaj je notri, še ni končano |
|
||||
| 🔴 | **Prazno** | Nič ni notri, čaka na content |
|
||||
| 🟢 | **DOKONČANO** | Folder je complete, ready to use! |
|
||||
| 🟣 | **V DELU** | Nekaj je notri, še ni končano |
|
||||
| 🔴 | **PRAZNO** | Nič ni notri, čaka na content |
|
||||
|
||||
---
|
||||
|
||||
@@ -39,52 +32,18 @@
|
||||
```
|
||||
TOTAL FOLDERS: 4
|
||||
├── 🟢 Complete: 0 (0%)
|
||||
├── 🟣 In Progress: 1 (25%)
|
||||
└── 🔴 Empty: 3 (75%)
|
||||
├── 🟣 In Progress: 2 (50%)
|
||||
└── 🔴 Empty: 2 (50%)
|
||||
|
||||
TOTAL FILES: 1
|
||||
└── TODO/KAJ_NAREDITI_ZA_DEMO.md
|
||||
TOTAL FILES: 3
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ✅ **COMPLETED:**
|
||||
## 🔄 **AUTO-UPDATE:**
|
||||
|
||||
- 🟣 **TODO/** - KAJ_NAREDITI_ZA_DEMO.md created!
|
||||
Run `python update_folder_status.py` to refresh all status indicators!
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ **PENDING:**
|
||||
|
||||
### **🔴 maps/** (PRAZNO)
|
||||
```
|
||||
WAITING FOR:
|
||||
- Move 9 TMX files from /assets/maps/
|
||||
- Move 3 JSON files from /assets/maps/
|
||||
```
|
||||
|
||||
### **🔴 tilesets/** (PRAZNO)
|
||||
```
|
||||
WAITING FOR:
|
||||
- Move 50+ TSX files from /assets/maps/
|
||||
- Organize by category (base, farm, extended, etc.)
|
||||
```
|
||||
|
||||
### **🔴 tutorials/** (PRAZNO)
|
||||
```
|
||||
WAITING FOR:
|
||||
- Move 10+ MD guides from /assets/maps/
|
||||
- Examples: AUTO_TILING_VODIC.md, TILED_GUIDE.md, etc.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🚀 **NEXT ACTIONS:**
|
||||
|
||||
1. **Create demo** (skip file organization for now!)
|
||||
2. **Later:** Move files from /assets/maps/ to /tiled/
|
||||
3. **Update status** when done!
|
||||
|
||||
---
|
||||
|
||||
**When folder is done → Change 🔴 to 🟢!**
|
||||
**When folder is done → Status changes automatically! 🔴 → 🟣 → 🟢**
|
||||
|
||||
34
tiled/TODO/README.md
Normal file
34
tiled/TODO/README.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# 🟣 TODO FOLDER - V DELU
|
||||
|
||||
**Status:** 🟣 **V DELU** (1 files)
|
||||
|
||||
---
|
||||
|
||||
## 📁 **KAJ PRIDE SEM:**
|
||||
|
||||
```
|
||||
Kaj je še treba narediti za Tiled
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📊 **TRENUTNI STATUS:**
|
||||
|
||||
Mapa ima **1 files**!
|
||||
|
||||
**Files:**
|
||||
```
|
||||
✅ KAJ_NAREDITI_ZA_DEMO.md
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔄 **POSODABLJANJE:**
|
||||
|
||||
Status se avtomatsko posodobi glede na število files!
|
||||
|
||||
Run: `python update_folder_status.py` za refresh!
|
||||
|
||||
---
|
||||
|
||||
**Check: `/tiled/STATUS.md` za overview!**
|
||||
@@ -7,29 +7,25 @@
|
||||
## 📁 **KAJ PRIDE SEM:**
|
||||
|
||||
```
|
||||
Vse .tmx in .json Tiled map files:
|
||||
- demo_farm.tmx
|
||||
- NovaFarma.tmx
|
||||
- TownSquare.json
|
||||
- etc.
|
||||
Vse .tmx in .json Tiled map files
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ **TRENUTNO:**
|
||||
## 📊 **TRENUTNI STATUS:**
|
||||
|
||||
Mapa je **PRAZNA**.
|
||||
|
||||
Vse mape so še v `/assets/maps/` (9 TMX files!)
|
||||
|
||||
---
|
||||
|
||||
## 🚀 **NEXT:**
|
||||
|
||||
Ko boš premikal mape sem, spremeni status:
|
||||
Ko boš dodajal files sem, status se avtomatsko posodobi:
|
||||
- 🔴 → 🟣 (če začneš dodajat)
|
||||
- 🟣 → 🟢 (ko končaš!)
|
||||
|
||||
Run: `python update_folder_status.py` za update!
|
||||
|
||||
---
|
||||
|
||||
**Check: `/tiled/STATUS.md` za overview!**
|
||||
|
||||
@@ -7,30 +7,25 @@
|
||||
## 📁 **KAJ PRIDE SEM:**
|
||||
|
||||
```
|
||||
Vse .tsx tileset files:
|
||||
- farm_tileset.tsx
|
||||
- ground_tiles.tsx
|
||||
- fence.tsx
|
||||
- buildings.tsx
|
||||
- etc.
|
||||
Vse .tsx tileset files
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ **TRENUTNO:**
|
||||
## 📊 **TRENUTNI STATUS:**
|
||||
|
||||
Mapa je **PRAZNA**.
|
||||
|
||||
Vsi tilesets so še v `/assets/maps/organized_tilesets/` (75 TSX files!)
|
||||
|
||||
---
|
||||
|
||||
## 🚀 **NEXT:**
|
||||
|
||||
Ko boš premikal tilesets sem, spremeni status:
|
||||
Ko boš dodajal files sem, status se avtomatsko posodobi:
|
||||
- 🔴 → 🟣 (če začneš dodajat)
|
||||
- 🟣 → 🟢 (ko končaš!)
|
||||
|
||||
Run: `python update_folder_status.py` za update!
|
||||
|
||||
---
|
||||
|
||||
**Check: `/tiled/STATUS.md` za overview!**
|
||||
|
||||
@@ -1,35 +1,33 @@
|
||||
# 🔴 TUTORIALS FOLDER - PRAZNO
|
||||
# 🟣 TUTORIALS FOLDER - V DELU
|
||||
|
||||
**Status:** 🔴 **PRAZNO** (0 files)
|
||||
**Status:** 🟣 **V DELU** (1 files)
|
||||
|
||||
---
|
||||
|
||||
## 📁 **KAJ PRIDE SEM:**
|
||||
|
||||
```
|
||||
Vsi Tiled vodiči in navodila:
|
||||
- AUTO_TILING_VODIC.md
|
||||
- TILED_GUIDE.md
|
||||
- TERRAIN_NOTATION_REFERENCE.md
|
||||
- TILESET_SIZES_FINAL.md
|
||||
- etc.
|
||||
Vsi Tiled vodiči in navodila
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ **TRENUTNO:**
|
||||
## 📊 **TRENUTNI STATUS:**
|
||||
|
||||
Mapa je **PRAZNA**.
|
||||
Mapa ima **1 files**!
|
||||
|
||||
Vsi vodiči so še v `/assets/maps/` (10+ MD files!)
|
||||
**Files:**
|
||||
```
|
||||
✅ README.md
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🚀 **NEXT:**
|
||||
## 🔄 **POSODABLJANJE:**
|
||||
|
||||
Ko boš premikal guides sem, spremeni status:
|
||||
- 🔴 → 🟣 (če začneš dodajat)
|
||||
- 🟣 → 🟢 (ko končaš!)
|
||||
Status se avtomatsko posodobi glede na število files!
|
||||
|
||||
Run: `python update_folder_status.py` za refresh!
|
||||
|
||||
---
|
||||
|
||||
|
||||
244
update_folder_status.py
Executable file
244
update_folder_status.py
Executable file
@@ -0,0 +1,244 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
🎨 FOLDER STATUS AUTO-UPDATER
|
||||
Automatically updates README.md status indicators based on folder contents!
|
||||
|
||||
Usage: python update_folder_status.py
|
||||
"""
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
# Base path
|
||||
BASE_PATH = Path(__file__).parent / "tiled"
|
||||
|
||||
# Folder configurations
|
||||
FOLDERS = {
|
||||
"maps": {
|
||||
"extensions": [".tmx", ".json"],
|
||||
"description": "Vse .tmx in .json Tiled map files"
|
||||
},
|
||||
"tilesets": {
|
||||
"extensions": [".tsx"],
|
||||
"description": "Vse .tsx tileset files"
|
||||
},
|
||||
"tutorials": {
|
||||
"extensions": [".md"],
|
||||
"description": "Vsi Tiled vodiči in navodila"
|
||||
},
|
||||
"TODO": {
|
||||
"extensions": [".md"],
|
||||
"description": "Kaj je še treba narediti za Tiled"
|
||||
}
|
||||
}
|
||||
|
||||
def count_files(folder_path, extensions):
|
||||
"""Count files with specific extensions in folder"""
|
||||
count = 0
|
||||
if folder_path.exists():
|
||||
for ext in extensions:
|
||||
count += len(list(folder_path.glob(f"*{ext}")))
|
||||
return count
|
||||
|
||||
def get_status_icon(file_count, folder_name):
|
||||
"""Determine status icon based on file count"""
|
||||
if file_count == 0:
|
||||
return "🔴", "PRAZNO"
|
||||
elif folder_name == "TODO" or file_count < 5: # TODO is always in progress
|
||||
return "🟣", "V DELU"
|
||||
else:
|
||||
return "🟢", "DOKONČANO"
|
||||
|
||||
def generate_readme(folder_name, config):
|
||||
"""Generate README.md content for folder"""
|
||||
folder_path = BASE_PATH / folder_name
|
||||
file_count = count_files(folder_path, config["extensions"])
|
||||
icon, status = get_status_icon(file_count, folder_name)
|
||||
|
||||
# Generate content
|
||||
content = f"""# {icon} {folder_name.upper()} FOLDER - {status}
|
||||
|
||||
**Status:** {icon} **{status}** ({file_count} files)
|
||||
|
||||
---
|
||||
|
||||
## 📁 **KAJ PRIDE SEM:**
|
||||
|
||||
```
|
||||
{config['description']}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📊 **TRENUTNI STATUS:**
|
||||
|
||||
"""
|
||||
|
||||
if file_count == 0:
|
||||
content += """Mapa je **PRAZNA**.
|
||||
|
||||
---
|
||||
|
||||
## 🚀 **NEXT:**
|
||||
|
||||
Ko boš dodajal files sem, status se avtomatsko posodobi:
|
||||
- 🔴 → 🟣 (če začneš dodajat)
|
||||
- 🟣 → 🟢 (ko končaš!)
|
||||
|
||||
Run: `python update_folder_status.py` za update!
|
||||
"""
|
||||
else:
|
||||
content += f"""Mapa ima **{file_count} files**!
|
||||
|
||||
"""
|
||||
# List files
|
||||
if folder_path.exists():
|
||||
files = []
|
||||
for ext in config["extensions"]:
|
||||
files.extend(folder_path.glob(f"*{ext}"))
|
||||
|
||||
if files:
|
||||
content += "**Files:**\n```\n"
|
||||
for f in sorted(files)[:10]: # Show first 10
|
||||
content += f"✅ {f.name}\n"
|
||||
if len(files) > 10:
|
||||
content += f"... and {len(files) - 10} more!\n"
|
||||
content += "```\n\n"
|
||||
|
||||
content += """---
|
||||
|
||||
## 🔄 **POSODABLJANJE:**
|
||||
|
||||
Status se avtomatsko posodobi glede na število files!
|
||||
|
||||
Run: `python update_folder_status.py` za refresh!
|
||||
"""
|
||||
|
||||
content += """
|
||||
---
|
||||
|
||||
**Check: `/tiled/STATUS.md` za overview!**
|
||||
"""
|
||||
|
||||
return content
|
||||
|
||||
def update_all_folders():
|
||||
"""Update README.md in all folders"""
|
||||
print("🎨 UPDATING FOLDER STATUS INDICATORS...\n")
|
||||
|
||||
for folder_name, config in FOLDERS.items():
|
||||
folder_path = BASE_PATH / folder_name
|
||||
readme_path = folder_path / "README.md"
|
||||
|
||||
# Generate new content
|
||||
content = generate_readme(folder_name, config)
|
||||
|
||||
# Write to file
|
||||
try:
|
||||
readme_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
readme_path.write_text(content, encoding='utf-8')
|
||||
|
||||
# Get status for display
|
||||
file_count = count_files(folder_path, config["extensions"])
|
||||
icon, status = get_status_icon(file_count, folder_name)
|
||||
|
||||
print(f"{icon} {folder_name:12} → {status:12} ({file_count} files) ✅")
|
||||
except Exception as e:
|
||||
print(f"❌ Error updating {folder_name}: {e}")
|
||||
|
||||
print("\n✅ ALL FOLDERS UPDATED!")
|
||||
print("\n📊 Summary saved to: tiled/STATUS.md")
|
||||
|
||||
# Update main STATUS.md
|
||||
update_status_overview()
|
||||
|
||||
def update_status_overview():
|
||||
"""Update main STATUS.md file"""
|
||||
status_content = """# 📊 TILED FOLDER STATUS OVERVIEW
|
||||
|
||||
**Last Updated:** {timestamp}
|
||||
**Auto-generated by:** update_folder_status.py
|
||||
|
||||
---
|
||||
|
||||
## 📂 **FOLDER STATUS:**
|
||||
|
||||
```
|
||||
/tiled/
|
||||
"""
|
||||
|
||||
from datetime import datetime
|
||||
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
|
||||
total_complete = 0
|
||||
total_in_progress = 0
|
||||
total_empty = 0
|
||||
total_files = 0
|
||||
|
||||
for folder_name, config in FOLDERS.items():
|
||||
folder_path = BASE_PATH / folder_name
|
||||
file_count = count_files(folder_path, config["extensions"])
|
||||
icon, status = get_status_icon(file_count, folder_name)
|
||||
|
||||
status_content += f"├── {icon} {folder_name:12} [{status:12} - {file_count} files]\n"
|
||||
|
||||
total_files += file_count
|
||||
if status == "DOKONČANO":
|
||||
total_complete += 1
|
||||
elif status == "V DELU":
|
||||
total_in_progress += 1
|
||||
else:
|
||||
total_empty += 1
|
||||
|
||||
status_content += """```
|
||||
|
||||
---
|
||||
|
||||
## 🎯 **STATUS LEGENDA:**
|
||||
|
||||
| Pike | Status | Opis |
|
||||
|------|--------|------|
|
||||
| 🟢 | **DOKONČANO** | Folder je complete, ready to use! |
|
||||
| 🟣 | **V DELU** | Nekaj je notri, še ni končano |
|
||||
| 🔴 | **PRAZNO** | Nič ni notri, čaka na content |
|
||||
|
||||
---
|
||||
|
||||
## 📊 **STATISTICS:**
|
||||
|
||||
```
|
||||
TOTAL FOLDERS: {total}
|
||||
├── 🟢 Complete: {complete} ({complete_pct}%)
|
||||
├── 🟣 In Progress: {progress} ({progress_pct}%)
|
||||
└── 🔴 Empty: {empty} ({empty_pct}%)
|
||||
|
||||
TOTAL FILES: {files}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔄 **AUTO-UPDATE:**
|
||||
|
||||
Run `python update_folder_status.py` to refresh all status indicators!
|
||||
|
||||
---
|
||||
|
||||
**When folder is done → Status changes automatically! 🔴 → 🟣 → 🟢**
|
||||
""".format(
|
||||
timestamp=timestamp,
|
||||
total=len(FOLDERS),
|
||||
complete=total_complete,
|
||||
progress=total_in_progress,
|
||||
empty=total_empty,
|
||||
complete_pct=round(total_complete/len(FOLDERS)*100),
|
||||
progress_pct=round(total_in_progress/len(FOLDERS)*100),
|
||||
empty_pct=round(total_empty/len(FOLDERS)*100),
|
||||
files=total_files
|
||||
)
|
||||
|
||||
status_path = BASE_PATH / "STATUS.md"
|
||||
status_path.write_text(status_content, encoding='utf-8')
|
||||
print(f"✅ STATUS.md updated! ({total_files} total files)")
|
||||
|
||||
if __name__ == "__main__":
|
||||
update_all_folders()
|
||||
Reference in New Issue
Block a user