Project

uplr

0.0
No commit activity in last 3 years
No release in over 3 years
Uploads the specified file to the given server. Progress is shown via system notifications (disable with --no-progress). The final notification is clickable and opens the share URL in a web browser. The share URL is automatically copied to the system clipboard (disable with --no-clipboard).
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.0
 Project Readme

Uplr — Quickly Upload & Share Files

Uploads Files via SSH to your own server and copies the resulting URL to clipboard for easy sharing.

demo

Requirements

Setup

gem install uplr --pre

Help

uplr --help

NAME
  uplr -- Upload Files via SCP

SYNOPSIS
  uplr [options] file

DESCRIPTION
  Uploads the specified file to the given server.
  Progress is shown via system notifications (disable with --no-progress).
  The final notification is clickable and opens the share URL in a web
  browser. The share URL is automatically copied to the system clipboard
  (disable with --no-clipboard).

OPTIONS
    -f, --[no-]file                  File to upload (or pass as last argument)
    -h, --host example.com           Connection: host
    -u, --user john                  Connection: user
    -p /srv/www/example.com/public_html/u/,
        --path                       Connection: path
    -b http://www.example.com/u/,    Upload URL directory
        --base-url
    -r, --[no-]progress              Show upload progress notifications
    -o, --[no-]progressbar           Show upload progress bar when using command line
    -c, --[no-]clipboard             Copy final URL to clipboard
        --help                       Show this message
    -v, --version                    Print version

Example

uplr --host example.com \
    --user john \
    --path /srv/www/example.com/public_html/u/ \
    --base-url http://www.example.com/u/ \
    /path/to/file.png

Recommendation

To maximize joy, pair with Hazel.

hazel-workflow

  1. Create "Uploads" folder
  2. Drag "Uploads" folder into Dock
  3. Create new rule in Hazel for "Uploads" folder, choose "Run Shell Script", "embedded script", "/bin/bash" and paste/adjust the following:
uplr "$1"

Note that depending on your ruby setup it might be necessary to provide the full path to the binary, for example ~/.rbenv/shims/uplr for rbenv.

Now you just have to drag&drop a file to the dock folder and seconds later there is a shareable link in your clipboard. Awesome!