diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-09-04 21:03:48 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-09-04 21:03:48 +1200 |
commit | e18fbe575ab877a18f050a40231178c201965c02 (patch) | |
tree | 5ff7b55a368766f0aa9a7e5ae961135d471d7587 /bin/xgo | |
parent | Add bl(1df) (diff) | |
download | dotfiles-e18fbe575ab877a18f050a40231178c201965c02.tar.gz dotfiles-e18fbe575ab877a18f050a40231178c201965c02.zip |
Add Pastebin ripper to xgo(1)
Diffstat (limited to 'bin/xgo')
-rwxr-xr-x | bin/xgo | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -17,6 +17,11 @@ for url ; do ( url=$(printf '%s\n' "$url" | sed 's_/blob/_/raw/_') ;; + # Dig out the plain text for pastebin.com links + *://pastebin.com/*) + url=$(printf '%s\n' "$url" | sed 's_/[A-Za-z0-9][A-Za-z0-9]*$_/raw&_') + ;; + # If it's a not-direct imgur link and not to an album, swap URL # elements to get to the actual file (it may not actually be a JPEG; # the MIME type will tell us) |