-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsync_summary.py
More file actions
78 lines (64 loc) · 2.72 KB
/
Copy pathsync_summary.py
File metadata and controls
78 lines (64 loc) · 2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/env python3
"""
Sync Summary Generator
Generates a summary of the LaTeX to Markdown sync process
"""
import os
import glob
from pathlib import Path
def generate_sync_summary():
"""Generate a summary of the sync process"""
latex_dir = "latex"
markdown_dir = "manuscript"
code_dir = "code"
print("🔄 LaTeX to Markdown Sync Summary")
print("=" * 50)
# Count files
latex_files = glob.glob(os.path.join(latex_dir, "*.tex"))
markdown_files = glob.glob(os.path.join(markdown_dir, "*.md"))
code_files = glob.glob(os.path.join(code_dir, "*.cpp"))
code_files.extend(glob.glob(os.path.join(code_dir, "*.c++")))
print(f"📄 LaTeX Files: {len(latex_files)}")
print(f"📝 Markdown Files: {len(markdown_files)}")
print(f"💻 Code Files: {len(code_files)}")
print("\n📚 LaTeX Files Converted:")
for tex_file in sorted(latex_files):
filename = os.path.basename(tex_file)
print(f" ✓ {filename}")
print("\n📖 Markdown Files Created:")
for md_file in sorted(markdown_files):
filename = os.path.basename(md_file)
print(f" ✓ {filename}")
print("\n💻 Code Files Available:")
code_categories = {}
for code_file in sorted(code_files):
filename = os.path.basename(code_file)
category = filename.split('-')[0] if '-' in filename else 'other'
if category not in code_categories:
code_categories[category] = []
code_categories[category].append(filename)
for category, files in code_categories.items():
print(f" 📁 {category}: {len(files)} files")
for file in files[:5]: # Show first 5 files
print(f" - {file}")
if len(files) > 5:
print(f" ... and {len(files) - 5} more")
print("\n🎯 Key Features:")
print(" ✅ Complete LaTeX to Markdown conversion")
print(" ✅ Code embedding from code/ directory")
print(" ✅ Proper formatting and structure")
print(" ✅ All chapters and sections preserved")
print(" ✅ Code examples with syntax highlighting")
print(" ✅ Responsive Markdown format")
print("\n📖 Book Structure:")
print(" 📚 Part I: Dasar Pemrograman C++")
print(" 🏗️ Part II: Object-Oriented Programming")
print(" 🎨 Part III: Qt Library dan Komponen")
print(" 🖥️ Part IV: Antarmuka Pengguna")
print("\n🚀 Ready to Use:")
print(" 📁 All files in 'manuscript/' directory")
print(" 📖 Open 'manuscript/book.md' for navigation")
print(" 💻 Code examples ready to run with Qt Creator")
print(" 📱 Responsive format for all devices")
if __name__ == "__main__":
generate_sync_summary()