Tools used to make the micro fiction games jam website.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.1 KiB

function mfweb
argparse 's/submit' -- $argv
# Remove the index and submit pages as they will be replaced.
rm -f index.html
if ! test -e index.txt
echo -e "The index file for the website does not exist!"
echo -e "Build stopped!"
return
end
make_index
if ! test -z $_flag_s
make_submit submit.txt
else
make_submit no_submit.txt
end
# Make the 2020 entries
echo "Creating 2020 entries *************************************"
cd 2020
mfentries
cd ..
end
# Create the main index.html
#
function make_index
echo "Creating main site index.html"
touch index.html
mfheader index.html
while read -l line
echo $line >> index.html
end < index.txt
mffooter index.html
end
# Create the submit page
#
function make_submit -a file
echo "Creating the submit page"
cd submit/
touch index.html
mfheader index.html
while read -l line
echo $line >> index.html
end < $file
mffooter index.html
cd ..
end