Dumping to the Internets

I am constantly uploading files and pasting people URLs to said files hosted on some web server. After many years of typing the scp command and then manually transcribing the resulting URL, I finally made my life easier.

I shared it with some friends on IRC and everyone seemed to find it the most revolutionary script of 2008, so maybe it’s useful to the rest of the world.

In addition to printing the URL on the terminal, it also copies the URL into the primary X clipboard. This allows me to run the command upload foo and then quickly middle click the URL into IRC or a browser.

#!/bin/bash
user=username
host=host.org
[[ $# -lt 1 ]] && { echo "Not sure what to do..." 1>&2; exit 1; }
scp -r $* $user@$host:public_html && {
	URL="http://$host/~$user/$(basename $1)"
	echo "$URL"
	xselection -replace PRIMARY "$URL"
}

It assumes you have your ~/public_html directory on the server being shared over HTTP at /~username. In openSUSE 11.0, the xselection command is provided by, you guessed it, the xselection package.

Enjoy!

Banshee 1.2.1 out in the wild!

The Banshee logo

Well Internets, it’s been two weeks since the last Banshee release – one packed with an impressive array of features and fixes. And so it is with immense pleasure that we present today a follow up release with many notable fixes, some love and polish, and lots of translation updates!

This release is mostly a maintenance update with 25 fixed bugs, lots of updated translations, and a few small enhancements that we’re sure will please:

  • Drag and drop albums or artists from the browser
  • New import source to aid in importing videos from your camera
  • Show cover art in Now Playing
  • Pressing play will play the first track selected if nothing is loaded
  • Pressing o on a track selection behaves the same as pressing enter
  • Include never-played tracks when querying against last played (e.g. played>"2 days ago")
  • Prefer cover art named cover/folder/front.jpg over other image files

Read the release notes for the full scoop, and download it now!

Packages are of course already available for openSUSE 11.0 and 10.3, and the other distributions will follow shortly, including Foresight, Ubuntu, Fedora, Debian, and Mandriva!

We’ll blog soon about what’s to come next, but expect another point release within the next couple of weeks. A super big thanks to all those who have contributed: translators, patchers, bug hunters, reviewers, testers, and enthusiastic users alike!

Enjoy! For now…

My Planet Needs Me

Digg It!