diff options
| author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2024-02-28 16:53:28 +0100 |
|---|---|---|
| committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2024-02-28 16:53:28 +0100 |
| commit | eb2d282a86f9a1895e091176f0c1fcf4df893fb0 (patch) | |
| tree | 13c8b176eaf9591b53e8fc7d369b835215b239d7 /Makefile | |
| parent | c0d782cc42d7b734a08307ac695de4f91bbd1bab (diff) | |
| download | haunt-blog-eb2d282a86f9a1895e091176f0c1fcf4df893fb0.tar.gz haunt-blog-eb2d282a86f9a1895e091176f0c1fcf4df893fb0.tar.bz2 haunt-blog-eb2d282a86f9a1895e091176f0c1fcf4df893fb0.zip | |
Move articles in wordpress/articles.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -35,10 +35,13 @@ PAGES = \ all: help -wordpress: +wordpress/articles: mkdir -p $@ -wordpress/replicant_blog_page_%.html: wordpress +wordpress/pages: + mkdir -p $@ + +wordpress/pages/replicant_blog_page_%.html: wordpress $(CURL) $(BLOG_URL)/$(subst replicant_blog_page_,,$*)/ -o $@ links.txt: $(PAGES) @@ -49,21 +52,23 @@ links.txt: $(PAGES) python3 get_links.py $$f >> $@ ; \ done -html: # do not depend on links.txt as a human is supposed to review it manually +# do not depend on links.txt as a human is supposed to review it manually +html: wordpress/articles mkdir -p $@ && \ for url in `cat links.txt` ; do \ - if [ ! -f html/`echo "$${url}" | \ + if [ ! -f wordpress/articles/`echo "$${url}" | \ sed 's#https://blog.replicant.us/##' | \ sed 's#/$$##'| \ sed 's#/#_#g'`.html ] ; then \ curl "$${url}" -o \ - html/`echo "$${url}" | \ + wordpress/articles/`echo "$${url}" | \ sed 's#https://blog.replicant.us/##' | \ sed 's#/$$##'| \ sed 's#/#_#g'`.html ; \ fi \ done - # TODO: erase html directory if that fails for some reason. + # TODO: erase wordpress/articles directory if that fails for + # some reason. markdown: html mkdir -p $@ && \ @@ -72,7 +77,7 @@ markdown: html sed 's#https://blog.replicant.us/##' | \ sed 's#/$$##' ; \ $(CONVERT) \ - html/`echo "$${url}" | \ + wordpress/articles/`echo "$${url}" | \ sed 's#https://blog.replicant.us/##' | \ sed 's#/$$##'| \ sed 's#/#_#g'`.html \ |
