Call me Doc

I have a PhD!

Advertisements

First initials only in BibTeX

I have a great big .bib file for my thesis and some entries have full first names and some only have initials. For consistency, I want initials everywhere. Rather than edit these entries, I want to tell BibTeX to just use first initials. Thanks to this page, I realized this isn’t too bad.

I copied plain.bst (on a Mac with LaTeX installed using Fink, it ends up as /sw/share/texmf-dist/bibtex/bst/base/plain.bst) to custom.bst. Then, I found the line containing ‘format.name’ and changed ‘ff’ to ‘f.’, like this:

Before:
{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=

After:
{ s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=

And of course you must change / add the following before the \bibliography{} entry:
\bibliographystyle{custom}

pyvnc2swf: Capture Screen Video as Flash

I came across pyvnc2swf while looking for efficient ways to do screen capture. This is a really handy program that behaves as a VNC client and captures video of whatever happens. Of course, the VNC server can run locally so there need not be any network involved. The coolest part is that the video is output as a .swf file. The tool is even friendly enough to generate a little .html file so it’s ready to stick on a web page immediately.

There’s also an edit.py which can convert the .swf to .flv or .mpg, although Mpeg support requires PyMedia. I had trouble installing PyMedia, and have not gotten Mpeg support to work. Well, the .deb wouldn’t install on Debian Etch (because many of the required dependencies don’t exist for Etch), and it wouldn’t install on Ubuntu Intrepid Ibex (8.10) because liblame-dev is no longer an Ubuntu package (I think it’s been superseded by other packages but the PyMedia .deb doesn’t know that). Anyways, I suspect building it from source would work fine on Ubuntu but I haven’t tried it.

I also tried using a VGA2USB frame-grabber (several hundred dollars) from epiphan. I could only capture 640×480 video at 10~12 fps (not a problem by itself), and the results were quite noisy (too noisy to be useful for my purpose) in the ~500 MB .avi file that was produced. The .swf file of the same actions was less than 2 MB.

Building Ubuntu kernels “the right way”

I’ve lost count of how many different kernels I’ve built for different systems, but in the past I always grab the vanilla source from kernel.org and experiment to get the necessary hardware support. Today I decided to learn how to play nice with Ubuntu’s kernel build facilities. I followed these instructions without issue (except that they show a space between options like –initrd, where there should be no space). Here’s the short version for Ubuntu Intrepid Ibex:

# apt-get install kernel-package libncurses5-dev fakeroot wget bzip2
# apt-get install linux-source
# cd /usr/src
# tar xjvf linux-source-2.6.27.tar.bz2
# ln -s linux-source-2.6.27 linux
# cd linux
# cp /boot/config-2.6.27-9-generic ./.config
# make menuconfig
# make-kpkg clean
# fakeroot make-kpkg --initrd --append-to-version=jm1 kernel_image kernel_headers

# dpkg -i linux-image-2.6.27.2jm1_2.6.27.2jm1-10.00.Custom_i386.deb
# dpkg -i linux-headers-2.6.27.2jm1_2.6.27.2jm1-10.00.Custom_i386.deb

Linux Photography

My digital photo collection is growing beyond what iPhoto can comfortably handle. It seems that Apple Aperture and Adobe Lightroom and Bridge are the popular paid alternatives, but here are some interesting links I’ve found regarding free tools.

Joel Cornuz’s Linux Photography Blog, especially posts tagged Workflow.

DigiKam

gThumb

CinePaint

And some others to investigate: Iview and ACDsee.