Save List To File - Random Line Count?

  • Автор темы Автор темы mason
  • Дата начала Дата начала
  • Теги Теги
    lists

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?
 
I found a workaround by using a counter and delete lines {-Variable.counter-}-100
 
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.
 
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.
 

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