Archive for the ‘Tools’ Category

Restore Thunderbird’s missing folder pane

Friday, January 27th, 2012

Here’s what to do if your Folder Pane disappears. The Folder Pane is the left one that shows the tree of mail folders: Inbox, Sent, Drafts, etc. If there is no space there (the other panes extend to the left side of the window) it is probably just not displayed, and you can drag its resize bar from the left, or display it with the View menu.

But if the Folder Pane just comes up as a blank space, it could be due to a previous crash of Thunderbird, or corruption of some auxiliary files that need to be rebuilt. Here’s how to fix it:

  • Exit Thunderbird
  • Find your profile folder.  In Windows, you can navigate directly to your profile folder at the following path:
       C:\Users\<user>\AppData\Roaming\Thunderbird\Profiles\<profile>\
  • In Linux, look for it here:
       ~/.thunderbird/<profile>/
  • or here:
       ~/.mozilla_thunderbird/<profile>/
  • The AppData folder might be hidden: to show hidden folders, open a Windows Explorer window and choose
    “Organize → Folder and Search Options → Folder Options → View (tab) → Show hidden files and folders”
  • You can (should) make a backup copy of your profile folder now, in case something goes wrong
  • In the profile folder, rename the session.json and foldertree.json
    files (to session.json.bad and foldertree.json.bad)
  • Restart Thunderbird

If something goes wrong, you can restore your old session.json and foldertree.json files, then go searching for a different solution.

Convert 3ds files to obj with Blender

Tuesday, January 24th, 2012

Blender

3DS is an aging binary interchange format for 3D models. OBJ is another aging, but ASCII-based format for 3D models.

Here is a simple Python script that converts one or more files from 3DS format to OBJ format using Blender:

# Convert 3ds to obj using Blender
#
# Run as follows:
#   blender -b dummy.blend -P bl_3ds2obj.py — file.3ds …
#
# dummy.blend is just an empty Blender file needed as an argument.
# Put one or more .3ds files on the end of the command.
# The .obj files will be created with the same name (and path) as
# the .3ds file, but with the .obj extension.
# The export creates a .mtl file for each .obj file also.

import bpy
import sys
import os.path

for i in range(1, len(sys.argv)):
    if sys.argv[i] == "–":
        break

for file in sys.argv[i+1:]:
    # Start with an empty scene
    bpy.ops.object.select_all(action="SELECT")
    bpy.ops.object.delete()

    # Read a .3ds file
    bpy.ops.import_scene.autodesk_3ds(filepath=file)

    # Write a .obj file
    outfile = os.path.splitext(file)[0]+".obj"
    bpy.ops.export_scene.obj(filepath=outfile)

 

Save the script code in a file named blender_3ds2obj.py.  You will also need a Blender file to use as a placeholder in the command line.  You can save an empty file from Blender, or use an existing one.  Assume it is called dummy.blend.

To convert 3DS files, use the following command:

blender -b dummy.blend -P bl_3ds2obj.py — file1.3ds file2.3ds file3.3ds

Tack on as many 3DS files to the end of the command as you want.

Note:  This assumes that dummy.blend and bl_3ds2obj.py are in the same folder as your 3DS files.  If not, you will need to specify the proper path to each.

List: My Favorite Firefox Add-ons

Tuesday, December 6th, 2011

Firefox has lots of add-ons that make web browsing more pleasurable. There are many I have not explored, but these are my current favorites:

Tree Style Tab
Lets me have the tabs down the left side in a collapsable tree view. Saves screen real estate and makes more tabs readily accessible.
FireGestures
I find myself trying to use the same mouse gestures in other tools. I wish I could get this as a desktop add-on.
AdBlockPlus
Hides ads: rose-colored glasses for web browsing!
Firemacs
Old habits die hard: muscle memory lasting longer than other types.
DownThemAll!
Nice if you are trying to grab several large files at once.
FireBug
Great for figuring out why web pages don’t work.
Locationbar2
Adds some capability to the address field.
Searchbar Autosizer
Makes the search field big when you use it.
Xmarks
Keeps bookmarks synced between machines. I appreciate it when I move into a new computer.
KeeFox
Integrates the KeePass password manager with Firefox. Now I feel at least a little bit more secure.
Disconnect
Makes me feel like I’m not being tracked quite so much, but it breaks some Google things, so I have to turn off the Google blocking for Google Maps or logging in to a Google account.
Linkification
Currently disabled. Hasn’t kept up with the Firefox release cycle.

You can get add-ons for Firefox by typing about:addons in your Firefox browser’s address field.

Thunderbird Message Reading Order

Wednesday, July 27th, 2011

I finally went looking for one of my pet peeves with the Thunderbird email tool, and the Internet did not disappoint.

I like seeing my message list with the newest items at the top of the list, yet I normally read them oldest to newest.  When I finish reading a message and delete it, Thunderbird’s default behavior is to select and display the message below the previous selection in the list.  My newest-at-the-top sort order causes the next older message to be displayed, which is probably the one I looked at just prior to the one I deleted.  I want it to select the next newer message.

Turns out there is an option for this in Thunderbird’s config options.

Go to Tools->Options…, Advanced tab, Config Editor….
Change the option mail.delete_matches_sort_order to true.

Now if only someone would add the Reply/Reply All toggle that I’ve been pining for….

Open Command Prompt Here

Tuesday, May 10th, 2011

I still prefer the command line for many tasks. Sometimes it’s just faster. It can be a deterrent if you want to run some commands in a deeply nested folder, however. So I like the “Open Command Prompt Here” feature, which can be made available in Windows Explorer’s folder context menus.

In Windows 7 it is there, but hidden. Hold the Shift key and right mouse on a folder to see the context menu entry. In Windows Vista it is half there. Holding Shift while displaying the context menu only shows the hidden entry in the righthand pane of the Explorer Window. Prior to Vista, you need to use PowerToys or edit the registry to add the context menu item.

There is more information here.

Which Cygwin package contains a file?

Thursday, July 1st, 2010

Cygwin

You never have all the tools you need.  For Cygwin, I used to hunt through the package list and guess which package had what I was looking for.  Well there is a better way.  And someone else has already written about it.

This link tells you how to determine which Cygwin package contains a file.

In case that site disappears, here’s how (pretend we are looking for the strings command):

  • There’s a web way:
        http://cygwin.com/cgi-bin2/package-grep.cgi?grep=strings.exe
  • and there’s a command line way (if you already have Cygwin installed):

        cygcheck -p strings.exe

…and the answer is… binutils!

Terra Vista kills to_vsb.exe

Friday, April 30th, 2010

I have a Terra Vista project big enough that it takes about 6 hours to convert all the OpenFlight that gets generated to the fast-loading .vsb format.  I use the command line version of the to_vsb.exe tool because there are too many files for the GUI version to handle (because it tries to put them all into its scrolling list boxes).

I was nearing my delivery deadline, so I was doing some Terra Vista processing, and converting some .flt data that had already been generated.  I was waiting and waiting for to_vsb to finish.  Finally I decided to check the processes in the Task Manager.  to_vsb had disappeared!  I finally figured out Terra Vista was killing it, but why!?

Presagis Support had an explanation:  Terra Vista invokes to_vsb to convert its output.  When it is done using to_vsb, it kills all the to_vsb processes.  Not an elegant bit of programming, that.  Anyway, mystery solved.

Presagis suggests that if you want to run to_vsb and Terra Vista concurrently, you should make a copy of to_vsb.exe and rename it so TV won’t kill it.

Convert CSV to Shapefile in ArcView 9.3

Thursday, March 18th, 2010

This is so I don’t forget, since I’m an infrequent ArcView user.  I had a CSV file (text file with comma-separated values) that I wanted to convert to a point Shapefile.

Before I tried ArcView (because it is complicated) I tried a free tool called CSV to Shapefile Converter 2.0.  See below for more on that.

The ArcGIS docs tell you it can be done, but then describe how to import a text file with just 2 columns of data for X and Y point values.  You could do some shenanigans with OIDs and creating a separate table with the attribute fields, then joining them somehow.

Turns out there is an easy way to load the coordinates and the attributes all in one shot.  (I’m using ArcGIS Desktop 9.3.1.)

My input data looks like this:

x, y, z, name, tmapname, tmapsize, rlevel
40.778975, -111.899080, 1296.846000, slca_0434, R0_region_019, 2948400, 0
40.778956, -111.898698, 1297.241000, slca_0435, R0_region_019, 2948400, 0
40.778969, -111.898482, 1297.195000, slca_0436, R0_region_019, 2948400, 0
40.778753, -111.898620, 1297.972000, slca_0437, R0_region_019, 2948400, 0
40.777677, -111.898004, 1300.5800 ...

In ArcCatalog, navigate to your file, right mouse on it and select Create Feature Class -> From XY Table…

(more…)

VirtualBox Guest Additions

Sunday, March 14th, 2010

VirtualBox LogoMore than once I’ve needed to upgrade my VirtualBox Guest Additions (the piece that runs on the virtual machine and adds devices and capabilities that are needed by the imaginary hardware).  And I would always have a difficult time locating them on the Sun website.

The Guest Additions come as a .iso image file that VirtualBox can mount as a CD for your virtual machine to read.  You could also burn an actual CD from the image, but there is probably no reason.

You can find the Guest Additions, along with VirtualBox installers for many platforms, on the VirtualBox website, at:

http://download.virtualbox.org/virtualbox/

Thanks to Petr Dvorak’s blog for helping me find this information.