-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimple_script.dsl
More file actions
63 lines (49 loc) · 1.27 KB
/
Copy pathsimple_script.dsl
File metadata and controls
63 lines (49 loc) · 1.27 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
# Simple DSL Script Example
# This script demonstrates basic DSL capabilities
# Set up variables
project_name = "SUMD Project"
working_dir = cwd()
print("Working directory:")
print(working_dir)
print("Project name:")
print(project_name)
# Check if we have a SUMD.md file
if exists("SUMD.md"):
print("SUMD.md found")
# Get file info
content = read_file("SUMD.md")
lines = len(content.splitlines())
print("SUMD.md has lines:")
print(lines)
else:
print("SUMD.md not found")
print("Creating a basic SUMD.md...")
# Create a basic SUMD.md
basic_content = "# SUMD Project
## Intent
This is a sample SUMD document generated by DSL script.
## Architecture
- Python project structure
- Modern development practices
## Dependencies
- Python 3.8+
- Standard libraries
## Installation
pip install -e .
"
write_file("SUMD.md", basic_content)
print("SUMD.md created")
# List Python files in the project
python_files = list_files("*.py")
print("Found Python files:")
print(len(python_files))
# Demonstrate arithmetic
result = 1 + 2 * 3
print("Arithmetic result:")
print(result)
# Demonstrate logic
if result > 5:
print("Result is greater than 5")
else:
print("Result is not greater than 5")
print("DSL script completed successfully!")