Reading uif And chm Files Under Ubuntu
|
I came across two files types earlier this week that I hadn't seen before. <filename1>.uif and <filename2>.chm. Luckily there is a nice web site that has a potted history of them (uif chm). |
There is a Windows program called MagicISO that will allow you to extract files inside a uif file. And it "just works" via Wine on my Ubuntu Horny Hippo system.
With the chm files, there is a wonderful little Google Code program called chm2pdf that will nicely convert the files to PDF which I can then read with evince. It's still got a couple of things that need to be fixed. The page numbering is all shoot to pieces and it really doesn't like it if the original chm file has spaces in its name, but I can live with the first one and a simple rename before trying to do the conversion solves the second one.
(I also found that FBReader nicely reads chm files too).
[Technorati Tag: File Conversion]
( Apr 03 2008, 03:57:47 PM PDT ) [Listen] Permalink Comments [7]
You Know You're Tired When ...
|
you bring up a screenshot of a desktop which has windows on it with scrollbars, and you keep clicking on the scrollbars and wonder why they don't scroll the window contents. |
Time for a nap.
( Mar 30 2008, 03:21:12 PM PDT ) [Listen] Permalink Comments [5]
Amazon Pet Peeve
|
Or maybe just "kudos to Google". You've all seen when you do a Google search and you accidentally spell something wrong (and also when you have a spelling that's not the normal one), then Google will prompt you with a "Did you mean: ........" link. |
Why can't Amazon do that? Maybe just in the case where it doesn't find any results. Yesterday I was trying to find their web page for Ripley's Curioddities. I kept misspelling it. Rather than come back with a "Did you mean:" page, it comes back with "Your search "ripley's curiodities" did not match any products.'. Then it displays three best seller links, like I'm going to have a bout of attention deficit disorder, forget what I was searching for, and go off and buy something else.
How hard would it be to actually really help the customer here?
On the same page, I see they have a "Have a shopping question? Try askville, it's free". Maybe I should ask there, though I suspect I already know the answer.
( Mar 21 2008, 07:41:49 AM PDT ) [Listen] Permalink Comments [1]
New Chief Maintainer For Gcalctool
|
I just announced this on the GNOME devel-announce-list mailing list. I'm not sure who that goes to, so I thought I'd announce it here too, so that at least readers of Planet GNOME will get to see it. |
Starting with GNOME 2.23, Robert Ancell will be taking over as the chief maintainer of gcalctool, the default calculator that comes with the GNOME distribution.
For GNOME 2.22, Robert did an excellent job of converting the gcalctool UI to use Glade, becoming intimately familiar with the code in the process. Since then he has continued to support gcalctool, and I thank him for his time and enthusiasm.
I know he has lots of great ideas for future work too.
I will still be around to make sure that the transition is as smooth as possible and to occasionally provide a bug fix or two.
The first version of this calculator was written in 1986. It's still out there on the net. It's come a long way since then. It's certainly more that 300 lines of code and 1/2 MB in size nowadays.
I'd like to thanks everybody who has helped make [g]calctool what it is today. See the AUTHORS file in the latest source distribution for a potted history.
( Mar 10 2008, 09:13:04 AM PDT ) [Listen] Permalink Comments [6]
Free Simple To Use Video Editing Software?
|
Duncan has a book report presentation on Monday. One of the options is to create a video rather than speak directly to his class. He'd like to do that. Last night with the help of an iSight camera attached to my Powerbook, QuickTime Broadcaster and the excellent instructions on the O'Reilly macdevcenter.com web site, we worked out how to capture the video in MPEG 4 format. |
That's fine, but there are some bits that we'd now like to remove. I'd also like to add initial titles and if possible, fade-out / fade-in between "scenes".
If you haven't realized by now, all of this is new to me. If I had the luxury of more time, I'd be happy to use something like the Digital Video For Dummies and try a few experiments. For now, I'm looking for free, simple to use software that will make these tasks easy and quick.
I copied the video over to my Ubuntu system and loaded up Avidemux and worked with their wiki and was able to successfully cut out some of the pieces that we didn't want, but due to my inexperience, it was a bit of a hit and miss affair. I still haven't worked out how to do the other things.
Anybody got any recommendations for free, easy to use alternatives? For Windows Xp, Mac OS X Tiger or Ubuntu Hardy.
I thought there would be a time when I'd have trouble helping my son with his homework, but I didn't expect it to be while he was still in fourth grade.
Any pointers would be very much appreciated.
Thanks.
[Technorati Tag: Video Editing]
( Mar 07 2008, 11:16:10 AM PST ) [Listen] Permalink Comments [14]
What's In Gcalctool For GNOME 2.22
|
We'll all be cutting our tarballs for GNOME 2.22 on Monday. This release will see several major changes to the default GNOME desktop calculator. Many thanks to Robert Ancell and Sami Pietila for their help in making these improvements. |
I sent the following to Davyd Madeley for inclusion in the GNOME Release Notes. Note that these are just the highlights. There have been a lot more bug fixes integrated as well.
Gcalctool now uses Glade for its user interface. This will make it easier and quicker in future to make UI fixes or add new UI features.
The number of significant numerical places has been increased to 99 and the number of displayable digits has been increased to 200.
(Note that if you have problems seeing the first digit in the display area, this is Gtk+ bug #482688).
The keyboard shortcuts for the hexadecimal digits have been changed back to "a" - "f".
With copy/paste operations, where the user is pasting a string into gcalctool, the copy buffer is now iterated over. If an "A", "B", "C", "D" or "F" character is encountered, it will be converted to its lowercase equivalent. If an "E" is found, and the next character is a "-" or a "+", then it remains as an upper case "E" (it's assumed to be a possible exponential number), otherwise its converted to a lower case "e".
Displaying of hex digits in the gcalctool display will still be in uppercase. Displaying of the "e" in an exponential number will still be in lower-case.
The following functions have also had their keyboard shortcuts changed:
[A] - Set accuracy [C] - Change sign [D] - Double-declining depreciation [E] - Enter an exponential number [F] - User-defined functionsThe way to enter exponential numbers in arithmetic precedence mode has changed. The following four examples should show you the new correct syntax:
1 2 Exp + 8 = 1200000000 - 1 2 Exp + 8 = -1200000000 1 2 Exp - 8 = 0.00000012 - 1 2 Exp - 8 = -0.00000012In both left-to-right precedence and arithmetic precedence modes, if the user enters a numeric digit that is incorrect for the current numeric base, this isn't allowed and is not entered in the display.
There is now a cursor in the calculator display area. It understands the Home and End keys. This is in arithmetic precedence mode only. You can also "hand edit" the display by moving the position of this cursor.
A "Reset to Default" accuracy menu item has been added.
When the bit calculation extension is enabled, a message now appears in the status bar.
The Delete key is now used to delete the character to the right of the cursor in the display area. To clear the display area, use Shift-Delete.
The help menu shortcut has changed from Ctrl+H to F1 to match the Human Interface Guidelines (HIG).
There have been many changes to the online help. They include:
The various screenshots have been updated to reflect all the latest changes.
Square root documentation has been updated. The entry now includes examples for both arithmetic precedence and left-to-right precedence modes.
The logical operations, And, Not, Or, Xor and Xnor now use uppercase letters (AND, NOT, OR, XOR and XNOR) for both the buttons and in the display area in arithmetic precedence mode.
The result for the AND example is now correct.
The syntax for using NOT in arithmetic precedence mode is different then for left-to-right precedence mode. The online help example has been updated to show both examples.
Updated the documentation for bit calculating extension.
Updated the documentation for Changing Modes Clears Calculation.
Added in a new section titled "Changing The Display Area" and updated the keyboard shortcut for the Clear operation.
Adjusted "monthly interest rate" to "simple monthly interest rate" for two of the financial examples.
( Mar 07 2008, 07:33:37 AM PST ) [Listen] Permalink
Whither Decent/Working Amazon API For Amazon Associates Web Service?
|
I have several small Python scripts that use the Amazon E-Commerce Web Service 3.0 to do things like read my Amazon wish lists and lookup books via their ISBN numbers. |
Last week I received an email from the Amazon Web Services folks. It states:
We are writing to remind you that the Amazon E-Commerce Web Service 3.0 will be deprecated on March 31st, 2008. Our monitoring indicates that your Subscription Id was passed into calls to Amazon E-Commerce Service 3.0 between February 17th and 24th, 2008. After March 31st, 2008, we will no longer accept Amazon ECS 3.0 requests. Please upgrade to the Amazon Associates Web Service (previously called Amazon E-Commerce Web Service 4.0) by then to ensure that you or your customers are not affected by the deprecation (if you migrated your application after February 24th, 2008, you will be unaffected). Please also note that none of the links you generate from Associates Central are affected by the deprecation. Any links, widgets or banner ads that you may have on your site will continue to function after March 31st.
Their meaning of "deprecated" is obviously different than the Java API's, where deprecated methods continued to work for several years.
It's true that Amazon have given fair warning about this change which was announced in February 2007. They even point to a migration guide.
My usual approach to things like this is "if it ain't broke, don't fix it", but it really looks like this is going to break in about 3-4 weeks, so I've been doing a bit of research.
I see nothing in the Amazon migration guide that points to new Python API that would help here. I have been using pyamazon and on that web page it states:
Kun Xi is starting a fork of PyAmazon to support some of the new features of AWS 4.x. This project is being hosted on Sourceforge. Initial code is available at: https://svn.sourceforge.net/svnroot/pyaws/.
The link is wrong. You can find it here.
I had a look at that. I got his example to work, but it really does seem incomplete. (He calls it pre-alpha for a reason). The documentation is sparse, and there aren't a lot of examples. Because of this, perhaps I'm not understanding how it fully works, but I don't see the equivalent of pyamazon calls like:
books = amazon.searchByASIN(asin)
So what are people using to access the new Amazon Associates Web Service? Is there a simple decent working Python API? Is there something somewhere that can easily map the old pyamazon API calls like:
amazon.setLicense(amazonAccessKey)
books = amazon.searchByASIN(asin)
results = amazon.searchByWishlist(amazonWishListID, page=pageNo)
books = amazon.searchByAuthor(author, page=pageNo)
to similar easy-to-understand new ones?
Inquiring minds wanna know...
[Technorati Tag: Web Services]
( Mar 06 2008, 08:50:24 AM PST ) [Listen] Permalink
Python Day At Sun
Apparently it's an unofficial Python day at Sun as Ted Leung and Frank Wierzbicki are joining us. Tim is leading the charge and is encouraging us to all blog about Python. So here's my contribution.
It's nice to see that the OpenSolaris packaging folks are using Python for pkg, but let's not forget that Orca was one of the first official Python projects at Sun, and was started almost four years ago.
In fact, we had to put through a case with PSARC to get the official version of Python in Solaris bumped from 2.3 to 2.4 just so that we could integrate into Solaris ourselves.
Python has fast become my favorite program language. I encourage others who haven't used it, to give it a try. Here's a link to the Essential Python Reading List to get you started.
( Mar 03 2008, 10:36:54 AM PST ) [Listen] Permalink
More FireFox 3 Weirdness
|
Certain sites (like this one), just don't want to render correctly. It seems to blit a copy of part of my screen desktop into the browser window. Some kind of memory glitch? This is on a Ferrari 3400 running latest Ubuntu Hardy. |
I'm also seeing problems with certain images just showing up as a black rectangle. Like the one on this web page. If I right click and do a View Image on it, then the image shows just fine.
I'm told by Joanie that this is just a problem with the version of Firefox 3 that currently comes with Ubuntu Hardy. If you build it from the latest source, the problem goes away. I haven't tried that yet, and would rather not.
So... anybody else seen this or know what to tweak (or untweak) to fix it?
( Mar 03 2008, 08:30:52 AM PST ) [Listen] Permalink Comments [15]
Intrusive Firefox
|
I'm using latest Ubuntu Hardy and have Firefox 3.0b3 running on one workspace on my GNOME desktop and Thunderbird running in another. When I click on a link in a mail message in Thunderbird, it brings Firefox over to my current desktop. I hate that! |
Anybody have any ideas on how to prevent this intrusive behavior? It certainly didn't do this with Firefox 2.0.X.
Update:
Thanks to everybody that responded. If you set "browser.tabs.loadDivertedInBackground" to True via "about:config" in Firefox, then the problem goes away.
( Feb 27 2008, 07:30:36 AM PST ) [Listen] Permalink Comments [6]
Saving The Audio Out Of A YouTube Video
|
I've sure there are lots of ways to do this. Here's one. |
Go to DOWNLOAD YOUTUBE VIDEOS and enter your YouTube URL and click on the Download button. The web site will display the video and show a blue "Download Video" link near the top of the page. Right click on that, and choose "Save Link As". Pick a filename that has an extension of .flv and save. It'll save the YouTube video as a Flash file.
You can then get the audio out and save it as an MP3 file with:
$ ffmpeg -i input.flv -f mp3 -vn -acodec copy output.mp3
(thanks linnerd40).
( Feb 25 2008, 01:00:58 PM PST ) [Listen] Permalink Comments [12]
Updated: Be Informed When Used Amazon Books Are Available At Your Price
|
Short Version: Regular readers may remember a post back in September where I showed how to find out if the books on your Amazon wish list were now available used, at a price you were willing to pay. This stopped working for me on the 7th February. There are now new versions of the make_book_list.py and cheap_books.py scripts that fix the problem found. |
Long Version: I have a cron job that runs the
cheap_books.py script nightly. The last time it worked
was the 6th February. I finally got around to investigating the problem
over the weekend. As I've got it setup to send the mail message with the
results to my Gmail account, the first thing I did was look to see if
gmail had thrown it in my Spam folder. It had done exactly this for the
mail that was the results of a similar script, so it wasn't much of a
stretch to think it had happened again.
That wasn't the case, so I then ran the script manually. It terminated abruptly with:
Traceback (most recent call last): File "./cheap_books.py", line 108, incheckBookList(books.list_of_books) File "./cheap_books.py", line 95, in checkBookList books = amazon.searchByASIN(asin) File "/home/richb/DVD/python/CheapBooks/amazon.py", line 321, in searchByASIN return search("AsinSearch", ASIN, None, type, None, license_key, http_proxy, locale, associate) File "/home/richb/DVD/python/CheapBooks/amazon.py", line 293, in search xmldoc = minidom.parse(usock) File "/usr/lib/python2.5/site-packages/_xmlplus/dom/minidom.py", line 1915, in parse return expatbuilder.parse(file) File "/usr/lib/python2.5/site-packages/_xmlplus/dom/expatbuilder.py", line 931, in parse result = builder.parseFile(file) File "/usr/lib/python2.5/site-packages/_xmlplus/dom/expatbuilder.py", line 208, in parseFile parser.Parse(buffer, 0) xml.parsers.expat.ExpatError: not well-formed (invalid token): line 24, column 19
There's a really useful error message. What was worst, was that by turning on debugging in the cheap_books.py script, I could see that it wasn't always happening for the same book. Sometimes the script would run for a longer time before generating the traceback.
It would have been nice if the amazon.py code caught that error. As there are no debug facilities in the pyAmazon source code, and there hasn't been a new release since August 2004 (and Michael Josephson is looking around for a new maintainer), I wasn't expecting too much help there. I ended up doing:
$ sudo vi /usr/lib/python2.5/site-packages/_xmlplus/dom/expatbuilder.py
and adding a:
print ">>>buffer: ", buffer
statement just before line 208 and ran it again. When it crashed, I could see that
the last part of buffer was:
<h2>503 - Service Unavailable</h2> <p> You are receiving this error because you sent more than one request per second to Amazon Web Services (AWS). Per the AWS Licensing Agreement, AWS restricts each IP address to no more than one request per second. Please see the full <a href="http://www.amazon.com/gp/browse.html?node=3440661">AWS Licensing Agreement</a>.
Well this is new (and presumably introduced about 6/7th February), but okay. I can live with that. So I adjusted my two scripts and put in a
time.sleep(1)
in the book searching loop, just after doing the
amazon.searchByASIN(asin) call.
When I ran it again, it crapped out in the same place. I then thought that maybe my browser (which had an Amazon book web page showing) was helping to cause the problem. Nowadays, those Amazon book web pages have a live region for that message that goes something like: "Want it delivered Tuesday, February 26? Order it in the next 7 hours and 1 minute,". It's updating every second. Darned if I know why it needs to be that active.
So I terminated my browser and ran it again. No change. Still Crapsville, U.S.A. I then changed it to:
time.sleep(2)
and lo and behold, the script started working again.
So I now wonder whether Amazon have a rounding error in their code. Whatever. The script runs at night. If it takes twice as long as it used to to run (8 minutes instead of four), that's not a big deal.
( Feb 25 2008, 08:44:03 AM PST ) [Listen] Permalink Comments [3]
Phun
|
This was one of the most popular del.icio.us links on popurls yesterday. I see it's there today too. I decided to download it and play with it. |
It's a 2D physics sandbox by Emil Ernerfeldt.
"Phun is meant to be a playground where people can be creative. It can also be used as an educational tool to learn about physics concepts such as restitution and friction.
And it's fun. Easy to understand. Just dive right in. Muck about with things like gravity and weight and see what effect it has on the objects you've created.
Checkout the video to see the kind of things you can do with phun
Duncan is home this week (it's a school holiday), so when he next get's bored (or it's a Mythbusters episode that he's already seen), then I'll show him this and see how quickly it picks it up. As somebody who opened the OLPC in about ten seconds having never seen one before, I don't expect it will take very long.
[Technorati Tag: Educational Software]
( Feb 21 2008, 08:57:55 AM PST ) [Listen] Permalink Comments [4]
Somebody's Alphametic Problem Solver
|
In my previous post, I said I'd been modifying a version of a alphametic problem solver from Anuj Prateek and Upendra Singh. According to the comments in the code, this was written by them in 2006. |
After googling around some more, I found very similar code by Naoyuki Tamura. In fact that version is much nicer. Clean. Well written. Proper indentation and comments.
Hmm. Makes me wonder whether Prateek and Singh stole Mr. Tamura's code and passed it off as their own, in order to get a good grade in some CS class. If that's the case, then shame on you.
( Feb 14 2008, 02:38:20 PM PST ) [Listen] Permalink Comments [3]
OpenSolaris Developer Preview 2 Available
|
There is now a second version of an x86-based LiveCD install image called OpenSolaris Developer Preview 2 (a.k.a. "Project Indiana") available for download. |
More details here.
Glynn Foster sent out an email on it to Sun bloggers email alias last night. There were pointers to the release notes and the list of bug fixes.
It also included this gem:
"Introduction of /usr/has/bin (experimental!), with /usr/bin/vi now linking to vim by default."
I had to quickly check the calendar to make sure it wasn't April 1st. Nope, it's not. Chuckling ensued. I'd like to thank whoever it was that came up with that great directory name. It brightened my day.
[Technorati Tag: Accessibility]
( Feb 13 2008, 05:26:24 AM PST ) [Listen] Permalink Comments [2]



















