diff --git a/screenfetch-dev b/screenfetch-dev index bd15ff4..f096d7f 100755 --- a/screenfetch-dev +++ b/screenfetch-dev @@ -56,7 +56,7 @@ denames=( gnome-session xfce-mcs-manage xfce4-session xfconfd ksmserver lxsessio screenshot= # This setting lets the script know if you want to upload the screenshot to a filehost. 1=Yes 0=No upload= -# This setting lest the script know where you would like to upload the file to. Valid hosts are: teknik, mediacrush, pomf, hmp, and a configurable local. +# This setting lest the script know where you would like to upload the file to. Valid hosts are: teknik, mediacrush, pomf, imgur, hmp, and a configurable local. uploadLoc= # You can specify a custom screenshot command here. Just uncomment and edit. Otherwise, we'll be using the default command: scrot -cd3. # screenCommand="scrot -cd5" @@ -233,7 +233,7 @@ displayHelp() { printf " ${bold}-s(u)${c0} Using this flag tells the script that you want it\n" printf " to take a screenshot. Use the -u flag if you would like\n" printf " to upload the screenshots to one of the pre-configured.\n" - printf " locations. These include: teknik, pomf, mediacrush, and hmp.\n" + printf " locations. These include: teknik, pomf, imgur, mediacrush, and hmp.\n" printf " ${bold}-c string${c0} You may change the outputted colors with -c. The format is\n" printf " as follows: [0-9][0-9],[0-9][0-9]. The first argument controls the\n" printf " ASCII logo colors and the label colors. The second argument\n" @@ -1842,6 +1842,14 @@ takeShot () { filehash=$(echo "${ret}" | grep "hash" | cut -d '"' -f4) desturl="${baseurl}/${filehash}" ;; + 'imgur') + baseurl='http://imgur.com' + uploadurl='http://imgur.com/upload' + ret=$(curl -sf -F file="@${shotfiles[@]}" ${uploadurl}) + filehash="${ret##*hash\":\"}" + filehash="${filehash%%\"*}" + desturl="${baseurl}/${filehash}" + ;; 'pomf') baseurl='http://a.pomf.se' uploadurl='http://pomf.se/upload.php' diff --git a/screenfetch.1 b/screenfetch.1 index 6f1db52..ee5d938 100644 --- a/screenfetch.1 +++ b/screenfetch.1 @@ -68,7 +68,7 @@ Truncate output based on terminal width (Experimental!). Using this flag tells the script that you want it to take a screenshot. Use the \fB\-u\fR flag if you would like to upload the screenshots to one of the pre-configured -locations. These include: teknik, pomf, mediacrush, and hmp. +locations. These include: teknik, pomf, imgur, mediacrush, and hmp. .TP .B \-c string You may change the outputted colors with \fB\-c\fR. The format is