diff --git a/.gitignore b/.gitignore index 2822863..36dfdc0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,10 @@ .direnv # The code workspace used for the dedicated branches for certain content. -./code-workspace/ +/code-workspace/ + +# The exported avatar images. +/static/icons/avatars/ # Certain files just need to be ignored. /layouts/partials/openring.html diff --git a/Rakefile b/Rakefile index 7150fca..0df14a9 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,6 @@ # frozen_string_literal: true +require 'fileutils' require 'json' require 'open3' require 'shellwords' @@ -26,7 +27,10 @@ desc 'Export the avatar images' task :export_avatars, [:base_dir, :output_dir, :output_extension] do |_, args| args.with_defaults(base_dir: './assets/svg/', output_dir: './static/icons/', output_extension: 'avif') Dir.glob('avatars/**/*.svg', base: args.base_dir) do |f| - output_file = "#{File.dirname(f)}/#{File.basename(f, '.svg')}.#{args.output_extension}" + dirname = File.dirname f + output_file = "#{dirname}/#{File.basename(f, '.svg')}.#{args.output_extension}" + + FileUtils.mkdir_p "#{args.output_dir}#{dirname}", verbose: true sh "magick #{args.base_dir}#{f} -quality 30 #{args.output_dir}#{output_file}" end end @@ -52,7 +56,7 @@ task :build_webring, [:limit, :input, :output, :file] do |_, args| end desc 'Create a web server' -task :serve do +task :serve => [:export_avatars] do sh 'nix develop -c hugo serve --buildFuture --verboseLog --destination public' end diff --git a/static/icons/avatars/ezran/angry.avif b/static/icons/avatars/ezran/angry.avif deleted file mode 100644 index 7509f13..0000000 Binary files a/static/icons/avatars/ezran/angry.avif and /dev/null differ diff --git a/static/icons/avatars/ezran/curious.avif b/static/icons/avatars/ezran/curious.avif deleted file mode 100644 index da47d4c..0000000 Binary files a/static/icons/avatars/ezran/curious.avif and /dev/null differ diff --git a/static/icons/avatars/ezran/default.avif b/static/icons/avatars/ezran/default.avif deleted file mode 100644 index 2497491..0000000 Binary files a/static/icons/avatars/ezran/default.avif and /dev/null differ diff --git a/static/icons/avatars/ezran/disappointed.avif b/static/icons/avatars/ezran/disappointed.avif deleted file mode 100644 index 0aacf04..0000000 Binary files a/static/icons/avatars/ezran/disappointed.avif and /dev/null differ diff --git a/static/icons/avatars/ezran/proud.avif b/static/icons/avatars/ezran/proud.avif deleted file mode 100644 index 5c28922..0000000 Binary files a/static/icons/avatars/ezran/proud.avif and /dev/null differ diff --git a/static/icons/avatars/ezran/skeptical.avif b/static/icons/avatars/ezran/skeptical.avif deleted file mode 100644 index fce8c27..0000000 Binary files a/static/icons/avatars/ezran/skeptical.avif and /dev/null differ diff --git a/static/icons/avatars/foodogsquared/curious.avif b/static/icons/avatars/foodogsquared/curious.avif deleted file mode 100644 index 24c1922..0000000 Binary files a/static/icons/avatars/foodogsquared/curious.avif and /dev/null differ diff --git a/static/icons/avatars/foodogsquared/default.avif b/static/icons/avatars/foodogsquared/default.avif deleted file mode 100644 index 4e3dd5f..0000000 Binary files a/static/icons/avatars/foodogsquared/default.avif and /dev/null differ diff --git a/static/icons/avatars/foodogsquared/despair.avif b/static/icons/avatars/foodogsquared/despair.avif deleted file mode 100644 index 3b8e374..0000000 Binary files a/static/icons/avatars/foodogsquared/despair.avif and /dev/null differ diff --git a/static/icons/avatars/foodogsquared/disappointed.avif b/static/icons/avatars/foodogsquared/disappointed.avif deleted file mode 100644 index 2ccdf80..0000000 Binary files a/static/icons/avatars/foodogsquared/disappointed.avif and /dev/null differ diff --git a/static/icons/avatars/foodogsquared/nervous.avif b/static/icons/avatars/foodogsquared/nervous.avif deleted file mode 100644 index 39165c3..0000000 Binary files a/static/icons/avatars/foodogsquared/nervous.avif and /dev/null differ