Home

Oggify (improved)

  • Sep. 4th, 2008 at 11:56 PM
demnme
Aside from any argument over which audio file format is best (I like FOSS, thus ogg), I reworked my oggify script, attempting to implement what I learned from comments at [info]linux

Oggify (improved) )

Make me a sandwich...

  • Sep. 3rd, 2008 at 9:34 AM
demnme
Only my geek friends will appreciate this, of course.



#!/bin/bash

# make me a sandwich

name=$(whoami)

if [ $name != "root" ]; then

echo -e "Bah...go make you're own sandwich...\nWhat do you think I am, you're slave or something?"

else

echo -e "At your service, O Great One.\nWhat kind of sandwich do you desire?"
read type
echo "Cheese, sir?"
read cheese
echo "What kind of bread, Majesty?"
read bread
echo "Any condiments, Benevolent Master?"
read condiments
echo "Something to drink, as well, Your Magnificence?"
read drink
echo -e "Very well, Majesty...one $type sandwith with $cheese on $bread with $condiments, and a drink of $drink coming right away, Great One!"

sleep 5

echo "..."

sleep 5

echo "..."

echo -e "Here is your sandwich, o Great Benevolent one.\nThank you so much for allowing me to serve you.\nI bow before your magnificent radiance!"

fi

exit

It's nobody's fault but mine...

  • Sep. 3rd, 2008 at 1:03 AM
demnme
It's 1:00 am again, and I have about 60 pages of text that I finally completed translating after working around the clock for the past four day
which I now have to proofread.

You run spellcheck on these things, even, and it takes forever...especially with all the foreign names with accent marks and stuff...

Of course, if I'd quit fooling around writing scripts and programs and messing with irc bots, and lynx, etc., I'd probably be done already.
I've got nobody

the plot sickens...

  • Sep. 3rd, 2008 at 12:40 AM
demnme
ever deeper into the depths of the dark world of the bash shell....

This, children, is what it looks like to view and interact with LJ using Lynx, a text-based, command line browser:


Of course, at one time, this was what "the internet" would have looked like to everyone.
I remember doing IRC in a text terminal back in college.
You know...in the stone ages...

deeper and deeper...

  • Sep. 2nd, 2008 at 2:32 PM
vader
I've just totally sunk into a world of dark, blackness....
with pretty colored text.

I'm find myself using my terminal for anything I can get away with now...

chatting on irc with irssi
for instance...

or


listening to tunes while chatting on irc in irssi




the other tabs on my terminal or doing other stuff, too.

Heck, my last post...the long, long list o' tunes, well, I did
ls -R /mnt/storage/tunes > tuneslist.txt
to pipe the list output from terminal to a text file.
Then I did use a gui text editor, my Tickle Text
to edit the rest of the html to make a web page with it...uploaded it with my TclUP...
Before you know it, I'll be editing html pages in nano in terminal and ftp-ing them to my site in a wish terminal (since tcl has good ftp tools)...
I'll be writing lj-posts via e-mail with mutt, and reading my friend's page with Lynx...
I'm hopeless...

tunages

  • Sep. 2nd, 2008 at 3:42 AM
mana-amar
Here lies a very, very, very lengthy list of all of the tunes on my computer....

Herein, you will find music from:
US
UK
Mexico
Argentina
Chile
Brazil
France
Canada
Ireland
the Middle East
India
Australia
Iceland

Basically, all over the world...

Spanning genres as diverse as:
Bluegrass
Baroque
Punk
Heavy Metal
Ragas
Gregorian Chants
Techno/Ambient/Elektronica
Vallenatos
Merengue
Salsa
Forro
Sertaneja
MPB
Pagode
Rock
Reggae
Funk
Blues
Jazz
Country & Western (we got both kinds!)


Basically...something for everyone...

So, I'll be you that if you look through here, you will find at the very least one song or artist that you know and love.
I don't care where you're from, or what kind of tunes you like.
There's something here you dig.
No kidding.

he's gone...

  • Sep. 1st, 2008 at 7:57 PM
hesgone
It seems I've gone so far off the geek end, I've lost my readership.
Nobody has left a comment in days...
demnme
I have too many wav and mp3 files, really.
I mean wav files are BIG.
And mp3 files suck, and are a proprietary format.
So, I wanted to convert ALL of my tunes to ogg-vorbis format,
a lossless open source audio file format.

So, I wrote this:

#!/bin/bash

# convert mp3 and wav to ogg
# copyright tonytraductor / http://www.BaldwinSoftware.com
# released under the terms of the Gnu Public License v.2 or later.
# no promises...if it breaks something, call your mom...


echo "Oggify, at your service."

# removing spaces in names or
## mp3s

echo "Removing spaces in names..."

for i in $(ls -1 *.mp3)
do
rename \ _ *.mp3
done

## and wavs

for i in $(ls -1 *.wav)
do
rename \ _ *.wav
done

echo "Converting mp3 files to wav..."

# converting all mp3 files to wav,
#so there will be nothing but wavs


for i in $(ls -1 *.mp3)
do
n=$i
mpg123 -w "$n.wav" "$n"
done

# stripping the .mp3 extension from filename.mp3.wav

for i in $(ls -1 *.wav)
do
rename .mp3. . *.wav
done

# clean up as we go

rm -f *.mp3

# and, now, converting those wav files to ogg

echo "Converting wav to ogg..."

for i in *.wav
do
oggenc $i
done

# more clean up

echo "Removing mp3 and wav files..."

# removing all those big, fat wav files.

rm -f *.wav


echo "Your oggs are all fresh and toasty and ready to enjoy, friend."
echo "Happy listening!"

exit



I had written a gui version, too, with zenity, but, bah...
Who needs a gui?

and you guys thought I was a geek...

  • Sep. 1st, 2008 at 10:15 AM
demnme


You thought moi was a geek?
I can't compete with these folks.
no way...

Droppin' eggs...

  • Sep. 1st, 2008 at 9:54 AM
demnme
It'S ALIVE!!!
Last night I set up an eggdrop bot to man my channels on irc.freenode.net (#linguasos, #tonytraductor, and #baldwinsoft) and, he's still there this morning.
Cool.
I never did that before.
Here's a lovely shot of us playing together.


Isn't that sweet?
Oh yeah, and irssi rocks.
I just discovered this terminal based irc client yesterday.
B'bye Konversation!
(I learned that pidgin does irc, too...never knew that...)

gtkFortune

  • Aug. 31st, 2008 at 8:36 PM
demnme
My nephew wrote this little gtk gui for fortune.


Here it is in action on my machine
.

I had to write my own fortune file...you can do that.
I keep checking out his little scripts and things.
I'm learning stuff about hacking from my 16 year old nephew.
The kid's a genius.
Here is his blarg.

Cabezones - Abismo

  • Aug. 31st, 2008 at 8:07 PM
demnme

That was easy...sort of...

  • Aug. 31st, 2008 at 2:03 PM
demnme
Ha.
I have finally found what I think is the best solution for my e-mail issues.
I synched Thunderbird on my home/office box with gmail via IMAP.
Not only that, but, I have synched my Lightning calender with my Google Calendar!
(Provider plug in)
I removed Seamonkey from my laptop and installed Firefox, setting Gmail as
the default e-mail client.
I learned that Pigdin can access IRC, so, I don't really need an additional IRC client to replace
the Seamonkey IRC function.
I did, anyway. I installed IRSSI.
(Gosh, I like IRSSI so much, I might just remove Konversation from my main box, and stick with IRSSI...)
As far as the Seamonkey Composer, well, I already had my own solution for that.
I can edit html in tickletext, which already has the function of opening a page I'm editing in my browser for a preview, and, I have tclup to upload/download pages to/from my servers.
(I never really used the wysiwyg aspects, so much, as I did use the wysiwyg tab to preview results of
my html hacking. I keep thinking of incorporating all of tclup right into tickletext.
Then, it is not just a nifty text/script/hax editor, LaTeX editor, PDF creator, and HTML editor, but, even more of a
useful webmastering tool. Really, at this point, I just need to add a menu item somewhere in tickletext
to call tclup, and include it in the tcltext.tar.gz. Heck...likely I will soon remove kompozer (which is handy)
from my main box and do all my html editing in tickle text.

Problems solved.
All mail is downloaded and archived on my home/office box, as well as on the gmail servers.
My calendars are all in synch.
I have access to all of it from anywhere.

More rambling about mail issues...

  • Aug. 30th, 2008 at 8:24 PM
demnme
I think I would really like to just use one mail interface.
Honestly.
But, at the same time, having seen internet companies, and free mail servers, and other free web services come and go,
or go from free to not-free, etc.
I don't want to entrust all of my imporant mail to a web company, not even the Allmighty Google, without a back up.

But, I've been using the google calendar, and gmail, etc. quite successfully, yet still downloading mail to my machine via t-bird to keep it backed up here, just in case, which is starting to be a headache.

The only advantage I can think of in using a pop mail client to deal with my mail (besides having it archive here, as well as on google's gmail servers), is that I can switch spellcheck languages while composing messages in tbird at the click of a button (which, in fact, can be a considerable advantage, when one considers that I frequently write mail in 4 different languages, only one of which is my native language, of course).
Otherwise, the gmail interface offers me pretty well all the same functionality.

But, I've been thinking...
I think there is a way for me to download and archive the mail automagically, using something like cron and mutt, or something.
I mean, I'm nearly certain that it is possible.
I just don't know how to do it, at the moment.
I'm going to look into that.
Then, I will simply set FF to use gmail as my default mail client, set my current key binding for t-bird (ctrl + e) to bring up "/usr/bin/firefox http://mail.google.com", instead of "/usr/bin/mozilla-thunderbird", and simplify the whole matter.
One interface, but still have mail backed up here.
I'm going to look into that.

Translations...sort of

  • Aug. 30th, 2008 at 11:42 AM
vader
Ha...I have here a text, initially written in bash script, and then translated to tcl/tk, and,
are you ready for this...
(I started learning another programming language),
then, translated to Perl/Tk!


Bash script:

#!/bin/bash

fool=$(zenity --entry --title="Say, foo!" --text "Say, foo, wha's yo name?")
zenity --info --title="Talkin' trash!" --text "Well, $fool, yo mama's gotta a bgi ol' butt!"

exit




Tcl/Tk:

#!/usr/bin/env wish8.5

# say, foo

wm title . "Say, foo!"

global fool

grid [ttk::label .lbl -text "Wha's yo name, foo?"]
grid [ttk::entry .ent -textvariable fool]
grid [ttk::button .btn -text "Tell me yo dang name" -command {talktrash}]

proc talktrash {} {

tk_messageBox -type ok -message "Well, $::fool, yo mama's gotta big ol' butt!"

destroy .
exit



Perl/Tk:

#!/usr/bin/perl
use Tk;
use strict;
use warnings;

# playing with perl...
# main window


my $mw = new MainWindow;

my $label = $mw-> Label(-text=> "Say, foo, whas yo name?") -> pack();
my $ent = $mw-> Entry()-> pack();
my $but = $mw-> Button (-text=> "Tell me yo name, foo", -command => \&talktrash)-> pack();


MainLoop;

sub talktrash {
my $fool = $ent -> get();
my $response = $mw -> messageBox(-message=> "Well, $fool, yo mama's got a big fat butt!", -type=> 'ok', -icon=> 'warning');
}




In other news, Rhianna Banana and I went to see STAR WARS: The Clone Wars, yesterday.
That was cool!


Okay, now I have to translate these contracts from Chile to English...

xau

Christmas in August?

  • Aug. 28th, 2008 at 5:00 AM
demnme
It is only 48 degrees in some parts of CT this morning...
In August.
Weird.


Yesterday we drove all the way to Patterson, NY to adopt another dog.
We got a little girl German Shepherd, whom the Mrs. has named "Shirra".
She's a cutie!

The drive was 2 hours one way.
We were there for 2 hours.
Then 2 hours back.
Because of this 6 hour interruption of my work day,
I am still up at 5am translating Brazilian employee satisfaction surveys from an electronics company in São Paulo.
I have about 8 pages left, and the work is due this afternoon.
I'd go to bed for a while, but, I don't want to risk sleeping too long and not completing
the project before the deadline.
I don't miss deadlines.
I'm working awfully slowly, though.
My brain is not functioning within optimal parameters.

Durante nossa viagem, a minha esposa pões um CD de Barão Vermelho no som do carro.
Vou rouba-la desse disco, vou.
Gostei, mesmo.

copious spare time ?!

  • Aug. 26th, 2008 at 9:25 PM
demnme
It's suddenly occurred to me that my work would be getting done a lot quicker if I would not keep stopping to post here.
I have been posting profusely...Like 2, 3, 4 posts a day, maybe more, for a few days.
But, hey, I've been doing stuff that I've wanted to share, like making new websites and software, and stuff.
And thinking about stuff.
I have an active brain.
Mind you, I'm not claiming that all the whirlwind and chaos between my ears is either useful or interesting, by any means.
But, you can't complain.
I didn't MAKE you read this nonsense, now, did I?
Now, if you'll excuse me, I really must get back to these translations.
kthnxbye

Teaching an old dog new tricks...

  • Aug. 26th, 2008 at 7:50 PM
demnme
I have to say that I get sort of set in my ways, at times.
I mean, I will develop a routine, a work flow for the things I do, and changing it always makes me anxious. Like, just about 2 years ago, when I finally pried my bony, arthritic fingers off of the old Mozilla Suite, and finally, like the rest of the world, moved over to Firefox and Thunderbird. And, well, I did it very reluctanly, because ol' Moz had done me right for so long.
(Using Seamonkey on the laptop is like revisiting the ol' Moz days...and, in any case, I figured it was lighter to use Seamonkey as the default mail/browser/irc-client/html-composer in Linguas OS, rather than installing FF, T-bird, xchat or konversation, kompozer or bluefish or amaya, etc...and left it as is on the laptop, rather than installing other stuff, like I have on the main box).
But, in the end it worked out pretty well, I confess, and learned to really dig a lot of stuff I can do in Thunderbird.
That Lightning calendar extension more or less revolutionized my existence.
I could never the the Mozilla calendar thingy to work, and, although I had programmed a few birthday reminders into a Yahoo! calendar, I had, more or less, never really used a calendar. Now, I don't know how I ever got along without it.
I mean, I've got serious organizational issues. The Lightening calender is like my Mom. Honest. Keeps me all straightened out on a lot of stuff. I couldn't run my business, now, without it.
So, this recent move to gmail was another of those changes to which I was quite resistant, at first, but, now, hey...I like it!
I mean, since I am branching out and being more mobile, keep all of my mail on Thunderbird alone was not the best solution.
And using half a dozen webmail interfaces to check all of my mail would be tiresome, and try my patience.
But, gmail really came in handy, here, since I was able to make it collect mail from several domains, and send from the same addresses, AND, work as a POP mail service with Thunderbird...so, I still have my calendar.
Now, if only I could some how really get gmail to sync with Lightning, the way the mail does.
I mean, when I send a reply to a message with Thunderbird, the reply shows up on the gmail server, too...I think that's so cool.
So, if, when I add an event to Lightning, it would be awesome if it were automagically added to my google calender, and/or, vice-versa. I find myself updating two calendars, now.
I mean, I was able to import my calendar from Lightning to google calendar and get everything that was in it, up to the date that I exported/imported, but, I mean, when I add new stuff.
I suppose I could periodically export here and import there, again, and it would update the google calendar, but, I mean, on a daily basis I am dealing with adding events, tasks, and reminders to lightning (deadlines for projects, invoices, dates for events at Rhianna's school, etc., etc...family stuff, work stuff, doctor's appointments...). I'd like to know that, if I am out and away for a day or two with my laptop, I will still be reminded of these events, and/or, see them on a calendar when making plans.
I know...I could remove Lightning from thunderbird altogether, and just use the google calendar, but, then I just get e-mail reminders. I don't get a message popping up on my computer, hard to ignore, the moment I log in in the morning, telling me,"Hey, Tony, today's gym day. Make sure Rhianna has her gym clothes for school!". or "Hey, Tony, it's the 10th of the month...Run your backups!"...stuff like that.
I can miss an e-mail, considering that hundreds of e-mails pass my desk everyday, but, those lightning reminders are impossible to ignore.
Now, I tried to make gmail give me a pop-up reminder, but, it seems to me that it will only come up if I am logged in at the time the reminder is set to pop-up...and if I am not, but log in an hour later, well...I will never see the pop up.
That doesn't work out as well for me.
I know...I need to figure out how to make gmail "star" and highlight calendar reminder e-mails.
That might help...and set Thunderbird to automagically tag them as "IMPORTANT" in bright red...
That might work.

You know, the thing is, I get in a routine, and think it's working for me, and resist making changes, thinking it's going to be difficult, when, in the long run, the changes often make my life easier, as did switching from ol' Moz to FF and Tbird.
So, we'll see...perhaps things will get even easier again.
And often, if nothing else, change makes me learn stuff.
It's really quite humorous how resistant I get to change, at times, when I will also sit here and complain of boredom after following the same routine for so long...
So, change is good.


Oh, and the Mrs. now wants to get another dog, and we're going to look at a German Shepherd tomorrow.
(I like Australian Shepherds, personally.) So, my sad little old man, Pipoca (who is all of 2 years old, really,
and quite happy) is going to have a new friend...and have to learn to share.
He may resist, at first, but, who knows, maybe the change will make his life happier in the long run.