aboutsummaryrefslogtreecommitdiff
path: root/games/kvlt
blob: 170f41b41e33e331d9d12b69735cab69c62e35e1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sed -f
# Type like a young black metal enthusiast

# Lowercase to capitals
y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/

# Pad the start and end of the line temporarily to work around GNU sed(1) not
# respecting POSIX word boundaries, leaving us with no compatible options
s/^/~/
s/$/~/

# -C[EI] -> -Z[EI] (naïve attempt at finding soft Cs)
s,\([A-Z]\)C\([EI][^A-Z]\),\1Z\2,g

# -C[^H] -> -K[^H] (so "change" doesn't become "KHANGE")
s/C\([^H]\)/K\1/

# -I- -> -Y-
s,\([A-Z]\)I,\1Y,g

# THE -> DER
s,\([^A-Z]\)THE\([^A-Z]\),\1DER\2,g

# OF -> 0V
s,\([^A-Z]\)OF\([^A-Z]\),\10V\2,g

# AND -> VND
s,\([^A-Z]\)AND\([^A-Z]\),\1VND\2,g

# TRUE -> TRV
s,\([^A-Z]\)TRUE\([^A-Z]\),\1TRV\2,g

# Remove the padding established above
s/^~//
s/~$//

# O->0, S->Z, U->V
y/OSU/0ZV/