SFTP-based image dropper for Mac OS X with archiving functionality

Wazakindjes 9f9922c7c5 Fixed plist and urllib compatibility, also use h0mebrew python3 imo tbh 7 months ago
icinz ed7a394aca Added WorkingIcon (yell0), implemented EXIF stripping and rotation of muh pics, cleaned up plist and added envvar bs (PYTHONPATH etc) =]] 5 years ago
.editorconfig ab3f61313d Added editorc0nfig =] 1 year ago
.gitignore 9cc519cd78 Cleaned up gitignore a bit =] 6 years ago
LICENSE 2d64d0e9cc Repo creation lol 6 years ago
README.md e4f169e4de Let's just use /usr/local cuz that seems to be more common, also increment version number maybebaybe xdxd 1 year ago
com.jemoeder.lief.hurr.droppert.plist 9f9922c7c5 Fixed plist and urllib compatibility, also use h0mebrew python3 imo tbh 7 months ago
hurr.conf.example af9fadd06b Added exifgps conf var to example c0nf and updated exifrotate description y0 5 years ago
hurr.py 9f9922c7c5 Fixed plist and urllib compatibility, also use h0mebrew python3 imo tbh 7 months ago
load ef105be38f Added load/reload/unload skrips 6 years ago
reload ef105be38f Added load/reload/unload skrips 6 years ago
unload ef105be38f Added load/reload/unload skrips 6 years ago

README.md

The fuck is this

This shit is a premium self-hosted image uploader thingy based on SFTP, written for Mac OS X. It may or may not work with other OSes (cuz I've never tested it l m a o), provided Growl is available. I don't like the OS X Notification Center bullshit, so Growl all the way yo. It relies on the built-in OS X Cmd+Shift+3/4 key combo for scrots as that dumps them on your Desktop right away. You could probably use different software for scr0tting and run this skrip to upload that shit to your own server. Your own server must be *NIX as it runs a few specific commands that e.g. Windongs won't have.

It connects to yo server over SSH and dumps the scrot, then copies a URL to ur clipb0ardins. =] You can monitor up to 3 directories (fully configurable), which you could use for the default scrot location (normally ~/Desktop), some remote/networked dir and Dropbox/Camera Uploads or some shit. It werks by checking file differences in those dirs and uploads everything that matches the regex in the config.

Furthermore, it supports archiving your pics so the main directory doesn't get cluttered af as well as strippin' of EXIF tags (and rotating pics w/ EXIF orientation tags y0). ;]

Dependencies

This shit requires Python 3 and expect it to be at /usr/local/bin/python3. I think if you install Pyth0n through Xcode then it might use /usr/bin instead. So in that case just symlink that shit: ln -s /usr/bin/python3 /usr/local/bin/python3. brew users shud b gucci already. =]]

Be sure to also install the following libs:

  • configparser -- shud b clear
  • gntp -- Growl Notification Transport Protocol shit
  • paramiko -- SSH/SFTP bs
  • piexif -- Required for modifying EXIF sections
  • PIL/Pillow -- Python Image Library to rotate images ;]
  • pyperclip -- Clipboard hecks lol

There are other libs but they should be built-in. You'll receive an error message about a missing library anyways. =]

Also, it requires the following:

  • A *NIX server with a web service (like Apache, nginx, etc)
  • A domain to go with it, 2 subdomains are best obv (one for "live" pics and another for archived ones)
  • Key-based SSH authentication cuz fuck passwerds

Installation

Copy hurr.conf.example to hurr.conf and fire up een editor. All the options are explained in there so git to reading fam.

After that change the contents of the com.jemoeder.lief.hurr.droppert.plist file, namely the line that says <string>/Users/[user]/[dir]/hurr.py</string>. Then just copy it to ~/Library/LaunchAgents and run ./load. This makes sure it gets restarted after you reboot or log out and in again. Also it has a keepalive flag so if it died it'll be restarted. ;3

Depending on your setup, you may also need the EnvironmentVariables key in the plist file (in my case launchctl wouldn't import PIL lmao). Just remove the <!-- --> shit and ur gucci mane. Don't forget to ./reload if you already l0aded em before doing dis.

Hurrrr pls halp it's br0ke

Simply ./unload that shit and do ./hurr.py in a terminal, Pythinz will most likely shit out some errors that will give you an idea of wats goin on. =]

Alternatively, uncomment the StandardOutPath/StandardErrorPath directives in the plist file and reload that shit. Then check the lawg files obv. ;]