Script changes!
This commit is contained in:
parent
45e32adc61
commit
6b13214c4d
9 changed files with 69 additions and 7 deletions
28
config/scripts/lestrte
Executable file
28
config/scripts/lestrte
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
import random
|
||||
|
||||
# maj = True
|
||||
|
||||
for line in sys.stdin:
|
||||
nl = ""
|
||||
word = ""
|
||||
grace = True
|
||||
for c in line:
|
||||
if c.isalpha():
|
||||
if grace:
|
||||
nl += word
|
||||
nl += c
|
||||
word = ""
|
||||
grace = False
|
||||
else:
|
||||
word += c
|
||||
else:
|
||||
wrd = list(word)
|
||||
random.shuffle(wrd)
|
||||
nl += ''.join(wrd)
|
||||
nl += c
|
||||
word = ""
|
||||
grace = True
|
||||
print(nl, end="")
|
Loading…
Add table
Add a link
Reference in a new issue