Skip to content
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.

Script doesn't work with default config file #91

Closed
a-mstv opened this issue Aug 9, 2016 · 3 comments
Closed

Script doesn't work with default config file #91

a-mstv opened this issue Aug 9, 2016 · 3 comments
Labels

Comments

@a-mstv
Copy link

a-mstv commented Aug 9, 2016

Settings.conf:

imgur_anon_id="ea6c0ef2987808e"
imgur_icon_path="${HOME}/Pictures/imgur.png"

imgur_acct_key=""
imgur_secret=""
login="false"
album_title=""
album_id=""
credentials_file="${HOME}/.config/imgur-screenshot/credentials.conf"

file_name_format="imgur-%Y_%m_%d-%H_%M_%S.png" # when using scrot, must end with .png!
file_dir="${HOME}/Pictures"

upload_connect_timeout="5"
upload_timeout="120"
upload_retries="1"

screenshot_select_command="scrot -s %img"
screenshot_window_command="scrot %img"
screenshot_full_command="scrot %img"
open_command="xdg-open %url"
open="true"

mode="select"
edit_command="gimp %img"
edit="false"
exit_on_album_creation_fail="true"

log_file="${HOME}/.imgur-screenshot.log"

auto_delete=""
copy_url="true"
keep_file="true"
check_update="true"

imgur-screenshot.sh --debug output:

Darwin m738.local 15.6.0 Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64
'/usr/local/bin/imgur-screenshot.sh' '--debug' 

+ current_version=v1.7.4
+ imgur_anon_id=ea6c0ef2987808e
+ imgur_icon_path=/Users/123/Pictures/imgur.png
+ imgur_acct_key=
+ imgur_secret=
+ login=false
+ album_title=
+ album_id=
+ credentials_file=/Users/123/.config/imgur-screenshot/credentials.conf
+ file_name_format=imgur-%Y_%m_%d-%H:%M:%S.png
+ file_dir=/Users/123/Pictures
+ upload_connect_timeout=5
+ upload_timeout=120
+ upload_retries=1
+ is_mac
+ uname
+ grep -q Darwin
+ screenshot_select_command='screencapture -i %img'
+ screenshot_window_command='screencapture -iWa %img'
+ screenshot_full_command='screencapture %img'
+ open_command='open %url'
+ open=true
+ mode=select
+ edit_command='gimp %img'
+ edit=false
+ exit_on_album_creation_fail=true
+ log_file=/Users/123/.imgur-screenshot.log
+ auto_delete=
+ copy_url=true
+ keep_file=true
+ check_update=true
+ settings_path=/Users/123/.config/imgur-screenshot/settings.conf
+ '[' -f /Users/123/.config/imgur-screenshot/settings.conf ']'
+ source /Users/123/.config/imgur-screenshot/settings.conf
++ imgur_anon_id=ea6c0ef2987808e
++ imgur_icon_path=/Users/123/Pictures/imgur.png
++ imgur_acct_key=
++ imgur_secret=
++ login=false
++ album_title=
++ album_id=
++ credentials_file=/Users/123/.config/imgur-screenshot/credentials.conf
++ file_name_format=imgur-%Y_%m_%d-%H:%M:%S.png
++ file_dir=/Users/123/Pictures
++ upload_connect_timeout=5
++ upload_timeout=120
++ upload_retries=1
++ screenshot_select_command='scrot -s %img'
++ screenshot_window_command='scrot %img'
++ screenshot_full_command='scrot %img'
++ open_command='xdg-open %url'
++ open=true
++ mode=select
++ edit_command='gimp %img'
++ edit=false
++ exit_on_album_creation_fail=true
++ log_file=/Users/123/.imgur-screenshot.log
++ auto_delete=
++ copy_url=true
++ keep_file=true
++ check_update=true
+ '[' '' = --check ']'
+ '[' 0 '!=' 0 ']'
+ '[' false = true ']'
+ '[' -n '' ']'
+ '[' -z '' ']'
+ upload_files[0]=
+ for upload_file in '"${upload_files[@]}"'
+ '[' -z '' ']'
+ cd /Users/123/Pictures
++ date +imgur-%Y_%m_%d-%H:%M:%S.png
+ img_file=imgur-2016_08_09-14:59:33.png
+ take_screenshot imgur-2016_08_09-14:59:33.png
+ echo 'Please select area'
Please select area
+ is_mac
+ uname
+ grep -q Darwin
+ cmd=screenshot_select_command
+ cmd='scrot -s imgur-2016_08_09-14:59:33.png'
++ scrot -s imgur-2016_08_09-14:59:33.png
+ shot_err=
+ '[' 127 '!=' 0 ']'
+ echo 'Failed to take screenshot '\''imgur-2016_08_09-14:59:33.png'\'': '\'''\''. For more information visit https://github.com/jomo/imgur-screenshot/wiki/Troubleshooting'
+ tee -a /Users/123/.imgur-screenshot.log
Failed to take screenshot 'imgur-2016_08_09-14:59:33.png': ''. For more information visit https://github.com/jomo/imgur-screenshot/wiki/Troubleshooting
+ notify error 'Something went wrong :(' 'Information has been logged'
+ is_mac
+ uname
+ grep -q Darwin
+ which growlnotify
+ terminal-notifier -appIcon /Users/123/Pictures/imgur.png -contentImage /Users/123/Pictures/imgur.png -title 'imgur: Something went wrong :(' -message 'Information has been logged'
+ exit 1
@jomo
Copy link
Owner

jomo commented Aug 9, 2016

terminal-notifier: command not found

You don't have all dependencies installed. See imgur-screenshot.sh --check

@jomo jomo closed this as completed Aug 9, 2016
@jomo jomo added the invalid label Aug 9, 2016
@a-mstv
Copy link
Author

a-mstv commented Aug 9, 2016

Just brew-installed it, same error. Updated the log.

@a-mstv
Copy link
Author

a-mstv commented Aug 9, 2016

Figured it out. Using scrot threw and error. Had to use screencapture since I'm on OS X.

What I did after was remove all options from the config file except those I explicitly needed changed. Works like a charm now. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants