Fix script

This commit is contained in:
askiiart 2023-11-21 12:10:02 -06:00
parent 958818cbb2
commit 7f1eff0666
Signed by untrusted user who does not match committer: askiiart
GPG key ID: BC3800E55FB54D67
4 changed files with 38 additions and 18 deletions

View file

@ -2,15 +2,10 @@
set -e
dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
pandoc -f markdown-smart --data-dir . --template ${dir}/template.html -t html -o $dir/tmp.html $dir/index.md --metadata title="$(grep -m 1 -oP '(?<=^# ).*' $dir/index.md | cat)"
sed -i "s/sourceCode /language-/g" $dir/tmp.html
while true; do
#pandoc -f markdown-smart --data-dir . --template ${dir}/template.html -t html -o $dir/tmp.html $dir/index.md --metadata title="$(grep -m 1 -oP '(?<=^# ).*' $dir/index.md | cat)"
#chmod 777 $dir/../output
#sed -i "s/output here/$(sed 's/\//\\\//g' $dir/../output)/g" $dir/tmp.html
#sed "s/sourceCode /language-/g" $dir/tmp.html > $dir/index.html
#rm -f $dir/tmp.html
#sleep 1
# Can just run these 3 lines if index.html already exists
chmod 777 $dir/../output
sed -i "s/output here/$(sed 's/\//\\\//g' $dir/../output)/g" $dir/index.html
sed "s/output here/$(sed 's/\//\\\//g' $dir/../output)/g" $dir/tmp.html >$dir/index.html
sleep 1
done

View file

@ -24,15 +24,6 @@ h3 {
line-height: 1.2
}
code {
background: #121212
}
pre {
background: #121212
}
wrap {
word-wrap: break-word
}

View file

@ -1 +1 @@
body{color:#dadada;background:#202020;margin:1em auto;max-width:1000px;padding:0 .62em;font:1.0/1.35 sans-serif;text-align:center}a:link,a:visited{color:#80c47b}a:hover,a:visited:hover{color:#6bb794}h1,h2,h3{line-height:1.2}code{background:#121212}pre{background:#121212}wrap{word-wrap:break-word}@media(max-device-width:1200px){h1{line-height:1.2;font-size:40px}h2{line-height:1.2;font-size:30px}body{font-size:20px}pre,code{font-size:16px}}@media print{body{max-width:none}}footer{text-align:center}
body{color:#dadada;background:#202020;margin:1em auto;max-width:1000px;padding:0 .62em;font:1.0/1.35 sans-serif;text-align:center}a:link,a:visited{color:#80c47b}a:hover,a:visited:hover{color:#6bb794}h1,h2,h3{line-height:1.2}wrap{word-wrap:break-word}@media(max-device-width:1200px){h1{line-height:1.2;font-size:40px}h2{line-height:1.2;font-size:30px}body{font-size:20px}pre,code{font-size:16px}}@media print{body{max-width:none}}footer{text-align:center}

34
site-files/tmp.html Normal file
View file

@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta content="width=device-width, initial-scale=1" charset="utf-8" />
<link rel="icon" href="feed-the-void.png" type="image/icon">
<meta http-equiv="refresh" content="5" />
<title>F E E D T H E V O I D</title>
<link href="prism.min.css" rel="stylesheet" />
<link href="style.min.css" rel="stylesheet" />
</head>
<body class="line-numbers">
<h1 id="f-e-e-d-t-h-e-v-o-i-d">F E E D T H E V O I
D</h1>
<!-- Note that there's a zero-width space between the spaces so that all 3 render -->
<div class="sourceCode" id="cb1"><pre
class="language-sh"><code class="language-bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">dd</span> if=/dev/zero of=/dev/null status=progress</span></code></pre></div>
<div class="sourceCode" id="cb2"><pre
class="language-txt"><code class="language-default"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>output here</span></code></pre></div>
<figure>
<img src="feed-the-void.png"
alt="Useful Linux Tips: Run dd if=/dev/zero of=/dev/null to feed nothing to the void" />
<figcaption aria-hidden="true">Useful Linux Tips: Run dd
if=/dev/zero of=/dev/null to feed nothing to the
void</figcaption>
</figure>
<p style="font-size: 36px; text-align: center;">
<b>Witness the void consume zeroes for all eternity</b>
</p>
<script src="prism.js"></script>
</body>
<footer>
<p><a href="https://git.askiiart.net/askiiart/feed-the-void">code</a> | <b>this page refreshes every 5 seconds</b></p>
</footer>
</html>