February 2010 Archives

2010-02-15 00:20:45

yaydl 1.4a

It's already been more than one month since I released yaydl 1.3.7, so it's time for a small status update. The attached preview of the upcoming release already includes two main new features: support for playlists and 1080p videos on Youtube. Please note that these improvements aren't fully stable yet and might include some bugs - so if you're a fan of rock-stable software, keep your hands off this alpha ;-)


Posted by haui | Permanent Link | Categories: projects

2010-02-02 21:26:50

Lyrics fetcher for moc

As the newest alpha version of moc comes with the ability to display song lyrics, I thought it might be a nice feature to fetch these lyrics automatically. So I just cobbled together a few lines perl code, that actually work pretty well. Nevertheless it's just a quick hack with a lot of bugs, so don't expect too much. :-)


Posted by haui | Permanent Link | Categories: linux

2010-02-01 20:05:39

HowTo: Convert Windows-style line endings to Unix-style (and vice versa)

Though there are some tools (e.g. dos2unix) available to convert between DOS/Windows (\r\n) and Unix (\n) line endings, you'd sometimes like to solve this rather simple task with tools available on any linux box you connect to. So, here are some examples - just pick the one that fits you best:

Windows to Unix:

#Shell
perl -pe '$_=~s#\r\n#\n#' < windows.txt [> linux.txt]
sed -r 's/\r$//' windows.txt [> linux.txt]

#Vim
:%s/\r$//
:set ff=unix

Unix to Windows (do you really want this?)
#Shell
perl -pe '$_=~s#\n#\r\n#' < linux.txt [> windows.txt]
sed -r 's/$/\r/' linux.txt [> windows.txt]

#Vim
:set ff=dos
Don't forget to save your file, when you're using vim.

Posted by haui | Permanent Link | Categories: linux