Skip to content

Commit

Permalink
Script fixes
Browse files Browse the repository at this point in the history
- Ugh, CRLF creeped into my export scripts and made them bad.
- count_emoji.sh script is no longer needed as Orxporter can count the emoji now.
  • Loading branch information
dzuk-mutant committed Jun 12, 2023
1 parent e1651d9 commit 0c02750
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
2 changes: 0 additions & 2 deletions count_emoji.sh

This file was deleted.

2 changes: 1 addition & 1 deletion out_all_slice.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cd "$(dirname "$0")"
./orxporter/orxport.py -m manifest/out.orx -i ../input -q 32x32 -o out/all_slice -r resvg -f %f/%s -t 8 -F svg,png-32,pngc-32,jxl-32,webp-32 -e cat=food_drink_herbs
./orxporter/orxport.py -m manifest/out.orx -i ../input -q 32x32 -o out/all_slice -r resvg -f %f/%s -t 8 -F svg,png-128,pngc-128,jxl-128,webp-128 -e cat=food_drink_herbs
28 changes: 17 additions & 11 deletions out_final_slice.sh
Original file line number Diff line number Diff line change
@@ -1,37 +1,43 @@
#!/bin/bash
#!/usr/bin/env python3

cd "$(dirname "$0")"

version=2022.12
render_threads=12
base_dir="out/test-pkg"

mkdir -p $base_dir &&


# get orxporter to do its thing
echo "creating images..."
mkdir -p $base_dir &&



./orxporter/orxport.py -m manifest/out.orx -i ../input -C cache -q 32x32 -r resvg -o $base_dir/short-%f -f %d/%s -t ${render_threads} -F pngc-32 &&
./orxporter/orxport.py -m manifest/out.orx -j $base_dir/mtnt_${version}_data.json &&


# packages!
# ----------------------------------------------------------------------
echo "compiling package folders..."


./orxporter/orxport.py -m manifest/out.orx -j out/test-pkg/mtnt_${version}_data.json

make_pkg () {
echo "compiling package: ${1}"
echo "compiling zip package: ${1}"

pkg="mtnt_${version}_${2}"
out_folder="${base_dir}/${pkg}"

# copy texts into the out folder
# move emoji into the out folder/emoji
cp -R texts $out_folder &&
mv -v "${base_dir}/${1}" "$out_folder/emoji"

mv "${base_dir}/${1}" "$out_folder/emoji"

# go into the destination folder, put the contents
# into a zip of the same name, go back and delete
# the remaining empty folder
cd "${out_folder}"
zip -r -q -m "../${pkg}.zip" "."
cd -
cd - > /dev/null # shhh dont tell anyone it's our secret
rm -d "${out_folder}"
}

make_pkg short-pngc-32 short_png32
Expand Down

0 comments on commit 0c02750

Please sign in to comment.