Move scripts dir inside hm
And remove weird path contraptions
This commit is contained in:
parent
050901da2f
commit
edeef96133
49 changed files with 2 additions and 11 deletions
23
hm/scripts/lestrte
Executable file
23
hm/scripts/lestrte
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i python3 --pure
|
||||
#! nix-shell -p python3
|
||||
|
||||
import random
|
||||
import sys
|
||||
|
||||
for line in sys.stdin:
|
||||
nl = ""
|
||||
word = ""
|
||||
for c in line:
|
||||
if c.isalpha():
|
||||
word += c
|
||||
else:
|
||||
if len(word) > 2:
|
||||
wrd = list(word)[1:]
|
||||
random.shuffle(wrd)
|
||||
nl += word[0] + "".join(wrd)
|
||||
else:
|
||||
nl += word
|
||||
word = ""
|
||||
nl += c
|
||||
print(nl, end="")
|
Loading…
Add table
Add a link
Reference in a new issue