-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor fontawesome handling #19
Comments
#!/bin/bash
# WF 2024-08-12
# aided by ChatGPT
# Directory containing SVG files
SVG_DIR="/var/www/fontawesome/svgs/solid"
# MediaWiki page output file
OUTPUT_FILE=/tmp/"icons.wiki"
# Initialize a counter
counter=0
# remove file if it exists
rm $OUTPUT_FILE
# Loop through all SVG files in the directory
for f in "$SVG_DIR"/*.svg
do
# Get the basename of the file (without the path and extension)
basename=$(basename "$f" .svg)
# Append the MediaWiki markup to the output file using cat << EOF
echo "{{Icon|name=$basename|style=regular|size=48|storemode=subobject}}" >> "$OUTPUT_FILE"
# Increment the counter
((counter++))
# Add a newline after every 25 icons
if (( counter % 25 == 0 )); then
echo "" >> "$OUTPUT_FILE"
fi
done
echo "Icon MediaWiki markup now at $OUTPUT_FILE"
head $OUTPUT_FILE |
/var/www/fontawesome/svg# ln -s house.svg home.svg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The Icons are outdated and that leads to e.g. https://contexts.bitplan.com/index.php/Template:Icon not displaying correctly
The text was updated successfully, but these errors were encountered: