~ecs/ecs.d2evs.net

da9b5b28311c8b31893063d2d594b9ad7e510a6e — Eyal Sawady 7 months ago 7792e5d
Drop fediverse account
2 files changed, 26 insertions(+), 1 deletions(-)

M index.gmi.w
A proxy/youtube.sh
M index.gmi.w => index.gmi.w +0 -1
@@ 4,7 4,6 @@ I do stuff, most of which does not involve writing blog posts.

=> https://hub.d2evs.net/~ecs sourcehut: ~ecs on d2evs.net
email: ecs@d2evs.net
=> https://social.d2evs.net fediverse: @ecs@social.d2evs.net
irc: ecs on most networks
=> /publickey.txt pgp: 9604D3459E53A9952


A proxy/youtube.sh => proxy/youtube.sh +26 -0
@@ 0,0 1,26 @@
#!/bin/sh -eu

# Paths:
# /video?$id: youtube-dl https://youtu.be/$id onto stdout
# /search?$search: perform a search, output format:
#   => $SCRIPT_NAME/video?$id [Date] Video Author - Video Title ([Length])
# /channel?$channel: list videos from $channel in chronological order, output format:
#   => $SCRIPT_NAME/video?$id [Date] Video Title ([Length])

# TODO: playlists?

case "$PATH_INFO" in
/video)
/search)
/channel)
	[ -z "$QUERY_STRING" ] && exec printf "10 Channel name\r\n"
	tmp="$(mktemp)"
	printf "20 text/gemini\r\n"
	youtube-dl -j "ytchannel:
	rm -f "$tmp"
	;;
*)
	printf "51 Not found\r\n"
	exit
	;;
esac