aboutsummaryrefslogtreecommitdiff
path: root/sort.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sort.sh')
-rwxr-xr-xsort.sh59
1 files changed, 0 insertions, 59 deletions
diff --git a/sort.sh b/sort.sh
deleted file mode 100755
index 10d64a1..0000000
--- a/sort.sh
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/bash
-
-# hitler.rip
-# temporary script that implements sorting articles by date
-# © 2025 hitler.rip <git@hitler.rip>
-# licensed under AGPLv3-or-later; see licenses/code.md for more information
-
-declare -A articlearr
-declare -a workingarr
-declare -A thebestarr
-
-cd ./src/articles/
-
-echo "[test] SECTION - DETERMINE DATE"
-
-for i in *.md; do
-
- echo "[test] reading: $i"
-
- filename=$( echo "$i" | rev | cut -c4- | rev )
-
- if [ "$filename" != "index" ]; then
-
- export WEBMETA_DATE=""
-
- if [ -e "$filename.meta" ]; then
- echo "[test] running script: $filename.meta"
- source ./"$filename".meta
- fi
-
- if [ "$WEBMETA_DATE" == "" ]; then
- export WEBMETA_DATE="2001-09-11*"
- fi
-
- articlearr["$filename"]="$WEBMETA_DATE"
-
- fi
-
-done
-
-echo "[test] SECTION - SORT"
-
-workingarr=($( sort -nr < <(printf '%s\n' "${articlearr[@]}") ))
-
-for date in "${workingarr[@]}"; do
-
- for key in "${!articlearr[@]}"; do
- if [ "${articlearr[$key]}" == "$date" ]; then
- echo "$date matches $key"
- thebestarr["$date"]="$key"
- fi
- done
-
-done
-
-echo "[test] SECTION - GENERATE"
-
-# ...
-