Wednesday, April 21, 2010

iTunes 9.1 Smart Playlist Order Fix

Today I reset my 30GB video iPod and all of the smart playlists broke. Some were sorted in the wrong order (by name), some had no contents, and some were missing entirely.

I found a few references to the same problem:

iTunes 9.1 - Smart Playlist Sort Order Still Wonky
iTunes 9 + Smart Playlist + Live Updating + iPhone = FAIL
Preserving smart playlist order on iPhone

and then this "fix" from Apple

None of those solutions worked for me. What did seem to work was to set iTunes to sync all copies of all podcasts (the default was to sync only unplayed).

Picture 1.png

Monday, April 19, 2010

more virtualenvwrapper enhancements

Yesterday I released version 2.1 of virtualenvwrapper. The primary purpose of this release is a set of enhancements to support virtualenvwrapper.project, a new extension to manage project
work directories with templates.

The base project plugin gives you automatic creation of work directories to hold sources and other artifacts for a project. Each time you run mkproject you'll get a virtualenv and a matching directory in $PROJECT_HOME. Continuing the theme of extensibility, there is also a new API for creating project "templates". A template has complete access to the virtualenv and project directories, and can install software, configure it, set up source repositories, etc. Anything you need to do on a regular basis when starting work on a new project.

To illustrate the utility of project templates, I also released virtualenvwrapper.bitbucket, a template to automatically clone a Mercurial repository from BitBucket each time a new project is created.

Here's an example of all three working together:


$ mkproject -t bitbucket virtualenvwrapper.bitbucket
New python executable in virtualenvwrapper.bitbucket/bin/python
Installing distribute.............................................
..................................................................
..................................................................
virtualenvwrapper.user_scripts Creating /Users/dhellmann/.virtualenvs/virtualenvwrapper.bitbucket/bin/predeactivate
virtualenvwrapper.user_scripts Creating /Users/dhellmann/.virtualenvs/virtualenvwrapper.bitbucket/bin/postdeactivate
virtualenvwrapper.user_scripts Creating /Users/dhellmann/.virtualenvs/virtualenvwrapper.bitbucket/bin/preactivate
virtualenvwrapper.user_scripts Creating /Users/dhellmann/.virtualenvs/virtualenvwrapper.bitbucket/bin/postactivate

Creating /Users/dhellmann/Devel/virtualenvwrapper.bitbucket
Applying template bitbucket
virtualenvwrapper.bitbucket Cloning ssh://hg@bitbucket.org/dhellmann/virtualenvwrapper.bitbucket
requesting all changes
adding changesets
adding manifests
adding file changes
added 3 changesets with 10 changes to 8 files
updating to branch default
8 files updated, 0 files merged, 0 files removed, 0 files unresolved
(virtualenvwrapper.bitbucket) $ ls
src
(virtualenvwrapper.bitbucket) $ cat src/.hg/hgrc
[paths]
default = ssh://hg@bitbucket.org/dhellmann/virtualenvwrapper.bitbucket


virtualenvwrapper 2.1 also includes several smaller changes and bug fixes (including the pernicious TMPDIR problem several users have reported).

Tuesday, April 6, 2010

major new release of virtualenvwrapper

I'm pleased to announce the release of virtualenvwrapper 2.0. This new version uses a significantly rewritten version of the hook/callback subsystem to make it easier to share plugins for enhancing developer workflow. For example, released at the same time is virtualenvwrapper-emacs-desktop, a plugin to switch emacs project files when you switch virtualenvs.

I also took this opportunity to change the name of the shell script containing most of the virtualenvwrapper functionality from virtualenvwrapper_bashrc to virtualenvwrapper.sh. This reflects the fact that several shells other than bash are supported (bash, sh, ksh, and zsh are all reported to work). You'll want to update your shell startup file after upgrading to 2.0.

The work to create the plugin system was triggered by a couple of recent feature requests for environment templates and for a new command to create a sub-shell instead of simply changing the settings of the current shell. The new, more powerful, plugin capabilities will make it easier to develop these and similar features.

I'm looking forward to seeing what the community comes up with. I especially want someone to write a plugin to start a copy of a development server for a Django project if one is found in a virtualenv. You'll get bonus points if it opens the home page of the server in a web browser.

Updated: Existing user scripts should continue to work as-written. Any failures are probably a bug, so please report them on the bitbucket tracker. Documentation for the new plugin system is available in the virtualenvwrapper docs here.