diff --git a/articles/xm-tracks/page.mmd b/articles/xm-tracks/page.mmd index 6c296ad..ce2227d 100644 --- a/articles/xm-tracks/page.mmd +++ b/articles/xm-tracks/page.mmd @@ -9,5 +9,3 @@ It's achieved with help of [jsxm](https://github.com/a1k0n/jsxm). It lacks support for some things though, might need to contribute to it. Could be neat to make some small program that would generate waveforms pngs next. - -Sadly .xm file format is not allowed on Neocities, so, it would not work for you most likely :p diff --git a/cook_tracks.sh b/cook_tracks.sh new file mode 100755 index 0000000..cb60463 --- /dev/null +++ b/cook_tracks.sh @@ -0,0 +1,9 @@ +#!/usr/bin/bash + +set +e +shopt -s extglob + +for f in $1/!(*AutoSave*).xm +do + gzip -c $f | base64 --wrap=0 - | tr -d '\n' > $2/$(basename -- $f).txt +done diff --git a/tools/track_listing_generator.py b/tools/track_listing_generator.py index 4f086fb..f5ea1ca 100755 --- a/tools/track_listing_generator.py +++ b/tools/track_listing_generator.py @@ -17,26 +17,43 @@ page = """ @@ -64,10 +81,11 @@ page = """ for _, _, files in walk(argv[1]): files.sort() for f in files: - if not f.endswith('.xm'): + # note: Base64 gzip encoded data is expected. + if not f.endswith('.xm.txt'): continue page += ( - f"""
{f}
{f[:-4]}