Entries from May 2008
May 29th, 2008 — Programming, Ubuntu
For the Tar Heel Reader project I needed to convert very simple multi-page WordPress posts into PowerPoint slide shows. I chose the circuitous route of making an OpenOffice Impress show by bashing XML and then converting it to PowerPoint. I manually created a prototype slide show with a title page and a single book page in Impress and saved it in their native .odp format. These files are simply zip archives containing several XML documents and the images. Why they didn’t include the sounds, I don’t understand. The important file is content.xml. Examining it in Firefox revealed the bits I’d have to change on the title page and for each page of the book. I found several useful hints in a Linux Journal article by Collin Park. I used the PHP DOM module to read in the prototype, update it for the current book (retrieved with the WordPress get_post function), and write it out along with the images. Zipping this result up produces a new Impress presentation for the book.
Then I needed to convert the Impress format to PowerPoint. Thankfully, I found PyODConverter to automate that part of the job. It worked fine when I ran it from the command prompt but I could not get it to find the server when I ran it from PHP. Again the web came to my rescue with a post by Piero. I’ll reproduce the code here so I don’t forget it.
cd /var/www #www-data user home
sudo mkdir .openoffice.org2 #create the openoffice working dir
sudo chown -R www-data:www-data .openoffice.org2 #set the owner
sudo chmod 700 .openoffice.org2 #change permissions
sudo -s #you need to be root
su - www-data #if you want to be www-data
#start openoffice headless
xvfb-run -a soffice -accept="socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -nologo -headless -invisible
Now I need to figure out how to get this into /etc/init.d so that it will automatically start on reboot.
May 21st, 2008 — Enabling Technology, Programming
I really like using Wordpress for my website and blog but I hadn’t thought until recently about using it as an application framework. Karen and I talked about a site to enable teachers to quickly build topical beginning readers for people with varied interests and abilities. I began thinking about the features such a site would have and found lots of overlap with what Wordpress already provides. A blog post by Steve Winton over at NixonMcInnes encouraged me to examine the possibilities further.
I’m pleased to report that it is really easy to integrate a PHP web-app into Wordpress. I use ordinary blog posts as the books with the <!–nextpage–> tag for pagination and a bit of Javascript for switch accessibility and text to speech. The book creator wizard is simply a set of pages with custom templates. You select some images, provide some captions and a title, and it creates the blog post that is your book. Wordpress provides logins, all the database manipulation, comments, tags, categories, etc. Redirects work fine because Wordpress is silent until you invoke get_header. Query parameters work fine; Wordpress seems to ignore them. Session variables work fine too. So far Wordpress hasn’t gotten in my way once and has helped a ton.
May 21st, 2008 — Blind, Enabling Technology, Links
May 14th, 2008 — Enabling Technology, Ideas, Literacy, Motor impaired
Notes from a conversation with Karen. Always great fun.
Continue reading →
May 9th, 2008 — Ubuntu
I recently upgraded my D800 to Ubuntu Hardy. Things seem to be working fine. Looking through the packages available I saw that I could get sensors-applet to monitor internal temperature sensors. This showed that my GPU was running near 75 degrees C.The nvidia-settings tool showed I was running at Performance Level 2 and appeared to be stuck there. I searched a bit and found other people looking for the same info and got a few hints. After some fooling around I found the following commands would cool things off. They may reduce performance but I don’t need it.
nvidia-settings --assign="GPUOverclockingState=1"
nvidia-settings --assign="GPU2DClockFreqs=100,230"
nvidia-settings --assign="GPU2DClockFreqs=100,230"
Yes, I know that I’m setting the 2D Clock Freqs twice. The first time seems to move it to Performance Level 1 and the second time drops it to level 0 where I want to be. I got the numbers from the nvidia-settings on the Power Mizer tab.
I put those commands in a script and run it using the Sessions facility I found at System->Preferences->Sessions.
May 9th, 2008 — Recipes
From: http://fp.enter.net/~rburk/sauce-rub-marinade/barbecuesauce/easternn.txt
1 cup White vinegar
1 cup Cider vinegar
1 tablespoon Sugar
1 tablespoon Crushed red pepper flakes
1 tablespoon Tabasco sauce
Salt to taste
Freshly cracked black pepper to taste