Python v. Tcl/Tk (denting & tweeting)

The Tcl/Tk program, which has the added feature of displaying the server response, has only 47 lines of code, 245 words, 1844 characters. It took me less than an hour to write it.
iDenTweetyPie

I hacked up a little more python/tkinter silliness.
iDenTweetyPie sends a dent/tweet(update) to twitter or identi.ca.
That's all, really.
I have no plans to make a full-blown client for either site, just a quick-n-dirty updating tool. I would like, however, to figure out the pubsubhub thingy to send buzzes to google/buzz.
That would take some additionaly work, since, at the moment, iDenTweetyPie tells you that you talk too much and refuses to proceed if your update is longer than 160 characters, which, of course, isn't necessary for buzz, since buzz tolerates longer updates.
I might work on that. I don't know. This was just a little exercise, really.
I had already written a similar little program in tcl/tk, iDenTickle, which initially only did dents, but I have updated that one to send tweets, too.
my dents : my tweets
./tony
Originally published at tony baldwin | bloguiando.
transprocalc - free translation project management tools *MUCHO TODO*

TransProCalc is a little program I sarted building back in late 2007/early 2008, when I was outsourcing a lot of translation work, and found that the time I was spending managing the projects didn't justify the meager profits I was making from outsourcing. I determined that I really needed to find a way to automate parts of the process, and I couldn't find any existing free/open source software projects that would meet my needs. I was "scratching an itch", as they say in the hacker community. I had a need; I started hacking.
TransProCalc IS handy, too. It helps me keep track of all the documents and assignments for a project, and crunch of the financial numbers, and spits out handy little reports. It needs work, though. I want to get it playing with a database to manage information on clients and providers, get it hooked up with a real calendar/reminder system, to remind me when invoices are due (to providers, or from clients), keep track of which clients have online invoicing systems and help me automate the process of dealing with those, etc....much trabajo.
I have good ideas on how to get a lot of that accomplished, but I need to set aside some time to get to work on it.
Additionally, I would not mind other devs jumping on board with the transprocalc project.
I added transprocalc on google code this morning, which may assist in finding other hands to get into that code, perhaps, and provide tools to manage the project.
Of course, it is already on sourceforge, too.
At the moment, I have some academic articles from Brazil to translate that are keeping me pretty busy.
Furthermore, I have a lot of really good friends in Santiago, Chile, where there was an 8.8 earthquake early this morning.
So, today, I am spending a lot of time, today, worrying about them and trying to track them down and make sure everyone is okay, and obsessively checking the news, etc... VIVA CHILE, MIERDA! (a todos los chilenos, les quiero mucho, mando abrazos, cuidense)
Originally published at tony baldwin | baldwinsoftware.com. |
wallpapers by tony baldwin
I'm working on translation of internal labor regulations for a Colombian company.
I though I'd share this: wallpapers by tony baldwin
I put up a page for some of the wallpapers I've made, mostly gnu/linux, debian, and related.
Originally published at tony baldwin | baldwinsoftware.com. |
Quick-n-Dirty floating point math in Bash
Originally published at tony baldwin | baldwinsoftware.com. Please leave any comments there.
Someone asked me what this:
was all about…having astutely noticed it in the last screenshot I posted.
I often have to quick math on the fly while generating estimates for clients and doing other off the cuff calculations.
Previously, while using openbox or fluxbox, I had a keybinding bring up a calculator and did the math and then killed the calculator with ctrl+q.
But, I’m all about efficiency, and lately have been learning more and more of the powerful tools in bash to do various things, from navigating the file system to handling files and manipulating text. In wmii, I always have at least one bash terminal open (my preferred terminal emulator currently being roxterm).
So, I figured there had to be an efficient means of doing math without bringing up a gui calculator, too, but bash doesn’t like floating point numbers so well.
Now, with expr or echo or let one can do some basic math (ie. expr 220+34, or echo $((220+34))), but not with floating point numbers (with decimal points), which I need.
But bc can do it. One would have to type in something like:
echo ‘5467 * 0.09′ | bc
or
bc -l <<< 5467*0.09
to get the result....
Not really quick-n-dirty...
So, I scripted it:
#!/bin/bash
# do math with bc
echo “Enter your equation:”
read e
echo “The result is:”
bc -l <<< $e
I called the script ‘M’ (for ‘Math’), and stuck it in /usr/local/bin.
Now, I just type
$ M
and I see:
Enter your equation:
(enter equation here)
The result is:
(result appears)
$
all done.
I type 1 letter (two keys, shift+m), and my equation.
tony@deathstar:~$ M
Enter your equation:
3452*0.09
The result is:
310.68
tony@deathstar:~$
./tony