Written by Doug Bell
Version 0.4.3
September 24, 2009
Why write another unit converter? There are plenty of them out there. Well, I couldn't find one that worked quite the way I wanted.
With ConvertAll, you can combine the units any way you want. If you want to convert from inches per decade, that's fine. Or from meter-pounds. Or from cubic nautical miles. The units don't have to make sense to anyone else.
Since I'm not in the software business, I'm making this program free for anyone to use, distribute and modify, as long as it is not incorporated into any proprietary programs. If you like the software, feel free to let others know about it. And let me know what you think - my email address is doug101 AT bellz DOT org
ConvertAll is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either Version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. See the LICENSE file provided with this program for more information.
ConvertAll requires the following libraries:
These libraries are relatively new - packages may not be available for your distribution. In that case, an earlier version of ConvertAll (0.3.2) that depends on older libraries is still available.
Using the files provided in the binary distribution, ConvertAll should run on any computer running Win 95, 98, NT, 2000, or XP.
Extract the source files from the convertall tar file, then change to the ConvertAll directory in a terminal. For a basic installation, simply execute the following command as root: python install.py
To see all install options, use: python install.py -h
To install ConvertAll with a different prefix (the default is /usr/local), use: python install.py -p /prefix/path
Simply execute the downloaded installation file (convertall-x.x.x-install.exe). It will install the program with its libraries and optionally create file associations and shortcuts.
If you already have a working installation of ConvertAll version 0.3.0 or higher, you can use a smaller download. Simply install and execute convertall-x.x.x-upgrade.exe to upgrade the files from your previous installation.
If you wish to modify the source code or write your own PyQt programs for Windows, do not use the above procedure. Instead, you need to install Python and the binary for PyQt. Then extract the source code and data files from the Linux version (convertall tar file) to a directory of your choice and execute the convertall.py file.
Simply type a unit name in the "From Unit" edit window. As you type, the list below the window will scroll to show unit names which are close matches. Either type the complete unit abbreviation or unit name or hit the return key to use the unit highlighted in the list. Of course, clicking with the mouse on a unit in the list will also add the unit to the edit window. You may also use the up and down arrow keys to select nearby units from the list.
Repeat the unit selection in the "To Unit" edit window. When done, if the units are compatible, you will see the numeric edit windows below the unit lists activate. A number may be entered into either numeric window and the other window will display the conversion result.
The real strength of ConvertAll lies in its ability to combine multiple units. Simply type the unit names with an '*' or a '/' between them. This allows the entry of units such as "ft*lbf" or "mi/hr". The '^' symbol may be used for exponents, such as "ft^3" or "ft*lbm/sec^2". Negative exponents are allowed for units such as "sec^-1" (per second), but may switch the multiplication or division symbol ("ft*sec^-2" becomes "ft/sec^2").
Multiplication has a higher precedence than division, so that "m / sec * hr" means "m / (sec * hr)". Similarly, "m / sec / hr" is the same as "m * hr / sec" (but the latter is less confusing).
The buttons below the unit lists ('X', '/', '^2', '^3') will also place the operators after the unit nearest to the cursor. The exponent keys will replace the unit's exponent.
Similarly, clicking on a unit from the list generally replaces the unit nearest the cursor.
The "Erase Unit" button below the operator buttons may be used to empty the unit edit window to allow a new unit to be entered.
When typing unit names, spaces are ignored, so they may be skipped. It is also generally ignored if a plural form of the unit name is typed. When a partially typed unit is highlighted in the list, hitting enter will complete the name. Also, hitting the tab key will complete the name and move to the next entry field.
The number to be converted may be entered in either the "From" or "To" unit side. Standard or scientific notation may be used, or an expression including the normal math operators (+, -, *, /, **) and parenthesis may be entered.
The unit finder can be used to filter units by type and/or search for units using a text string. It displays a separate unit list in a new window. The list will be updated based on the filter and search string entries.
Buttons near the bottom of the finder window add the selected unit to the units in the main window. The "Replace" buttons replace an entire combined unit with the selection. The "Insert" button changes only the part of a combined unit that is active (at the cursor in the main window).
The "Options..." button allows for changing several default settings. These settings are automatically stored so that ConvertAll will re-start with the settings last used.
The first options control the display of numerical results, including the use of scientific notation and the number of decimal places. Be cautious about setting the number of decimal places to a low value, which can result in a significant loss of accuracy. Six places or higher is recommended (eight is the default).
There is an option to hide the operator text option buttons (x, /, ^2, ^3 and Clear Unit). These can be hidden to save space if the keyboard will be used to enter the operators.
Buttons are also included on the options dialog to control the colors of the text fields.
The conversion of some units is non-linear. Examples of these include the Fahrenheit and Celsius temperature scales (due to an offset zero point) and the American Wire Gauge (logarithmic). The non-linear units are labeled as such in the comments column (located to the right of the "Type" column).
These units can be converted only when they are not combined with other units or used with an exponential operator. Otherwise the conversion would not be meaningful.
Conversions may be done from the command line (Linux or DOS console) without invoking the graphical interface. Enter the command ("convertall"), the number, the from unit and the to unit (separated by spaces) to do the conversion. Unit names containing spaces should be surrounded by quotes. Or, to be prompted for the entries, enter "convertall -i" on the command line.
After the conversion is done, ConvertAll will prompt for a new number to do the same conversion. Or "r" can be entered to reverse the conversion or "q" to quit.
For a more detailed list of options, enter "convertall -h" on the command line.
Initial release.
I can be contacted by email at: doug101 AT bellz DOT org
I
welcome any feedback, including reports of any bugs you find. Also, you
can periodically check back to www.bellz.org for any updates.