generated from osc/skins-template
This commit is contained in:
@@ -676,22 +676,15 @@ jobs:
|
||||
skin_header="$skin"
|
||||
|
||||
if [ -f "$ini_file" ]; then
|
||||
line=$(grep -a -i '^Name[[:space:]]*:' "$ini_file" | head -n1 || true)
|
||||
if [ -n "$line" ]; then
|
||||
val="${line#*:}"
|
||||
name_line=$(grep -a -i '^Name[[:space:]]*:' "$ini_file" | head -n1 || true)
|
||||
if [ -n "$name_line" ]; then
|
||||
val="${name_line#*:}"
|
||||
val="$(echo "$val" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')"
|
||||
if [ -n "$val" ]; then
|
||||
skin_header=$(sanitize_filename "$val")
|
||||
else
|
||||
skin_header=$(sanitize_filename "$skin")
|
||||
echo "⚠️ Warning: 'Name:' field empty in $skin. Falling back to folder name." >&2
|
||||
fi
|
||||
[ -n "$val" ] && skin_header=$(sanitize_filename "$val")
|
||||
else
|
||||
skin_header=$(sanitize_filename "$skin")
|
||||
echo "⚠️ Warning: No 'Name:' field found in $skin. Falling back to folder name." >&2
|
||||
fi
|
||||
else
|
||||
echo "⚠️ Warning: No skin.ini found for $skin. Skipping." >&2
|
||||
continue
|
||||
fi
|
||||
|
||||
@@ -704,6 +697,14 @@ jobs:
|
||||
desc=$(get_desc "$skin")
|
||||
[ -n "$desc" ] && { echo "$desc" >> "$README_PATH"; echo "" >> "$README_PATH"; }
|
||||
|
||||
if [ -f "$ini_file" ]; then
|
||||
author_line=$(grep -i '^[[:space:]]*Author:' "$ini_file" | head -n1 || true)
|
||||
if [ -n "$author_line" ]; then
|
||||
author=$(echo "$author_line" | cut -d ':' -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
|
||||
[ -n "$author" ] && { echo "**Author:** $author" >> "$README_PATH"; echo "" >> "$README_PATH"; }
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "[](/docs/${base_path}.md)" >> "$README_PATH"
|
||||
echo "" >> "$README_PATH"
|
||||
done < order.txt
|
||||
@@ -717,22 +718,15 @@ jobs:
|
||||
skin_header="$skin"
|
||||
|
||||
if [ -f "$ini_file" ]; then
|
||||
line=$(grep -a -i '^Name[[:space:]]*:' "$ini_file" | head -n1 || true)
|
||||
if [ -n "$line" ]; then
|
||||
val="${line#*:}"
|
||||
name_line=$(grep -a -i '^Name[[:space:]]*:' "$ini_file" | head -n1 || true)
|
||||
if [ -n "$name_line" ]; then
|
||||
val="${name_line#*:}"
|
||||
val="$(echo "$val" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')"
|
||||
if [ -n "$val" ]; then
|
||||
skin_header=$(sanitize_filename "$val")
|
||||
else
|
||||
skin_header=$(sanitize_filename "$skin")
|
||||
echo "⚠️ Warning: 'Name:' field empty in $skin. Falling back to folder name." >&2
|
||||
fi
|
||||
[ -n "$val" ] && skin_header=$(sanitize_filename "$val")
|
||||
else
|
||||
skin_header=$(sanitize_filename "$skin")
|
||||
echo "⚠️ Warning: No 'Name:' field found in $skin. Falling back to folder name." >&2
|
||||
fi
|
||||
else
|
||||
echo "⚠️ Warning: No skin.ini found for $skin. Skipping." >&2
|
||||
continue
|
||||
fi
|
||||
|
||||
@@ -741,6 +735,15 @@ jobs:
|
||||
|
||||
echo "## [$skin_header]($REGISTRY_URL/$USER_REPOSITORY/media/tag/$new_tag/export/${base_path}.osk)" >> "$README_PATH"
|
||||
echo "" >> "$README_PATH"
|
||||
|
||||
if [ -f "$ini_file" ]; then
|
||||
author_line=$(grep -i '^[[:space:]]*Author:' "$ini_file" | head -n1 || true)
|
||||
if [ -n "$author_line" ]; then
|
||||
author=$(echo "$author_line" | cut -d ':' -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
|
||||
[ -n "$author" ] && { echo "**Author:** $author" >> "$README_PATH"; echo "" >> "$README_PATH"; }
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "[](/docs/${base_path}.md)" >> "$README_PATH"
|
||||
echo "" >> "$README_PATH"
|
||||
done
|
||||
@@ -816,14 +819,30 @@ jobs:
|
||||
|
||||
video_url="$REGISTRY_URL/$USER_REPOSITORY/raw/tag/$new_tag/media/gameplay/${base_path}.mp4"
|
||||
|
||||
author=""
|
||||
if [ -f "$ini_file" ]; then
|
||||
author_line=$(grep -i '^[[:space:]]*Author:' "$ini_file" | head -n1 || true)
|
||||
if [ -n "$author_line" ]; then
|
||||
author=$(echo "$author_line" | cut -d ':' -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
|
||||
fi
|
||||
fi
|
||||
|
||||
{
|
||||
echo "# [$skin_header]($osk_url)"
|
||||
echo ""
|
||||
[ -n "$author" ] && echo "**Author:** $author"
|
||||
[ -n "$author" ] && echo ""
|
||||
|
||||
echo "## Hitsounds"
|
||||
echo "<video controls autoplay loop muted playsinline src=\"$video_url\" type=\"video/mp4\">"
|
||||
echo "</video>"
|
||||
echo ""
|
||||
|
||||
echo "## Ranking Panel"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
echo "## Mod Icons"
|
||||
echo ""
|
||||
} > "$md_file_path"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user