From 598919856a977a4c426400199f8b3f7f559d32c4 Mon Sep 17 00:00:00 2001 From: "N0\\A" Date: Tue, 12 May 2026 19:54:52 +0200 Subject: [PATCH] first commit --- .../workflows/convert-markdown.yml.disabled | 14 +++ .gitignore | 2 + .../README.md | 0 README.md | 15 +++ convert-md.sh | 105 ++++++++++++++++++ 5 files changed, 136 insertions(+) create mode 100644 .gitea/workflows/convert-markdown.yml.disabled create mode 100644 .gitignore create mode 100644 My Mum Was An Alien She-Ra And Now I Am Too?! Will I be Able To Protect My Family End Everything Dear To Me Or Will I Fail And Let The Darkness Consume Everything/README.md create mode 100644 README.md create mode 100755 convert-md.sh diff --git a/.gitea/workflows/convert-markdown.yml.disabled b/.gitea/workflows/convert-markdown.yml.disabled new file mode 100644 index 0000000..55e8a65 --- /dev/null +++ b/.gitea/workflows/convert-markdown.yml.disabled @@ -0,0 +1,14 @@ +name: Convert Markdown to HTML + +on: [push] + +jobs: + convert: + runs-on: self-hosted + steps: + - name: Checkout + run: git clone . . + - name: Install Pandoc + run: sudo apt-get update && sudo apt-get install -y pandoc + - name: Run conversion script + run: bash convert-md.sh \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1ab1d61 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.html +*.html.raw diff --git a/My Mum Was An Alien She-Ra And Now I Am Too?! Will I be Able To Protect My Family End Everything Dear To Me Or Will I Fail And Let The Darkness Consume Everything/README.md b/My Mum Was An Alien She-Ra And Now I Am Too?! Will I be Able To Protect My Family End Everything Dear To Me Or Will I Fail And Let The Darkness Consume Everything/README.md new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md new file mode 100644 index 0000000..67ec0db --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# My Fanfiction + +Just go to directories and stuff + +Or AO3, yknow? + +[https://archiveofourown.org/users/N0VA_BOT](https://archiveofourown.org/users/N0VA_BOT) + +## Directories + +[My Mum Was An Alien She-Ra And Now I Am Too?! Will I be Able To Protect My Family End Everything Dear To Me Or Will I Fail And Let The Darkness Consume Everything](./My Mum Was An Alien She-Ra And Now I Am Too?! Will I be Able To Protect My Family End Everything Dear To Me Or Will I Fail And Let The Darkness Consume Everything) + +--- + +Also, this website simulates the experience of being shortsighted and sitting too far from your computer, you're welcome diff --git a/convert-md.sh b/convert-md.sh new file mode 100755 index 0000000..dff9fdd --- /dev/null +++ b/convert-md.sh @@ -0,0 +1,105 @@ +#!/bin/bash + +CSS=' +* { margin: 0; padding: 0; box-sizing: border-box; } +body { + min-height: 100vh; + background: #1a1a1a; + font-family: monospace; + color: #e0e0e0; + padding: 20px; + line-height: 1.6; + text-shadow: 0 0 5px rgba(224, 224, 224, 0.2); +} +h1, h2, h3, h4, h5, h6 { + color: #00A4DC; + margin: 20px 0 10px; + text-shadow: 0 0 8px rgba(0, 164, 220, 0.4); +} +h1 { font-size: 28px; border-bottom: 1px solid #333; padding-bottom: 10px; } +h2 { font-size: 22px; } +h3 { font-size: 18px; } +p { margin: 10px 0; } +a { + color: #888; + text-decoration: none; + transition: all 0.2s ease; +} +a:hover { + color: #e0e0e0; + text-shadow: 0 0 10px rgba(224, 224, 224, 0.5); +} +code { + background: #0a0a0a; + padding: 2px 6px; + border: 1px solid #333; + font-size: 13px; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); +} +pre { + background: #0a0a0a; + border: 1px solid #333; + padding: 15px; + overflow-x: auto; + margin: 15px 0; + box-shadow: 0 0 10px rgba(0, 164, 220, 0.1); +} +pre code { background: none; border: none; padding: 0; box-shadow: none; } +blockquote { border-left: 3px solid #333; padding-left: 15px; color: #888; margin: 15px 0; } +ul, ol { margin: 10px 0 10px 20px; } +li { margin: 5px 0; } +hr { border: none; border-top: 1px solid #333; margin: 20px 0; } +img { + max-width: 100%; + height: auto; + border: 1px solid #333; + margin: 10px 0; + box-shadow: 0 0 15px rgba(0, 0, 0, 0.5); +} +table { border-collapse: collapse; width: 100%; margin: 15px 0; } +th, td { border: 1px solid #333; padding: 8px 12px; text-align: left; } +th { background: #222; color: #00A4DC; } +tr:nth-child(even) { background: #111; } +' + +HTML_BEGIN=" + + + + + + + + +
" + +HTML_END=" + +" + +cd "$(dirname "$0")" + +find . -type f -name "*.md" -print0 | while IFS= read -r -d '' mdfile; do + dir=$(dirname "$mdfile") + base=$(basename "$mdfile" .md) + + if [[ "$base" == "README" ]]; then + out_base="index" + else + out_base="$base" + fi + + html_raw="$dir/$out_base.html.raw" + html_final="$dir/$out_base.html" + + pandoc "$mdfile" -t html -o "$html_raw" + + { + echo "$HTML_BEGIN" + sed -E 's/href="(\.\/[^.]+)"/href="\1\/"/g' "$html_raw" | \ + python3 -c "import sys, re; print(re.sub(r'href=\"([^\"]+)\"', lambda m: 'href=\"' + m.group(1).replace('?', '%3F').replace('!', '%21') + '\"', sys.stdin.read()), end='')" + echo "$HTML_END" + } > "$html_final" + + echo "Converted: $mdfile -> $html_final (+ .raw)" +done