Created
November 27, 2014 08:30
-
-
Save icedwater/cb3e550a398810b5ca76 to your computer and use it in GitHub Desktop.
.lessfilter to handle mp4 and json files - depends on aeson-pretty and mplayer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
case "$1" in | |
*.extension) | |
extension-handler "$1" | |
;; | |
*.json) | |
cat "$1" | aeson-pretty | |
;; | |
*.mp4) | |
mplayer "$1" -ss 9000 2>/dev/null | grep \: | |
;; | |
*) | |
# We don't handle this format. | |
exit 1 | |
esac | |
# No further processing by lesspipe necessary | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment