From b63943cc27cb06342d08879b57c08902e0850581 Mon Sep 17 00:00:00 2001 From: Lizzy Fleckenstein Date: Tue, 31 Mar 2026 02:37:31 +0200 Subject: add makefile and readme --- .gitignore | 1 + Makefile | 25 +++++++++++++++++++++++++ README.md | 40 ++++++++++++++++++++++++++++++++++++++++ thoughts/colors.txt | 4 ++++ 4 files changed, 70 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 README.md create mode 100644 thoughts/colors.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..89f9ac04 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +out/ diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..c3ce4464 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +USERS != ls plain | xargs basename -s .png + +all: cube thoughts petpet + +out/cube/%cube.gif: plain/%.png mkcube tools/Vulkan-Tools/ Makefile | out/cube/ + ./mkcube $< $@ + +out/petpet/pet_%.gif: plain/%.png tools/petpet/ Makefile | out/petpet/ + ./tools/petpet/init.js $< $@ + +out/thoughts/%thoughts.png: plain/%.png mkthoughts thoughts/ Makefile | out/thoughts/ + ./mkthoughts $< $@ $$(grep "^$$(basename -s .png $<) " thoughts/colors.txt | cut -d' ' -f 2) + +out/%/: + mkdir -p $@ + +cube: $(patsubst %, out/cube/%cube.gif, $(USERS)) +petpet: $(patsubst %, out/petpet/pet_%.gif, $(USERS)) +thoughts: $(patsubst %, out/thoughts/%thoughts.png, $(USERS)) + +clean: + rm -rf out + +.PHONY: all cube thoughts petpet +.NOTPARALLEL: cube diff --git a/README.md b/README.md new file mode 100644 index 00000000..69df07b5 --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# usermoji + +fun tools to create emojis based on pfps. + +base pfps are stored as pngs in [](plain/). + +## thoughts + +`make thoughts` or `./mkthoughs infile.png outfile.png [bgcolor]` + +requires imagemagick. + +when using make: + +- output is stored in [](out/thoughts/). +- file [](thoughts/colors.txt) can be used to specify a background color for each user (default white). + +## petpet + +`make petpet` or `./tools/petpet/init.js infile.png outfile.gif` + +petpet generator was ported to nodejs, based on [](https://benisland.neocities.org/petpet/) which is browser-only. i can't be assed to rewrite this to a more sane language. + +make sure to install deps for petpet generator: `cd tools/petpet && npm install`. + +when using make, output is stored in [](out/petpet/). + +## cube + +`make cube` or `./mkcube infile.png outfile.gif` + +by far the most cursed one, using vkcube to render. + +only works on sway. requires wf-recorder, jq, ffmpeg and imagemagick. + +make sure to build vulkan tools: `cmake -S tools/Vulkan-Tools -B tools/Vulkan-Tools/build && make -C tools/Vulkan-Tools/build vkcube`. + +make sure to add sway config rule: `for_window [title="^vkcube$"] floating enable`. + +when using make, output is stored in [](out/cube/). diff --git a/thoughts/colors.txt b/thoughts/colors.txt new file mode 100644 index 00000000..03a08fff --- /dev/null +++ b/thoughts/colors.txt @@ -0,0 +1,4 @@ +ada #848484 +vern #282C34 +kimapr #613563 +lilith #000000 -- cgit v1.2.3