Skip to content

Commit

Permalink
Updates all articles and projects to include the logo!
Browse files Browse the repository at this point in the history
  • Loading branch information
gwynforthewyn committed Apr 20, 2024
1 parent c87923f commit 8590aa2
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 7 deletions.
15 changes: 15 additions & 0 deletions tools/editnav.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

for file in "$@"; do
if ! grep -q '<img src="/images/logo.png">' "$file"; then
tmp=$(mktemp)
# Ensure we handle the success of the pipeline correctly
if tr '\n' '\r' < "$file" | sed -E "s#(<nav class=\"navigation\">[^<]*<a href=\"\/\" class=\"link\">front page</a>)#\1\r <img src=\"/images/logo.png\">#" | tr '\r' '\n' > "$tmp"; then
# Only move the temporary file if the previous commands were successful
mv "$tmp" "$file"
else
echo "An error occurred processing $file. No changes made."
rm "$tmp" # Remove the temporary file if the operation failed
fi
fi
done
1 change: 1 addition & 0 deletions website/articles/fstest-mapfs-file-does-not-exist.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<body>
<nav class="navigation">
<a href="/" class="link">front page</a>
<img src="/images/logo.png">
<a href="/articles/index.html" class="link">articles</a>
<a href="/projects/index.html" class="link">projects</a>
</nav>
Expand Down
1 change: 1 addition & 0 deletions website/articles/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<body>
<nav class="navigation">
<a href="/" class="link">front page</a>
<img src="/images/logo.png">
<a href="/articles/index.html" class="link">articles</a>
<a href="/projects/index.html" class="link">projects</a>
</nav>
Expand Down
15 changes: 8 additions & 7 deletions website/articles/testing-panics-in-go.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<body>
<nav class="navigation">
<a href="/" class="link">front page</a>
<img src="/images/logo.png">
<a href="/articles/index.html" class="link">articles</a>
<a href="/projects/index.html" class="link">projects</a>
</nav>
Expand Down Expand Up @@ -52,19 +53,19 @@ <h1>Here's the setup code</h1>

goroutine 34 [running]:
testing.tRunner.func1.2({0x10441d540, 0x1044455e0})
/opt/homebrew/Cellar/go/1.22.2/libexec/src/testing/testing.go:1631 +0x1c4
/opt/homebrew/Cellar/go/1.22.2/libexec/src/testing/testing.go:1631 +0x1c4
testing.tRunner.func1()
/opt/homebrew/Cellar/go/1.22.2/libexec/src/testing/testing.go:1634 +0x33c
/opt/homebrew/Cellar/go/1.22.2/libexec/src/testing/testing.go:1634 +0x33c
panic({0x10441d540?, 0x1044455e0?})
/opt/homebrew/Cellar/go/1.22.2/libexec/src/runtime/panic.go:770 +0x124
/opt/homebrew/Cellar/go/1.22.2/libexec/src/runtime/panic.go:770 +0x124
panicker.Panics(...)
/Users/gwyn/Source/panicker/panicker_test.go:6
/Users/gwyn/Source/panicker/panicker_test.go:6
panicker.TestPanics(0x14000124680?)
/Users/gwyn/Source/panicker/panicker_test.go:17 +0x30
/Users/gwyn/Source/panicker/panicker_test.go:17 +0x30
testing.tRunner(0x14000124680, 0x104444dc0)
/opt/homebrew/Cellar/go/1.22.2/libexec/src/testing/testing.go:1689 +0xec
/opt/homebrew/Cellar/go/1.22.2/libexec/src/testing/testing.go:1689 +0xec
created by testing.(*T).Run in goroutine 1
/opt/homebrew/Cellar/go/1.22.2/libexec/src/testing/testing.go:1742 +0x318
/opt/homebrew/Cellar/go/1.22.2/libexec/src/testing/testing.go:1742 +0x318
FAIL panicker 0.082s
FAIL
</code>
Expand Down
1 change: 1 addition & 0 deletions website/articles/using-andrew-for-your-website.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<body>
<nav class="navigation">
<a href="/" class="link">front page</a>
<img src="/images/logo.png">
<a href="/articles/index.html" class="link">articles</a>
<a href="/projects/index.html" class="link">projects</a>
</nav>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<body>
<nav class="navigation">
<a href="/" class="link">front page</a>
<img src="/images/logo.png">
<a href="/articles/index.html" class="link">articles</a>
<a href="/projects/index.html" class="link">projects</a>
</nav>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<body>
<nav class="navigation">
<a href="/" class="link">front page</a>
<img src="/images/logo.png">
<a href="/articles/index.html" class="link">articles</a>
<a href="/projects/index.html" class="link">projects</a>
</nav>
Expand Down
1 change: 1 addition & 0 deletions website/projects/andrew/andrew-is-minimalistic.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<body>
<nav class="navigation">
<a href="/" class="link">front page</a>
<img src="/images/logo.png">
<a href="/articles/index.html" class="link">articles</a>
<a href="/projects/index.html" class="link">projects</a>
</nav>
Expand Down
1 change: 1 addition & 0 deletions website/projects/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

<nav class="navigation">
<a href="/" class="link">front page</a>
<img src="/images/logo.png">
<a href="/articles/index.html" class="link">articles</a>
<a href="/projects/index.html" class="link">projects</a>
</nav>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

<nav class="navigation">
<a href="/" class="link">front page</a>
<img src="/images/logo.png">
<a href="/articles/index.html" class="link">articles</a>
<a href="/projects/index.html" class="link">projects</a>
</nav>
Expand Down
1 change: 1 addition & 0 deletions website/projects/p4merge-wrapper/2024-01-24.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

<nav class="navigation">
<a href="/" class="link">front page</a>
<img src="/images/logo.png">
<a href="/articles/index.html" class="link">articles</a>
<a href="/projects/index.html" class="link">projects</a>
</nav>
Expand Down

0 comments on commit 8590aa2

Please sign in to comment.