Saturday, February 25, 2006

wma to mp3

I found an old script on linuxquestions.org to convert wma's to mp3's.
I had to make a minor change to get it working with the latest version
of mplayer.



Requirements: Lame, mplayer.



To save the script, do this:

sudo
gedit /usr/bin/wma2mp3


then copy paste the code.

Then type:

sudo
chmod a+x /usr/bin/wma2mp3




If you don't have sudo, then just remove sudo and run the commands as
root.



Here is the code:


#!/bin/bash

current_directory=$( pwd )
#remove spaces
for i in *.wma; do mv "$i" `echo $i | tr ' ' '_'`; done
#remove uppercase
for i in *.[Ww][Mm][Aa]; do mv "$i" `echo $i | tr '[A-Z]' '[a-z]'`; done
#Rip with Mplayer / encode with LAME
for i in *.wma ; do mplayer -vo null -vc dummy -af resample=44100 -ao
pcm:waveheader $i && lame -m s audiodump.wav -o $i; done
#convert file names
for i in *.wma; do mv "$i" "`basename "$i" .wma`.mp3"; done
rm audiodump.wav


The script runs without any arguments, and it will convert all files in the folder.

Warning: All files will be overwritten

Wednesday, February 15, 2006

mp3 player

I bought a Creative mp3 player. Its 1 GB, with FM, Voice recorder, FM recorder, 4 equalizer presets, and folder support.

To get it running on linux was a breeze. First, I shoved the player into the usb port, then I mounted the player on a directory that i created, /mnt/usb/

So I do:
sudo mount /dev/sda1 /mnt/usb/

And then I run nautilus as root, and just copy whatever songs I want into the player. Voila !!

I could have solved the permission issues if I wanted to, but I didn't want to :-P

Oh, before pulling out the player, remember to
sudo umount /mnt/usb

Have a nice day!

Monday, February 13, 2006

nihongo benkyo

This is a really cool Japanese dictionary, that I found helpful.
GnomeFiles - GNOME/GTK+ Software Repository

Sunday, February 05, 2006

Evince - PDF viewer

I came across this really neat PDF viewer. I like it bacause I can actually copy-paste text from it :)

Click here to go to the homepage