diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-23 00:40:41 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-23 00:40:41 +1200 |
commit | 4af6360e47b5b65a708080b2cae0dac9336e9107 (patch) | |
tree | f89e6e5f2cd640e5e0840c621c54c9a37bc98035 /bin/xgo | |
parent | Make xgo(1) view plain text in view(1) instead (diff) | |
download | dotfiles-4af6360e47b5b65a708080b2cae0dac9336e9107.tar.gz dotfiles-4af6360e47b5b65a708080b2cae0dac9336e9107.zip |
Extract actual media from GitHub/Imgur links
Diffstat (limited to 'bin/xgo')
-rwxr-xr-x | bin/xgo | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -15,6 +15,12 @@ for url ; do ( *[/.]youtube.com/watch*) mpv -- "$url" && exit ;; + https://github.com/*/blob/*) + url=$(printf '%s\n' "$url" | sed 's_/blob/_/raw/_') + ;; + *://imgur.com/*) + url=$(printf '%s\n' "$url" | sed 's_imgur\.com_i.imgur.com_;s/$/.jpg/') + ;; esac # Get the MIME type data |