sky - a convenient uploading interface

sky is a wrapper around uploaders such as rsync, which uploads a file to a remote host with a web service, and gives you a URL that will allow other people to download it immediately.

Examples

Say you want to upload an Ogg Vorbis file to your web hosting, for other people to download, then you do:

shlomif@telaviv1:~$ sky up /home/music/Music/mp3s/Thierry\ de\ Massia/Elements\ essentiels/01\ -\ Le\ vent.ogg
X11 forwarding request failed on channel 0
sending incremental file list
01 - Le vent.ogg
     5271287 100%  147.24kB/s    0:00:34 (xfer#1, to-check=0/1)

sent 5272011 bytes  received 31 bytes  87141.19 bytes/sec
total size is 5271287  speedup is 1.00
Got URL:
http://www.shlomifish.org/Files/files/music/mp3-ogg/01%20-%20Le%20vent.ogg
shlomif@telaviv1:~$

(up is short for “upload”)

Then you can use the URL: http://www.shlomifish.org/Files/files/music/mp3-ogg/01%20-%20Le%20vent.ogg to download it.

The configuration file used for it (under ~/.config/Perl/App-Sky/app_sky_conf.yml is:

---
default_site: homepage
sites:
    homepage:
        base_upload_cmd:
            - 'rsync'
            - '-a'
            - '-v'
            - '--progress'
            - '--inplace'
        dest_upload_prefix: 'hostgator:public_html/'
        dest_upload_url_prefix: 'http://www.shlomifish.org/'
        sections:
            code:
                basename_re: '\.(?:pl|pm|c|py)\z'
                target_dir: 'Files/files/code/'
            music:
                basename_re: '\.(?:mp3|ogg|wav|aac|m4a)\z'
                target_dir: 'Files/files/music/mp3-ogg/'
            video:
                basename_re: '\.(?:webm|flv|avi|mpeg|mpg|mp4|ogv)\z'
                target_dir: 'Files/files/video/'

Download

Download sky from the CPAN

Licence

sky is free and open-source software (FOSS) distributed under the MIT/Expat License, a permissive software licence.