From fdf16740af88ffa1d820dd86565e945eeb551072 Mon Sep 17 00:00:00 2001 From: pdp8 Date: Sun, 18 Aug 2024 16:10:01 +0200 Subject: pictures synced to social outbox, albums removed --- Makefile | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index bb2e7d3..2840741 100644 --- a/Makefile +++ b/Makefile @@ -11,15 +11,15 @@ MP3 := $(subst flac,mp3, $(FLAC)) IMG_DIR := $(MEDIA_DIR)/pictures WEBP_DIR := $(IMG_DIR)/webp JPEG_DIR := $(IMG_DIR)/jpeg -THUMB_DIR := $(IMG_DIR)/thumb +# THUMB_DIR := $(IMG_DIR)/thumb TXT_DIR := $(IMG_DIR)/txt JPEG_IMG := $(wildcard $(JPEG_DIR)/*.jpeg) WEBP_IMG := $(subst jpeg,webp, $(JPEG_IMG)) -THUMB_IMG := $(addprefix $(THUMB_DIR)/, $(notdir $(WEBP_IMG))) +# THUMB_IMG := $(addprefix $(THUMB_DIR)/, $(notdir $(WEBP_IMG))) TXT_IMG := $(subst jpeg,txt, $(JPEG_IMG)) -IMG_ALBUMS := $(wildcard $(IMG_DIR)/albums/*) +# IMG_ALBUMS := $(wildcard $(IMG_DIR)/albums/*) VIDEO_DIR := /srv/media/videos VIDEO_WEBM := $(wildcard $(VIDEO_DIR)/*/*.webm) @@ -32,6 +32,9 @@ CLIMBING_WEBM := $(wildcard $(CLIMBING_DIR)/*/*.webm) CLIMBING_MP4 := $(subst webm,mp4, $(CLIMBING_WEBM)) CLIMBING_WEBP := $(subst webm,webp, $(CLIMBING_WEBM)) +OUTBOX_DIR:= /srv/social/outbox +SOCIAL_CREATE := $(subst :,\:,$(wildcard $(OUTBOX_DIR)/create/*.json)) # escape colons + HTML := index.html music.html pictures.html videos.html climbing.html about.html code.html contact.html OTHER := pdp8.png 540px-PDP-8_.jpg style.css sitemap.txt rss.xml @@ -44,18 +47,21 @@ all: test test: $(TEST_HTML) $(TEST_OTHER) -pictures: $(WEBP_IMG) $(THUMB_IMG) +pictures: $(WEBP_IMG) #$(THUMB_IMG) $(TEST_DIR)/rss.xml: $(TEST_HTML) ./rss.rb -$(TEST_DIR)/index.html: $(TEST_DIR)/music.html - cp $< $@ +$(TEST_DIR)/index.html: $(TEST_DIR)/pictures.html $(TEST_DIR)/music.html + cp `ls -t $^ | head -n1` $@ $(TEST_DIR)/music.html: $(MP3) ./music.rb -$(TEST_DIR)/pictures.html: $(IMG_ALBUMS) $(WEBP_IMG) $(THUMB_IMG) +# $(test_dir)/pictures.html: $(img_albums) $(webp_img) $(thumb_img) +# ./pictures.rb + +$(TEST_DIR)/pictures.html: $(SOCIAL_CREATE) ./pictures.rb $(TEST_DIR)/videos.html: $(VIDEO_MP4) $(VIDEO_WEBP) @@ -85,8 +91,8 @@ $(TEST_DIR)/%.txt: ./html/%.txt $(WEBP_DIR)/%.webp: $(JPEG_DIR)/%.jpeg magick $< -resize 1536x1024 -quality 85 $@ -$(THUMB_DIR)/%.webp: $(JPEG_DIR)/%.jpeg - magick $< -resize 150x100 -quality 85 $@ +# $(THUMB_DIR)/%.webp: $(JPEG_DIR)/%.jpeg +# magick $< -resize 150x100 -quality 85 $@ %.webp: %.webm ffmpeg -i $< -loglevel error -vf thumbnail -frames:v 1 -c:v png -f image2pipe - | magick - $@ -- cgit v1.2.3