A small Python module for NoelShack API.
This module can be used as a library from any other Python script, or as a command-line tool.
To install this script as a command-line tool, do the following, assuming
you got a personal bin
directory:
cp pynoelshack.py ~/bin/pynoelshack
chmod +x ~/bin/pynoelshack
from pynoelshack import NoelShack, NoelShackError
ns = NoelShack()
try:
print(ns.upload('foo.png'))
except NoelShackError as e:
print(str(e))
python pynoelshack.py foo.png
Or, assuming you installed it in your PATH
as pynoelshack
:
pynoelshack foo.png
Feel free to alias it at your convenience.