XEP-0363 CLI upload tool
-
Checkout uploadr
git clone https://github.com/sezuan/uploadr.git
-
Install Python dependencies (all Python versions)
cd uploadr/ virtualenv python . python/bin/activate pip install requests dnspython pyasn1 pyasn1_modules
-
Install Python dependencies (Python < 2.7.9, to avoid SSL errors))
pip install pyopenssl ndg-httpsclient
-
Install SleekXMPP with XEP-0363 plugin
git clone https://github.com/sezuan/SleekXMPP.git -b xep_0363 pushd SleekXMPP pip install . popd
$ ./uploadr.py -h
usage: uploadr.py [-h] [-j JID] [-p PASSWORD] [-s] filename
positional arguments:
filename File to upload
optional arguments:
-h, --help show this help message and exit
-j JID, --jid JID JID
-p PASSWORD, --password PASSWORD
Password
-s, --short Use https://yerl.org to shorten URL
-n NOTIFY, --notify NOTIFY
Send a notification.
You can put your credentials into ~/.uploadrc
cat > ~/.uploadrc << EOF
[email protected]
89Y7UyQyKUDDU
EOF
chmod 400 ~/.uploadrc
$ ./upload.py --notify [email protected] burglar_cam_0001.jpg