for groping text files and images. two main scripts are grab
and
pasta
.
copy the scripts inside scripts
somewhere in your $PATH
.
copy the contents of config
into your $XDG_CONFIG_HOME
, this should
give you the file $XDG_CONFIG_HOME/grabbing/config
. without it
properly configured, you will not be able to use these scripts.
by default, $XDG_CONFIG_HOME
points to $HOME/.config
. so you
should copy the config to $HOME/.config/grabbing/config
.
an example is already provided inside config/grabbing/config
.
UPLOADSCRIPT
specifies whether to useimgur
orscpur
to upload screenshots ingrab
FORMAT
specifies whether to use timestamp or sha1 for uploaded filenameIMGURKEY
your imgur api keySCPOPTS
options to pass toscp
SSHSTR
user@serverSSHDIR
directory on remote server to put your fileWEBURL
web accessible url for that fileEXTENSIONS
list of file extensions to put in their own directories, where those directories are, and their urls
this script relies on the presence of scrot
to take a screen shot.
simply just call the script grab
-- it behaves the same as scrot -s
.
inside the config file, you can specify whether to use imgur or a remote webserver accessible by ssh to store your screenshots. it takes the image created and uploads it with the specified script and puts the resulting url into your clipboard.
usage: grab
this script can't use imgur so you must set up scpur
to use this. it
relies on xclip
to take the contents of selected text, then puts it
into a text file which gets uploaded to your webserver. it puts the
resulting url into your clipboard.
usage: pasta
you need to get your own imgur api key or else the script won't work. see the config file for information to obtain a key.
usage: imgur <filename or url>
the goal of this script is to take any file and scp
it to a webserver
or something, giving it a unique filename. this script should then give
you a url for the file uploaded.
has an optional argument to specify file suffix on remote server.
usage: scpur <filename> [suffix]
this script guesses an appropriate suffix for a given file.
it achieves this by using file -i $FILE
and searches
/etc/mime.types
to find a suffix.
scpur
relies on this script to give it a suffix on the remote machine.
usage: mtsuf <filename>