ref: fb35068222c5b2d1c363fa73396685fa99a79455
parent: d969ec6e7b25aa3e4aad0004e9f537bacb50eed1
author: mkf <mkf@cloud9p.org>
date: Fri Feb 9 04:19:08 EST 2024
getaudio: import
--- /dev/null
+++ b/getaudio
@@ -1,0 +1,13 @@
+#!/bin/rc
+# to download songs and store their metadata
+
+if(! ~ $#* 1){
+ echo 'usage: wm/getaudio url' >[1=2]
+ exit usage
+}
+
+url = $1
+file = `{basename $1}
+plist = ./plist
+
+hget -o $file $url && {echo $url >> $plist && audio/mkplist $file >> $plist}
--- a/mkfile
+++ b/mkfile
@@ -5,7 +5,8 @@
RC=\
newuser\
- pasted
+ pasted\
+ getaudio
</sys/src/cmd/mkmany