Advertisement
cirrus

albumart

Nov 30th, 2024
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.10 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. # deps: sacad feh fancy_audio [rubygem]
  3. # opt deps: optipng jpegoptim
  4. clipb=$(xclip -selection clipboard -o | cut -d\& -f1)
  5. #prev=$(~/scripts/mclip.py menu | head -n 1 | cut -c4-)
  6. tput setaf 5
  7. read -p "enter name of artist album art: " artist
  8. tput setaf 1
  9. read -p "enter name of the album requiring art: " album
  10. tput setaf 6
  11. ~/venv/bin/sacad -v normal "${artist}" "${album}" 150  ~/"${album}.jpg"
  12. tput setaf 3
  13. read -p  "View Downloaded Album Art $fehview? [y/n]  " answer
  14. if [[ $answer = y ]] ; then
  15. tput setaf 4
  16. tput bold
  17. tput smso
  18. printf ': hit q or enter to continue ➤ '
  19. tput rmso
  20. tput sgr0
  21. echo ''
  22. fehview=$(feh -g 150x150+1280+260  -A 'pkill feh' ~/"${album}.jpg" )
  23. fi
  24. tput setaf 2
  25. read -p "enter path of .mp3 file to embed art: " embed
  26. fancy_audio  "${embed}"  ~/"${album}.jpg"
  27. tput setaf 3
  28. echo -n " sorted brudda ! "${album}.jpg" now embedded into "${embed}" "
  29. echo ''
  30. tput setaf 6
  31. read -p "Delete Downloaded Album Art $artdel? [y/n] " answer
  32. if [[ $answer = y ]] ; then
  33. artdel=$(rm ~/"${album}.jpg" )
  34. tput setaf 4
  35. echo  "Mission Accomplished !! "
  36. tput sgr0
  37. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement