I’m in the process of migrating most of my sites from DreamHost to BlueHost. Putting the reasons for the move aside (<cough>uptime</cough>), DreamHost has one major advantage over BlueHost: easy-to-setup SVN. On BlueHost, SVN isn’t installed, so it took a bit of research to figure out how to do it. I found installation instructions in a few places, but (1) they were all for version 1.4.6 (1.6.4 is the current version) and (2) they didn’t quite work for me. So, here’s how I went about it:
cd ~/src
wget http://subversion.tigris.org/downloads/subversion-1.6.4.tar.gz
wget http://subversion.tigris.org/downloads/subversion-deps-1.6.4.tar.gz
tar xzf subversion-1.6.4.tar.gz
tar xzf subversion-deps-1.6.4.tar.gz
cd subversion-1.6.4
./configure --prefix=$HOME
make
make install
cd ~
mkdir svn
cd svn
svnadmin create MyRepository
Pretty simple, overall. Subversion handles all of the dependencies automagically. The only non-standard bit there is the --prefix=$HOME to install it in my home directory (where I have write permission).
Now I can check out my repository with:
svn co svn+ssh://myUserName@mydomain.com/home/myUserName/svn/MyRepository
Notice the use of the svn+ssh protocol. BlueHost doesn’t have mod_svn enabled for Apache, so you can’t connect using HTTP.
Thanks to the Subversion / TortoiseSVN SSH HowTo and these instructions for remembering SSH passwords, I was able to save a session in PuTTY and use those settings to connect using a public key, so I don’t have to enter a password 400 times to check out the repository.
Categories: Etcetera | 2 Comments
Jonathan Brinley | 2009-08-16 22:47
A brief personal note: I have left my job at Ball State University so I can have more time to pursue my career as a freelance web developer.
For about two years, now, my wife and I have been building up our business, Adelie Design, Stephanie doing the design, me doing the coding. Business is good—good enough that working nights and weekends isn’t enough anymore (and doesn’t leave enough time to see the family!). So I’m “retiring”, which is to say that I’ll be staying home and working 40 fewer hours each week.
I’m glad to be leaving, but it’s been a pretty good four years at Ball State. To my colleagues and friends there: thank you. I hope to remain involved in libraries, and especially the code4lib community. Hopefully I’ll have some free time I can devote to “fun” projects.
If you, reader, know of anyone needing a web developer or designer, please have them contact me.
Categories: Etcetera | 2 Comments
Jonathan Brinley | 2009-06-30 16:00
Windows likes files to have names. If you tell windows to change the name of a file to “.htaccess“, it will complain: “You must type a file name.” It seems to think that “htaccess” is the file extension for a nameless file.
I just stumbled across a workaround, though. Name a file “.htaccess.” (notice the extra dot at the end). Windows (Vista, not XP) will remove the trailing dot and give you a file named “.htaccess“.
Categories: Coding | No Comments
Jonathan Brinley | 2009-04-25 11:17
A handy trick I just learned: you can use your hosts file to create subdomains of localhost.
For example, I have WordPress and Drupal both running on my machine for local web development testing. I used to access one at http://localhost/wp and the other at http://localhost/drupal. This works just fine, in general, but can lead to some awkwardness with things like .htaccess files and relative links when I move the site I’m developing to a real server.
By editing the hosts file, though, I can access my development sites at http://wp.localhost/ and http://drupal.localhost/, making it a little easier to test, migrate, etc.
In Windows (XP and Vista), you can find your hosts file in the C:\Windows\System32\drivers\etc directory. Add a couple of lines to the end of the file:
127.0.0.1 wp.localhost
127.0.0.1 drupal.localhost
And create virtual hosts in your Apache httpd.conf to point those domains to the correct directories. E.g.:
<VirtualHost *:80>
DocumentRoot D:\xampp\htdocs\drupal
ServerName drupal.localhost
</VirtualHost>
Categories: Coding | 4 Comments
Jonathan Brinley | 2009-04-17 21:57
As I mentioned recently, OCRopus OCR software output an hOCR file. What is hOCR? hOCR is an open standard for representing OCR results in an HTML document (not to be confused with HOCR). It is basically a microformat using div and span tags’ class and title attributes to convey information from the OCR process, as you can see from this example of a basic hOCR document:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="ocr_line ocr_page" name="ocr-capabilities"/>
<meta content="en" name="ocr-langs"/>
<meta content="Latn" name="ocr-scripts"/>
<meta content="" name="ocr-microformats"/>
<title>OCR Output</title>
</head>
<body>
<div class="ocr_page" title="bbox 0 0 2548 3300; image /path/to/scanned/image.png">
<span class="ocr_line" title="bbox 659 143 863 177">Some Text</span>
<span class="ocr_line" title="bbox 723 275 916 324">More Text</span>
</div>
</body>
</html>
For the more details, see Thomas Breuel’s complete hOCR specification draft. The example, though, shows all that I need to know. From the div[@class='ocr_page'], I can learn the dimensions (in pixels) of the image that was OCRed (as well as the path to that image on my machine). From a span[@class='ocr_line'], I can learn the location and dimensions of the bounding box around a line of recognized text, as well as the content of that line.
That information, along with a copy of the original image (or a sufficiently similar image) is enough to create a PDF of the image with selectable text.
More…
Categories: Coding, Libraries | 12 Comments
Jonathan Brinley | 2009-04-02 16:05