#!/usr/bin/env python

import sys, os
sys.path.append(os.environ["HOME"] + "/dotfiles/bin")

import screentool

from gi.repository import Notify

Notify.init("Nautilus nvupload")

to_upload = os.environ["NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"]
url = screentool.upload_image(to_upload)
os.system("echo " + url + " | xclip -sel clipboard")
