2
0

make-video-page.sh 441 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. VIDEO_BASENAME="$1"
  3. PLAYLIST_NAME="$2"
  4. VIDEO="$VIDEO_BASENAME.mp4"
  5. THUMBNAIL="$VIDEO_BASENAME.jpg"
  6. HLS="$VIDEO_BASENAME.hls"
  7. read -r -d '' PAGE_MD << EOM
  8. {:title "Video $VIDEO_BASENAME"
  9. :layout :video
  10. :tags ["video" "playlist-$PLAYLIST_NAME"]
  11. :video-thumbnail-url "/media/videos/$PLAYLIST_NAME/$THUMBNAIL"
  12. :video-url "/media/videos/$PLAYLIST_NAME/$HLS/out.m3u8"
  13. :video-description "$VIDEO_BASENAME"
  14. }
  15. EOM
  16. echo $PAGE_MD