Upgrade yt-dlp to version 2022.11.11
[sunny256-utils.git] / n95film
blob37081022015c52ac9ba5e42a557db43ef464e8ef
1 #!/usr/bin/env bash
3 #=======================================================================
4 # n95film
5 # File ID: a24f4cb6-f743-11dd-b795-000475e441b9
6 # Standardgenerering av filmer til Nokiaen.
7 # License: GNU General Public License version 2 or later.
8 #=======================================================================
10 [ "$1" = "-h" -o "$1" = "--help" ] && { echo; echo "n95film: No help available, but here's the source code:"; echo; cat $0; exit; }
11 [ -d mp4/. ] || mkdir mp4 || { echo mp4: Cannot create directory; exit 1; }
12 export ENC=$HOME/bin/enc-mp4
13 # FIXME: Dirty, men det funker foreløpig.
14 export encver=`svn --xml info $ENC | xf | grep '<commit revision' | perl -pe 's/^.*"(\d+)".*$/$1/'`
15 for f in "$@"; do
16 export uuid=$(suuid --raw -t n95film -w eo -c "<c_n95film> <madeby> <progname>enc-mp4</progname> <revision>$encver</revision> </madeby> <file> <name>$f</name> <smsum>$(smsum -vv "$f" | cut -f 1)</smsum> </file> </c_n95film>")
17 if [ -z "$uuid" ]; then
18 echo n95film: suuid error >&2
19 exit 1
21 ~/bin/enc-mp4 -vv -o "mp4/$f.mp4" -c $uuid "$f";
22 done