The "sky" command-line application and other Recent hacktivity

If you have a good web hosting, you may have run into a pattern, where you are uploading files to it for other people to download and need to find the URL where they were uploaded to. Thing is - recalling the exact Rsync (= a file uploader) command and then going to the web browser to access the URL is time-consuming, and repetitive. sky, written in Perl using Moo and available on CPAN, aims to fix all that.

Here is a sample invocation from the web-site:

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:

As you can see, we just specified the file, and it divined the rsync command and gave us the resultant URL. Convenient.

sky requires a configuration file in ~/.config/Perl/App-Sky/app_sky_conf.yml such as this one:

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

And it uses the basename_re to figure out where to upload it later. The next features I would like to see added are an ability to specify the target directory or alternatively override the target section, and naturally - better documentation. But I'm happy with what I have so far.

CPAN Cleanups

I have been going over many of my CPAN distributions and doing various cleanups such as removing trailing whitespace (with tests based on Test-TrailingSpace), or converting the Changes file to be compliant with CPAN-Changes. It was kinda fun, though time consuming.

New Version of Freecell Solver

There's a new stable version of Freecell Solver, 3.18.0 released with some improvements including a port to JavaScript.

Black Hole Solitaire Solver

I have done a lot of work on Black Hole Solitaire Solver, and it can now also solve All-in-a-Row-Solitaire, and has some other improvements.

Binary Puzzle Solver

The Binary Puzzle Solver (written in Ruby) is now at version 0.0.3, with some bug fixes, several new moves and a convenient command line application.


I don't know if you've seen it, but there's a site that shows you which of your distributions pass the CPAN changes spec.

I went through the process of getting mine up to 100% a few months ago. Occasional mass updates like that seem to be a useful way to ensure old modules get a bit of love.

My current quest is to remove all usage of smartmatch from my distributions. I've published match::smart and match::simple to CPAN because I actually rather like the smartmatch operator, but want a version of it that I know will be stable across newer versions of Perl.

Leave a comment

About Shlomi Fish

user-pic An Israeli software developer, essayist, and writer, and an enthusiast of open/free software and cultural works. I've been working with Perl since 1996.