Skip to content

Commit e8e5fd6

Browse files
committed
help and version
1 parent f262357 commit e8e5fd6

File tree

2 files changed

+81
-1
lines changed

2 files changed

+81
-1
lines changed

README.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,4 +172,84 @@ def index():
172172
</ul>
173173
</body>
174174
</html>
175+
```
176+
177+
### Loop (for)
178+
Sucuri has a loop in collections of objects, so it is necessary to use the object that has this characteristic as a parameter and to use the information in that collection. See the example below:
179+
- Sucuri file (`template_include.suc`):
180+
```
181+
include inc/link
182+
include inc/list
183+
184+
html
185+
body
186+
h1 Hello
187+
| Title
188+
| More
189+
+link
190+
h1 Test
191+
+list
192+
```
193+
- File inside the folder `inc` called `link.suc` (`inc/link.suc`):
194+
```
195+
a(href='#') {text}
196+
```
197+
- File inside the folder `inc` called `list.suc` (`inc/list.suc`):
198+
```
199+
ul
200+
<for a in var>
201+
li Value #a
202+
h1 test
203+
ul
204+
<for w in var>
205+
li Another #w
206+
<endfor>
207+
<endfor>
208+
```
209+
- Result:
210+
```
211+
<html>
212+
<body>
213+
<h1>Hello
214+
Title
215+
More
216+
</h1>
217+
<a href="#">Hello! I'm here!</a>
218+
<h1>Test</h1>
219+
<ul>
220+
<li>Value 1</li>
221+
<h1>test</h1>
222+
<ul>
223+
<li>Another 1</li>
224+
<li>Another 2</li>
225+
<li>Another 3</li>
226+
<li>Another 4</li>
227+
</ul>
228+
<li>Value 2</li>
229+
<h1>test</h1>
230+
<ul>
231+
<li>Another 1</li>
232+
<li>Another 2</li>
233+
<li>Another 3</li>
234+
<li>Another 4</li>
235+
</ul>
236+
<li>Value 3</li>
237+
<h1>test</h1>
238+
<ul>
239+
<li>Another 1</li>
240+
<li>Another 2</li>
241+
<li>Another 3</li>
242+
<li>Another 4</li>
243+
</ul>
244+
<li>Value 4</li>
245+
<h1>test</h1>
246+
<ul>
247+
<li>Another 1</li>
248+
<li>Another 2</li>
249+
<li>Another 3</li>
250+
<li>Another 4</li>
251+
</ul>
252+
</ul>
253+
</body>
254+
</html>
175255
```

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
# For a discussion on single-sourcing the version across setup.py and the
3434
# project code, see
3535
# https://packaging.python.org/en/latest/single_source_version.html
36-
version='0.2.0', # Required
36+
version='0.2.1', # Required
3737

3838
# This is a one-line description or tagline of what your project does. This
3939
# corresponds to the "Summary" metadata field:

0 commit comments

Comments
 (0)