osx

How to print multiple address labels from address book on the Mac

It is holiday cards time and every year I go through trying to remember to print address labels from my Mac OSX Contact app. The short answer? It is really simple.

Create a CSV File for Export from Contacts?

Contacts Export Options

No. This is not the way. But the old school me always start thinking down this road. Then I realized there is no "export to CSV" feature in Contacts. You can however drag contacts into Numbers and the contacts will automatically converts to a table.

Mail Merge directly from MS Word?

No. Or rather, you could do this. If you create a new document from the "label wizzard" template in MS Word on the Mac, it will ask for permissions to access your address book. Allow it. (You could also enable the access via the Security & Privacy settings in System Preferences.) But frankly I cannot figure out how to use the mail merge feature in MS Word. Too complicated.

The Mac Way

Print Labels from Contacts

Even as a long time Apple convert, I still am amazed by these obvious answers when using Apple product. You want to print multiple addresses from your Contacts (address book) on your Mac onto Avery 5160 label sheets? You just do the obvious:

  1. Open your contacts application
  2. Select the contacts you want to print: I have all my holiday cards contact assigned to a group, so I select the group and do a select all to highlight all the contacts
  3. Select File / Print / Labels and pick the right Avery label type
  4. print

No need to do export, conversions, merges. Just print labels.

Review of Delineato Pro, a light weight diagramming tool for the Mac

I came across Delineato Pro almost by chance while browsing the App Store. A quick googling around, after reading the developer interaction with his users on macrumors forum, I bought it just to try it out. I wrote the review with it as you can see below. For the search engine: I recommend giving a try, especially if you are frustrated with the complicated feature set of OmniGraffle, and find pure mind mapping tools too restrictive in terms of layout.

Amazon shuts down Special Occasion Reminder, adding birthday to address app in OSX

I received an email from Amazon at 3 am EST this morning telling me that they are shutting down the Special Occasion Reminder service. They are converting these reminders to their (new?) Friends & Family Gifting service. I understand that they are trying to encourage people to buy things from Amazon for these birthdays as gifts, but do they have to externally rename the service? If you have been a long time Amazon customer like myself, some of the very old reminder setup did not have a marker to say that the reminder is for a birthday. Those older reminders will not be converted. What to do? I can add those reminders back to the new service, or I can add the birthdays to my address book database on my Mac. I updated my address book on the Mac. This is how:

Adding Birthday field to the Address book app on the Mac

  1. Go to the Preferences menu
  2. Click on the Templates button
  3. Click Add Field and select Birthday
  4. Voila ! Each contact in the address book now has a birthday field

 

Mac Bluetooth wireless keyboard tips and tricks

[flickr size=small float=right]http://www.flickr.com/photos/pkshiu/5672596240/[/flickr]I bought a new bluetooth wireless keyboard for my MacBook Pro to reduce clutter at my home office. Immediately I run into a few "problems" that can easily be solved.

Volume keys do not work

The top of the bluetooth keyboard has all the special keys to control volumne, play/pause etc. I was so disapponted that they do not work! They invoke the normal function key functions instead, running spaces etc. Then I remembered. I most likely have to install the latest keyboard driver. Click on the Apple menu, software update, downloaded the new driver, and all is well. This happened when I added the magic mouse as well. So, remember to run software update after adding new hardware.

[flickr size=small float=right]http://www.flickr.com/photos/pkshiu/5672036643/[/flickr]

Changing the Caps Lock Key to Control

This is for the hardcore programming using emacs. We live by the control key. Almost all modern keyboard move the control key to somewhere horrible. Well, OS X (bless Apple) actually have a system wide setting that let you change the pretty much useless Caps Lock key into Control .Just go to System Preferences, Keyboard, Keyboard Tab, modifier keys and change the mapping for the "Caps Lock" key to "Control". Your hands will thank you.

Upgrading to Leopard breaks iPhone syncing in iTunes

This has been a very Apple centric month. I finally upgraded my very first mac, a pre-Aluminium iMac from Tiger to Leopard. The upgrade process was very easy. The next morning, I discovered that my new iPhone is no longer recognized by iTunes ! It worked before the upgrade. The problem only exists with iTunes. When I plug the iPhone into the system, Aperture starts up recognizing the photos. So it seems to be an iTune only problem. A quick search on the Apple support site reveals that this is a known problem. Just download iTunes and reinstall (ever though it is already at the right version) solves the problem.

More info at Apple support discussion group here.

gettext on Leopard for Django Internationalization

I started working on one of my internationalized applications on the new Mac. I realized I did not install "gettext", which is required by the make-messages and compile-messages scripts. I want to avoid installing things into OS X if I can. Then I found the easy way out: 1. Install poedit for os x. I need this to edit po files anyway. You can download it here. 2. There is no step two -- poedit for OS X comes with (obviously) all the gettext tools.

o.k. There is a little step two. You want to include the path to those tools when you run compile-messages. Create a little script like this:

PATH=$PATH:/Applications/Poedit.app/Contents/MacOS/ python /Library/python/2.5/site-packages/django/bin/compile-messages.py

and run this script instead of running compile-messages directly.

Django on Leopard

Part of the reason I was waiting to switch from using Windows XP (gasp) as my Django development platform to OS X is that it is actually easier to install the platform on XP. Windows does not come with any of the tools, so it was a matter of installing the version that I need. For OS X, it had a older version of python, so I would have to have multiple versions of it running. But Leopard changes all that. So I switched! Running Django on os x becomes much easier with Leopard. Out of the box Leopard comes with almost everything I need :

Python is at version 2.5.1 • svn is at version 1.4.4 • SQLite is at version 3.4 with python library installed

For development, I use SQLite and the built in web server only. I run Postgres on the production boxes. Because I do not have to install Postgres, getting Django setup is just a matter of setting up the rest of the environment:

Install Django

You can just download the installation tarball and do a standard Python install. But to have a little more flexibility in switching Django versions, I download both the production and trunk versions of Django into my own directory. Then using a soft link I can switch between the two. Download Django into my own home directory, under extlib, where I put all the external libraries. Then link from the Python site-packages directory to my own Django directory. By switching where that link points, I can switch version.

# Make directory and download two versions of Django: cd $HOME mkdir extlib cd extlib svn co http://code.djangoproject.com/svn/django/tags/releases/0.96.1 django-0.96 svn co http://code.djangoproject.com/svn/django/trunk/ django_trunk

# Then symlink instead of installing the django code into the Python site-packages, which is at # at /Library/Python/2.5/site-packages on my machine.

sudo ln -s ~/extlib/django-0.96/django django

Note: You can find the location of the library by running a simple python statement:

python -c ' import sys; print sys.path'

and look for the site-packages directory.

Setup Shell

I need to setup my shell environment so that my (multiple) Django projects can find Django. If you need help in figuring out where to put things, bashrc vs bash_profile etc, this article explains how and where to put things very well. Most importantly, add the django bin directory to your path:

PATH=$PATH:/Library/Python2.5/site-packages/django/bin Note: I am adding the Django bin directory to the PATH via the python site-packages link. That way if I switch Django versions via the site-packages link, the PATH will switch automatically!

Python Image Library

I need to use this for image processing. I thought I could get away from installing the free Apple developer tools but I couldn't. I have to install the Apple XCodeTools set first, from the OS X installation CD. Then download the source files here .

Before running the install, you also need to get the libjpeg for JPEG support:

Dowload the source at http://www.ijg.org/files/jpegsrc.v6b.tar.gz untar it, cd into the jpeg-6b directory and then:

cp /usr/share/libtool/config.sub . cp /usr/share/libtool/config.guess . ./configure --enable-shared make sudo mkdir -p /usr/local/include sudo mkdir -p /usr/local/bin sudo mkdir -p /usr/local/lib sudo mkdir -p /usr/local/man/man1 sudo make install

The following the PIL build instructions:

edit the setup.py file, add the lines instead of setting them to None:

JPEG_ROOT = "/usr/local/include" ZLIB_ROOT = "/usr/local/include"

then run:

python setup.py build_ext -i python selftest.py sudo python setup.py install