Save List To File - Random Line Count?

mason

Client
Регистрация
30.04.2017
Сообщения
46
Благодарностей
3
Баллы
8
I'm using a loop in a template to scrape data and put to list.

I want to save random line count to file. Line 1- 8,9,10 to a text file. (the first 8 lines, next loop the first 9 lines, then 10 lines, back to 8 lines)

I crashed the template a couple of times so I figured I'd ask?
Tried 1-{8|9|10}

Any ideas?
 

mason

Client
Регистрация
30.04.2017
Сообщения
46
Благодарностей
3
Баллы
8
I found a workaround by using a counter and delete lines {-Variable.counter-}-100
 

LightWood

Moderator
Регистрация
04.11.2010
Сообщения
2 382
Благодарностей
915
Баллы
113
I found a workaround by using a counter and delete lines {-Variable.counter-}-100
A lot of solutions.
Should to do a spintax operation {8|9|10} in special action for it.
Also u can generate random number in ur range and use this result.

Good if ur solution work for u. Thanks for sharing with other users.
 

V Munich

Пользователь
Регистрация
20.02.2014
Сообщения
85
Благодарностей
3
Баллы
8
I'm using a loop in a template to scrape data and put to list.

I want to save random line count to file. Line 1- 8,9,10 to a text file. (the first 8 lines, next loop the first 9 lines, then 10 lines, back to 8 lines)

I crashed the template a couple of times so I figured I'd ask?
Tried 1-{8|9|10}

Any ideas?
Besides the solution LightWood said, another way would be saving items to the list in a normal order, then just shuffle the list with List Processing.
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)