vp

git clone git://oldgit.suckless.org/vp/
Log | Files | Refs | README

vp (875B)


      1 #!/usr/bin/env rc
      2 . vp-patterns
      3 . vp-base $0 $*
      4 
      5 vp_subscript = 1
      6 getflags 'b,e,f,F format,o output-file' $args
      7 ifs=, { vp_format = `{echo -n $flagF} }
      8 
      9 vp_prebuffer = $flagb
     10 vp_result = $argv(1)
     11 vp_default vp_result `{vp_paste}
     12 vp_orig = $vp_result
     13 
     14 if(vp_script = `{vp_findscript $vp_result})
     15 	. $vp_script $vp_result
     16 
     17 if(! ~ $flage '') {
     18 	if (! ~ $vp_rtmpresult '')
     19 		vp_rtmpurl $vp_rtmpresult
     20 	if not
     21 		echo $vp_result
     22 	exit
     23 }
     24 
     25 if(~ $flagf '')
     26 	vp_play $vp_result
     27 if not {
     28 	if(~ $flago '')
     29 		flago = `{vp_autoname $vp_orig $vp_result}
     30 	if(! ~ $vp_rtmpresult '') {
     31 		getflags 's ,r url,t ,y path' $vp_rtmpresult
     32 		if (~ $flago '')
     33 			ifs=$vp_newline { flago = `{basename $flagy} ^ .flv }
     34 		$vp_rtmpget_loud -o$flago $vp_rtmpresult
     35 	}
     36 	if not {
     37 		if(~ $flago '') $vp_hget_loud $vp_hget_autoname $vp_result
     38 		if not          $vp_hget_loud >$flago           $vp_result
     39 	}
     40 }
     41