| 
									
										
										
										
											2013-01-10 14:57:25 +04:00
										 |  |  | #!/bin/bash | 
					
						
							|  |  |  | # | 
					
						
							| 
									
										
										
										
											2014-04-30 11:06:35 +02:00
										 |  |  | # Returns the lyrics of the current track playing in Spotify. | 
					
						
							| 
									
										
										
										
											2013-01-10 14:57:25 +04:00
										 |  |  | # | 
					
						
							|  |  |  | # A fine piece of work by @febuiles | 
					
						
							|  |  |  | #   https://gist.github.com/1549979 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-04-30 11:06:35 +02:00
										 |  |  | artist=`osascript -e'tell application "Spotify"' -e'get artist of current track' -e'end tell'` | 
					
						
							|  |  |  | title=`osascript -e'tell application "Spotify"' -e'get name of current track' -e'end tell'` | 
					
						
							| 
									
										
										
										
											2013-01-10 14:57:25 +04:00
										 |  |  | 
 | 
					
						
							|  |  |  | song=`curl -G --data-urlencode "artist=$artist" \ | 
					
						
							|  |  |  |  	--data-urlencode "title=$title" -s http://makeitpersonal.co/lyrics` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-04-30 11:06:35 +02:00
										 |  |  | echo -e "$artist - $title\n$song" |