You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.3 KiB

# vars
feed_title := "dozens weed"
feed_desc := "my special little weed in my special little garden"
feed_href := ""
outfile := "feed.xml"
# show all available commands
just --list
# update content submodule
git submodule foreach git pull
# build feed.xml
build: fetch
echo "Building xml file!!"
echo "<?xml version=\"1.0\" ?>" > {{outfile}}
echo "<rss version=\"2.0\" xmlns:atom=\"\">" >> {{outfile}}
echo " <channel>" >> {{outfile}}
echo " <atom:link href=\"{{feed_href}}\" rel=\"self\" type=\"application/rss+xml\" />" >> {{outfile}}
echo " <title>{{feed_title}}</title>" >> {{outfile}}
echo " <link>{{feed_href}}</link>" >> {{outfile}}
echo " <description>{{feed_desc}}</description>" >> {{outfile}}
fd . 'src/' -e md -x pandoc -f markdown+autolink_bare_uris --template=feed.tmpl >> {{outfile}}
echo " </channel>" >> {{outfile}}
echo "</rss> " >> {{outfile}}
echo "Done building xml file \o/"
# upload feed.xml
@echo "Uploading to server!!"
@rsync -azP feed.xml tilde:public_html/rsspect/
@echo "Done uploading to server \o/"
# build and upload
all: build up
@echo "Roger dodger, it's all done: you have tended your garden 🌱"