From 94c3af873cf2aa46e2cb018412b8ce1e1609d30c Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Wed, 28 Aug 2019 00:00:52 +0530 Subject: Implement mediainfo as a plugin --- plugins/README.md | 1 + plugins/mediainf | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100755 plugins/mediainf (limited to 'plugins') diff --git a/plugins/README.md b/plugins/README.md index 3e66adf..7a10a1c 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -14,6 +14,7 @@ The currently available plugins are listed below. | imgur | bash | - | Upload an image to imgur (from [imgur-screenshot](https://github.com/jomo/imgur-screenshot)) | | ipinfo | sh | curl, whois | Fetch external IP address and whois information | | kdeconnect | sh | kdeconnect-cli | Send selected files to an Android device | +| mediainf | sh | mediainfo | Show media information | | moclyrics | sh | [ddgr](https://github.com/jarun/ddgr), [moc](http://moc.daper.net/) | Show lyrics of the track playing in moc | | mocplay | sh | [moc](http://moc.daper.net/) | Appends (and plays, see script) selection/dir/file in moc| | ndiff | sh | vimdiff | Diff for selection (limited to 2 for directories) | diff --git a/plugins/mediainf b/plugins/mediainf new file mode 100755 index 0000000..f76b56b --- /dev/null +++ b/plugins/mediainf @@ -0,0 +1,13 @@ +#!/usr/bin/env sh + +# Description: Show media information of a file in pager +# +# Requires: mediainfo +# +# Shell: POSIX compliant +# Author: Arun Prakash Jana + +if ! [ -z "$1" ] && [ -f "$1" ]; then + mediainfo "$1" | $PAGER + # exiftool "$1" | $PAGER +fi -- cgit v1.2.3-70-g09d2