<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Millards Corner &#187; recipes</title>
	<atom:link href="http://www.edfu.org/category/recipes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.edfu.org</link>
	<description></description>
	<lastBuildDate>Sat, 14 Jan 2012 14:01:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>CONTENTdm to DSpace</title>
		<link>http://www.edfu.org/contentdm-to-dspace/</link>
		<comments>http://www.edfu.org/contentdm-to-dspace/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 16:17:51 +0000</pubDate>
		<dc:creator>millarj</dc:creator>
				<category><![CDATA[CONTENTdm]]></category>
		<category><![CDATA[DSpace]]></category>
		<category><![CDATA[OhioLINK]]></category>
		<category><![CDATA[recipes]]></category>

		<guid isPermaLink="false">http://www.edfu.org/?p=47</guid>
		<description><![CDATA[There are probably lots of ways to do this, but this is mine.  As part of our migration to the OhioLINK DRC I&#8217;ve created a quick php script to 1) take the default export format of CONTENTdm, 2) translate a mapping of fields to the appropriate dSpace ones, and 3) create the DSpace bulk submission [...]]]></description>
			<content:encoded><![CDATA[<p>There are probably lots of ways to do this, but this is mine.  As part of our migration to the <a href="http://tinyurl.com/lzgf5o">OhioLINK DRC</a> I&#8217;ve created a quick php script to 1) take the default export format of CONTENTdm, 2) translate a mapping of fields to the appropriate dSpace ones, and 3) create the DSpace bulk submission package for it.  You will need php5+ running on a unix-like system with allow_fopen set to true.  It may work on Windows, but I haven&#8217;t tested it and I probably won&#8217;t.  You could <a href="http://www.ubuntu.com">upgrade your Windows</a> Installation and have better luck though.</p>
<p>You can find the scripts here.  CAVEAT: These are ugly hacks at best  <a href="http://staff.lib.muohio.edu/~millarj/cdmtab2dspace/">http://staff.lib.muohio.edu/~millarj/cdmtab2dspace/</a></p>
<p><strong>Instructions:</strong></p>
<ol>
<li>Export your data from CONTENTdm in the control panel.  Select a Tab Delimited export and make sure to check &#8220;Return field names in first record&#8221; <img src="http://calvin.edfu.org/wp-content/uploads/2009/08/cdm-export.jpg" alt="cdm-export" title="cdm-export" width="434" height="81" class="alignnone size-full wp-image-48" /></li>
<li>Next, open the resulting text file in a spreadsheet application of your choice.  If you don&#8217;t want to munge dates and other non-text data, make sure each column is imported as the &#8220;Text&#8221; type.  Excel for example, has a hard time with ISO dates.
</li>
<li>Add a row to the top of the spreadsheet and place the appropriate DSpace fieladn mes (minus the dc. prefix) above the CONTENTdm field to be mapped.  If you want to skip a field, just use &#8220;skip&#8221; as the DSpace field label.</li>
<li>Save it back out as a tab-delimited file.</li>
<li>Download the script and edit it to customize to your hearts content.</li>
<li>Run the script from a unix/linux/macosx commandline &#8220;php cdmtab2dspace.php&#8221;</li>
</ol>
<p>At the top of the script are various customizations/configurations.  To see how things will look, set $test_mode = &#8220;on&#8221;   When ready to run it live, change that bit to &#8220;off&#8221;</p>
<p>In particular, customize/rewrite the &#8220;move_bitstreams&#8221; function to, you guessed it, move the bitstreams (digital objects) from wherever you have them into the submission package.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edfu.org/contentdm-to-dspace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing filename case in bash</title>
		<link>http://www.edfu.org/changing-filename-case-in-bash/</link>
		<comments>http://www.edfu.org/changing-filename-case-in-bash/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 16:01:53 +0000</pubDate>
		<dc:creator>millarj</dc:creator>
				<category><![CDATA[recipes]]></category>

		<guid isPermaLink="false">http://www.edfu.org/?p=30</guid>
		<description><![CDATA[I keep having to google for this, so I decided to write it down here. This is how to change the case of every file in a directory to lowercase. It&#8217;s a great way to fix the case insensitivity seen when moving files from a windows filesystem to a Unix-y one. We have several windows [...]]]></description>
			<content:encoded><![CDATA[<p>I keep having to google for this, so I decided to write it down here.  This is how to change the case of every file in a directory to lowercase.  It&#8217;s a great way to fix the case insensitivity seen when moving files from a windows filesystem to a Unix-y one.   We have several windows PC&#8217;s in our lab for special machines with windows only requirements.</p>
<p>When in the directory where the files are stored, issue this command from the Bash shell prompt</p>
<p><code>for i in `ls`; do mv $i `echo $i | tr '[A-Z]' '[a-z]'`; done</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.edfu.org/changing-filename-case-in-bash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Regular Backup solution for a MacBook Pro</title>
		<link>http://www.edfu.org/regular-backup-solution-for-a-macbook-pro/</link>
		<comments>http://www.edfu.org/regular-backup-solution-for-a-macbook-pro/#comments</comments>
		<pubDate>Mon, 23 Jul 2007 20:19:21 +0000</pubDate>
		<dc:creator>millarj</dc:creator>
				<category><![CDATA[recipes]]></category>

		<guid isPermaLink="false">http://penfold.edfu.org/regular-backup-solution-for-a-macbook-pro/</guid>
		<description><![CDATA[About a year ago, I gave up my G5 tower and began using a MacBook Pro as my primary desktop computer.  So far, it's worked out fine. I have the desktop power I need at work complete with <a href="http://www.flickr.com/photos/johnedfu/544684719/">external keyboard, mouse, and Cinema Display</a> and I have the mobility I need to work at home or on the road.  The only problem is making sure that everything is backed up regularly so that if anything happens while the machine is "in the wild" I won't have to worry about losing everything.]]></description>
			<content:encoded><![CDATA[<p>About a year ago, I gave up my G5 tower and began using a MacBook Pro as my primary desktop computer.  So far, it&#8217;s worked out fine. I have the desktop power I need at work complete with <a href="http://lh6.google.com/john.millard/R7GvRTCvTmI/AAAAAAAAANM/_7dl2UfkR8Y/544684719_afcb786ce0_o.jpg?imgmax=640" rel="lightbox[post5]" title="          ">external keyboard, mouse, and Cinema Display</a> and I have the mobility I need to work at home or on the road.  The only problem is making sure that everything is backed up regularly so that if anything happens while the machine is &#8220;in the wild&#8221; I won&#8217;t have to worry about losing everything.<br />
<span id="more-171"></span><br />
We have a Tivoli backup system at work, which works great for desktops since they can be left on at night to run schedule backups.  Leaving the laptop at work overnight kinda defeats the purpose of &#8220;mobile&#8221; computing, so I came up with this method to give me a little peace of mind.  Note:  When OSX Leopard hits, <a href="http://www.apple.com/macosx/leopard/features/timemachine.html">Time Machine</a> may replace this method for me.<br />
<strong>Update</strong>:  As expected, Time Machine is WAAAY cool and has replaced my homegrown system.  Still, this method works well if you don&#8217;t have Leopard yet, so I&#8217;ve left it up.  Enjoy</p>
<p>Ingredients:</p>
<ol>
<li>External Firewire drive, at least as big as the internal drive on the Macbook Pro.</p>
<li>Freeware utility, &#8220;Do Something When&#8221; (DSW) http://www.azarhi.com/Projects/DSW/
<li>Rsync and some scripting Glue
<li>Platypus for bundling up that cool script: http://www.sveinbjorn.org/platypus
<ol>
Steps:</p>
<ol>
<li>Hookup and format External drive.  Give it a simple volume name.  Mine is &#8220;MaxtorBackup&#8221;  Avoid spaces, it will make your life easier.</p>
<li>Download and install DSW and Platypus.  DSW installs as a preference pane.
<li>Open up the Terminal and create a folder for your scripts.  I recommend something simple like &#8220;/Users/<username>/scripts&#8221;
<li>In the scripts directory, create a shell script called &#8220;backup.sh&#8221;  In it, place the following code:
<p>	<code>  if [ -e "/Volumes/MaxtorBackup" ]; then<br />
     rsync -aE ~/ /Volumes/MaxtorBackup/backup<br />
osascript <<eof<br />
tell application "System Events"<br />
activate<br />
set dd to display dialog ""Home" Folder nBacked up Successfully" buttons {"OK"} default button 1 giving up aft<br />
er 30<br />
set UserResponse to button returned of dd<br />
end tell<br />
EOF</p>
<p> else<br />
osascript <<eof<br />
tell application "System Events"<br />
activate<br />
set dd to display dialog "Please mount MaxtorBackup first!" buttons {"OK"} default button 1 with icon caution giv<br />
ing up after 30<br />
set UserResponse to button returned of dd<br />
end tell<br />
EOF<br />
fi<br />
</code></p>
<li>Use Platypus to wrap your script up in an apple Application Bundle.  I'll leave that as an exercise for the reader (RTM).
<li>Create an action in DSW:<br />
- Open up the preference pane and create a new rule that waits for MaxtorBackup to come online and runs your bundled script when it does. Make sure that "Automatically Start on Logon" is checked.</p>
<ol>
That's pretty much it.  Every time your backup device comes online, up pops your application and rsync syncs over anything that has changed since the last time.  I've got mine set to sync only my home folder since everything else is more easily rebuilt from scratch (applications etc)  You could just as easily modify the script to sync changes on your whole drive, but if you were doing that you might as well use Carbon Copy Cloner to create a clone of your drive periodically.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edfu.org/regular-backup-solution-for-a-macbook-pro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting DjVu to PDF</title>
		<link>http://www.edfu.org/converting-djvu-to-pdf/</link>
		<comments>http://www.edfu.org/converting-djvu-to-pdf/#comments</comments>
		<pubDate>Fri, 08 Dec 2006 21:02:06 +0000</pubDate>
		<dc:creator>millarj</dc:creator>
				<category><![CDATA[Digital Libraries]]></category>
		<category><![CDATA[recipes]]></category>

		<guid isPermaLink="false">http://penfold.edfu.org/converting-djvu-to-pdf/</guid>
		<description><![CDATA[Ok, so say you have a bunch of bundled djvu files. djvu has many advantages over pdf in quality and size, but you just can&#8217;t beat pdf for it&#8217;s ubiquity. The djvu viewer on the mac is pretty flaky too. My latest problem with it is that the djvu looks stunning on screen but looks [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so say you have a bunch of bundled djvu files.  djvu has many advantages over pdf in quality and size, but you just can&#8217;t beat pdf for it&#8217;s ubiquity.   The djvu viewer on the mac is pretty flaky too. My latest problem with it is that the djvu looks stunning on screen but looks fuzzy when printed.  For a project we have here, students needed to print the djvu files of musical scores so they could easily reference the hard copy whileentering the notation in Finale.  That&#8217;s the setup.  Using a couple of open source tools and some php glue, here&#8217;s a quick solution to batch conversion of djvu to pdf.  You need the djvulibre tools and imagemagick.  You also need some bundled djvu files.<br />
<span id="more-9"></span><br />
Here&#8217;s the script:  It uses lots of execs, so it&#8217;s probably not something you want to be run by the public.  I run this through the command-line and then pass the output to bash.  Using print statements instead of execs lets me run the commands individually if I want to test them out and see any errors.  Using an exec will work as well if you&#8217;re confident that you don&#8217;t have any weird djvu&#8217;s in your list</p>
<p><i>Usage:  php4 convert.php <name of djvu omitting the extension> |sh</i><br />
<code><br />
$file = $argv[1];<br />
$file = $file . ".djvu";<br />
$stem = ereg_replace(".djvu", "", $file);<br />
$pages = exec("djvudump $file |grep INFO |wc -l");</p>
<p>for ($i = 1; $i <= $pages; $i++)<br />
{<br />
print "ddjvu -page=$i -format=tiff $file $stem-$i.tiffn";<br />
$pdf_string = $pdf_string . " $stem-$i.tiff";<br />
}<br />
print "convert -adjoin $pdf_string -format pdf $stem.pdfn";<br />
print "rm *.tiffn";<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.edfu.org/converting-djvu-to-pdf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

