2020-07-12 22:35:49 -04:00
|
|
|
PAGES_IN = $(wildcard pages/*)
|
|
|
|
POSTS_IN = $(wildcard posts/*.md)
|
|
|
|
MUSIC_IN = $(wildcard music/*.mp3)
|
|
|
|
|
|
|
|
PAGES_OUT = $(addprefix dist/,$(notdir $(PAGES_IN:.md=.html)))
|
|
|
|
POSTS_OUT = $(addprefix dist/blog/,$(notdir $(POSTS_IN:.md=.html)))
|
|
|
|
MUSIC_OUT = $(addprefix dist/music/,$(notdir $(MUSIC_IN)))
|
|
|
|
|
|
|
|
POST_LISTS = dist/blog/index.html dist/blog/feed.xml
|
|
|
|
MUSIC_LISTS = dist/music/index.html dist/music/feed.xml
|
|
|
|
|
|
|
|
all: $(PAGES_OUT) $(POSTS_OUT) $(MUSIC_OUT) $(POST_LISTS) $(MUSIC_LISTS)
|
|
|
|
cp -urv static/. dist
|
|
|
|
|
2020-08-13 20:52:03 -04:00
|
|
|
dist/index.html: pages/index.md dist music.json $(POSTS_OUT)
|
|
|
|
scripts/template_md.py $< $@
|
|
|
|
|
2020-07-12 22:35:49 -04:00
|
|
|
dist/%.html: pages/%.md | dist
|
|
|
|
scripts/template_md.py $< $@
|
|
|
|
|
|
|
|
dist/%.html: pages/%.html | dist
|
|
|
|
cp $< $@
|
|
|
|
|
2020-07-24 00:53:59 -04:00
|
|
|
dist/blog/%.html: posts/%.md dist/blog temp/openring.html
|
2020-07-12 22:35:49 -04:00
|
|
|
scripts/template_md.py $< $@
|
|
|
|
|
|
|
|
dist/music/%.mp3: music/%.mp3 | dist/music
|
|
|
|
cp $< $@
|
|
|
|
|
|
|
|
$(POST_LISTS): $(POSTS_OUT)
|
|
|
|
scripts/gen_blog.py posts $@
|
|
|
|
|
|
|
|
$(MUSIC_LISTS): music.json | $(OUTPUT_MUSIC)
|
|
|
|
scripts/gen_music.py $< $@
|
|
|
|
|
2020-07-24 00:53:59 -04:00
|
|
|
temp/openring.html: temp templates/openring.html scripts/openring/openring
|
|
|
|
scripts/openring/openring -l 256\
|
|
|
|
-s http://jakob.space/feed.xml \
|
|
|
|
-s https://drewdevault.com/feed.xml \
|
2020-07-24 13:16:16 -04:00
|
|
|
-s https://alwayslivid.com/feed/blog.xml\
|
2020-08-27 23:53:53 -04:00
|
|
|
-s http://mjsstuf.x10host.com/wp49/feed/ \
|
2020-08-30 01:05:44 -04:00
|
|
|
-s https://cadence.moe/blog/rss.xml?limit=4 \
|
2021-03-29 19:05:18 -04:00
|
|
|
-s https://blag.nicolor.tech/feed/feed.xml \
|
2021-05-03 00:10:26 -04:00
|
|
|
-s https://jazz.cro.wtf/rss.xml \
|
2020-07-24 00:53:59 -04:00
|
|
|
< templates/openring.html \
|
|
|
|
> temp/openring.html
|
|
|
|
|
|
|
|
scripts/openring/openring:
|
|
|
|
cd scripts/openring && go build
|
|
|
|
|
2020-07-12 22:35:49 -04:00
|
|
|
dist/blog:
|
|
|
|
mkdir -p dist/blog
|
|
|
|
|
|
|
|
dist/music:
|
|
|
|
mkdir -p dist/music
|
|
|
|
|
|
|
|
dist:
|
|
|
|
mkdir dist
|
|
|
|
|
2020-07-24 00:53:59 -04:00
|
|
|
temp:
|
|
|
|
mkdir temp
|
|
|
|
|
2020-07-13 03:49:21 -04:00
|
|
|
.PHONY: clean upload
|
2020-07-12 22:35:49 -04:00
|
|
|
|
|
|
|
upload: dist
|
|
|
|
lftp -c "set ftp:list-options -a;\
|
|
|
|
open '$(shell cat ftp_url.txt)';\
|
|
|
|
lcd dist;\
|
|
|
|
cd public_html;\
|
|
|
|
mirror --reverse"
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf dist
|