adding mpl and dlvid.lisp
This commit is contained in:
		
							parent
							
								
									afb8376f80
								
							
						
					
					
						commit
						0657befac8
					
				
					 2 changed files with 36 additions and 0 deletions
				
			
		
							
								
								
									
										18
									
								
								scripts/dlvid.lisp
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										18
									
								
								scripts/dlvid.lisp
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,18 @@
 | 
			
		|||
#!/usr/bin/env -S sbcl --script
 | 
			
		||||
(require "uiop")
 | 
			
		||||
(load "/home/chris/.sbclrc")
 | 
			
		||||
(ql:quickload :serapeum)
 | 
			
		||||
 | 
			
		||||
(defvar *url* (car (uiop:command-line-arguments)))
 | 
			
		||||
 | 
			
		||||
(defun main ()
 | 
			
		||||
  (when (serapeum:string-contains-p "piped.cochrun.xyz" *url*)
 | 
			
		||||
    (run-program "yt-dlp"
 | 
			
		||||
                 `("-o"
 | 
			
		||||
                   "~/vids/%(title)s.%(ext)s"
 | 
			
		||||
                   ,(serapeum:string-replace-all
 | 
			
		||||
                     "piped.cochrun.xyz" *url* "youtube.com"))
 | 
			
		||||
                  :search "/run/current-system/sw/bin/"
 | 
			
		||||
                  :output t)))
 | 
			
		||||
 | 
			
		||||
 (main)
 | 
			
		||||
							
								
								
									
										18
									
								
								scripts/mpl
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										18
									
								
								scripts/mpl
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,18 @@
 | 
			
		|||
#!/usr/bin/env -S sbcl --script
 | 
			
		||||
(require "uiop")
 | 
			
		||||
(load "/home/chris/.sbclrc")
 | 
			
		||||
(ql:quickload :serapeum)
 | 
			
		||||
 | 
			
		||||
(defvar *url* (car (uiop:command-line-arguments)))
 | 
			
		||||
 | 
			
		||||
(defun main ()
 | 
			
		||||
  (when (serapeum:string-contains-p "inv.cochrun.xyz" *url*)
 | 
			
		||||
    (run-program "mpv"
 | 
			
		||||
                 `("--ontop"
 | 
			
		||||
                   "--keepaspect-window"
 | 
			
		||||
                   ,(serapeum:string-replace-all
 | 
			
		||||
                     "inv.cochrun.xyz" *url* "youtube.com"))
 | 
			
		||||
                 :search "/run/current-system/sw/bin/"
 | 
			
		||||
                 :output t)))
 | 
			
		||||
 | 
			
		||||
 (main)
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue