-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
71 lines (71 loc) · 2.42 KB
/
action.yml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: 'quoth_the_vikings'
description: 'Fetches a random line in a random language from one of the Icelandic Sagas'
author: 'Sturla Bragason'
outputs:
quote:
description: "Viking quote"
value: ${{ steps.quoth_the_vikings.outputs.quote }}
runs:
using: "composite"
steps:
- uses: actions/checkout@v2
with:
repository: 'sturlabragason/quoth_the_vikings'
- id: quoth_the_vikings
run: |
$Sentence = Get-ChildItem ./all_sagas_text | Get-Random | Get-Content | ? {$_.Length -gt 0} | ? {$_ -notlike "*Chapter*" -or $_ -notlike "*Kapitel*" -or $_ -notlike "*Kafli*" -or $_ -notlike "*Kapittel*" } | Get-Random
$Sentence = $Sentence.split(".")
$Sentence = $Sentence[0]
$SentenceTrimmed = $Sentence.trim()
$SentenceTrimmed = $SentenceTrimmed
$SentenceTrimmed = $SentenceTrimmed `
-replace "f","ᚠ" `
-replace "u","ᚢ" `
-replace "v","ᚢ" `
-replace "ú","ᚢ" `
-replace "þ","ᚦ" `
-replace "a","ᚨ" `
-replace "á","ᚨ" `
-replace "æ","ᚨᛖ" `
-replace "r","ᚱ" `
-replace "k","ᚲ" `
-replace "q","ᚲ" `
-replace "c","ᚲ" `
-replace "g","ᚷ" `
-replace "w","ᚹ" `
-replace "h","ᚺ" `
-replace "n","ᚾ" `
-replace "i","ᛁ" `
-replace "y","ᛁ" `
-replace "í","ᛁ" `
-replace "j","ᛃ" `
-replace "p","ᛈ" `
-replace "b","ᛈ" `
-replace "ï","ᛇ" `
-replace "z","ᛉ" `
-replace "s","ᛊ" `
-replace "t","ᛏ" `
-replace "t","ᛒ" `
-replace "e","ᛖ" `
-replace "ä","ᛖ" `
-replace "é","ᛖ" `
-replace "m","ᛗ" `
-replace "l","ᛚ" `
-replace "ŋ","ᛜ" `
-replace "�","ᛜ" `
-replace "d","ᛞ" `
-replace "ð","ᛞ" `
-replace "ó","ᛟ" `
-replace "ö","ᛟ" `
-replace "å","ᛟ" `
-replace "\?","" `
-replace "\`"","" `
-replace "\,","" `
-replace "»","" `
-replace "o","ᛟ"
Write-Host $SentenceTrimmed
echo "::set-output name=quote::'$SentenceTrimmed'"
shell: pwsh
branding:
icon: 'wind'
color: 'red'