Guest User

Untitled

a guest
Nov 23rd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # HandbrakeCLIStatusUpdater.sh
  4. #
  5. #
  6. # Created by Andreas Heiberg on 6/1/11.
  7. # Copyright 2011 Andreas Heiberg. All rights reserved.
  8.  
  9. #Change this to path of your .log file
  10. LOG="/Users/Andreas/Library/Logs/HandbrakeCLI.log"
  11.  
  12. #Change this to path of your Alfred settings folder
  13. SETTINGSFOLDER="/Users/Andreas/Desktop/Alfred/"
  14.  
  15. #Change this to the keyword you have given to the script in Alfred
  16. NAME="transcode"
  17.  
  18. #while true
  19. #do
  20.  
  21. #Gets the last/most resent line from the log
  22. TAIL=$(tail -1 "$LOG")
  23. #Romoves all parentheses from the string for syntax reasons
  24. TAIL2=${TAIL//[()]/}
  25.  
  26. #Writes the latest log line to the main scripts plist file, so alfred will now show progress
  27. defaults write "$SETTINGSFOLDER"extensions/scripts/"$NAME"/info subtitle "$TAIL2"
  28.  
  29. #done
Add Comment
Please, Sign In to add comment