<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>hi, it&#39;s mike</title>
    <link>https://mike.puddingtime.org/tags/drupal/</link>
    <description>Recent content on hi, it&#39;s mike</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <managingEditor>mike@puddingtime.org (mike)</managingEditor>
    <webMaster>mike@puddingtime.org (mike)</webMaster>
    <copyright>© 2026, mike</copyright>
    <lastBuildDate>Fri, 01 Jun 2012 07:24:17 +0000</lastBuildDate>
    <atom:link href="https://mike.puddingtime.org/tags/drupal/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Epochal Automator</title>
      <link>https://mike.puddingtime.org/posts/2012-06-01-epochal-automator/</link>
      <pubDate>Fri, 01 Jun 2012 07:24:17 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2012-06-01-epochal-automator/</guid>
      
      <description>When Drupal thinks of time, it thinks in Unix timestamps. That is good for computers, not so good for me when I&#39;m staring at a quick database query and just need to know when something happened, was saved, or will be updated next.
Several months back my friend Sam asked for a way to quickly convert …</description>
      <content:encoded><![CDATA[<p>When Drupal thinks of time, it thinks in Unix timestamps. That is good for computers, not so good for me when I'm staring at a quick database query and just need to know when something happened, was saved, or will be updated next.</p>
<p>Several months back my friend Sam asked for a way to quickly convert a UNIX timestamp to a human readable date. He had a snippet of Ruby he was using, so we worked out an Automator workflow to take the mouse selection and copy the converted date to the clipboard. I usually just want to see the date, not do anything with it, so here's a version that uses Growl to quickly display the converted date.  You need to have <a href="http://growl.info/">Growl</a> installed. I should also note that Growl provides Automator actions, but I couldn't get them to take input from the preceding Automator action. </p>
<p>1. Install the Ruby growl gem. This will give you the Growl command line app, too:</p>
<pre>sudo gem install ruby-growl</pre>
<p>2. Test that the command line app is working:</p>
<p><code>echo "Hello world" | growl -H localhost</code></p>
<p>3. Fire up Automator and tell it you're making a service:</p>
<div style="text-align: center; margin: 1em;">![](https://media.puddingtime.org/archive/mph.puddingbowl.org/wordpress/wp-content/uploads/2012/05/automator_service.jpg)</div>
<div style="text-align: left; margin: 1em;">4. Tell Automator your new service is receiving the selected text from any application:</div>
<div style="margin: 1em;">![](https://media.puddingtime.org/archive/mph.puddingbowl.org/wordpress/wp-content/uploads/2012/05/automator_input.jpg)</div>
<div style="margin: 1em;">5. Drag "run shell script" from the Utilities list into your workflow.</div>
<div style="margin: 1em;">6. Paste this into the shell script action you just dragged in:</div>
<div style="margin: 1em;">
<p><code>for f in "$@"<br />do<br />     date -r $f | growl -H localhost -t "Date from UNIX timestamp:"<br />done</code></p>
<p>7. Save it and remember its name. </p>
<p>8. Assign your new service a sensible keyboard shortcut:</p>
<p>8a. Open System Preferences -&gt; Keyboard and click the "Keyboard Shortcuts" tab</p>
<p>8b. Look for your service under "Text"</p>
<p>8c. Click the grayed-out word "none" next to your service, then click "add shortcut"</p>
<p>8d. Enter your shortcut</p>
<p>That's pretty much it. </p>
<p>There are a few more things you can do to customize it. In the Growl System Preferences, you can pick the style of alert for "ruby-growl," including whether or not it makes any sound and whether or not it's sticky. </p>
<p>Here's a sample:</p>
<p>![](https://media.puddingtime.org/archive/mph.puddingbowl.org/wordpress/wp-content/uploads/2012/05/growl-timestamp.jpg)</p>
</div>
<p>#automator #drupal #epoch #mac #timestamps #unix</p>
<p><em><a href="mailto:mike@puddingtime.org?subject=Re%3A%20Epochal%20Automator">Drop a line about this</a>.</em></p>]]></content:encoded>
    </item>
    <item>
      <title>Migrating content from Drupal 6 to Drupal 6…</title>
      <link>https://mike.puddingtime.org/posts/2012-05-23-migrating-content-from-drupal-6-to-drupal-6-part/</link>
      <pubDate>Wed, 23 May 2012 12:59:30 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2012-05-23-migrating-content-from-drupal-6-to-drupal-6-part/</guid>
      
      <description>Migrating content from Drupal 6 to Drupal 6 (part 1 of ?)
I&#39;ve got to move some user profiles, feeds and posts from one Drupal 6 site to another. That came with some frustrations. This should not be read as a lot of crowing, because the work isn&#39;t done. A few things worth noting, though, that I&#39;m …</description>
      <content:encoded><![CDATA[<p>Migrating content from Drupal 6 to Drupal 6 (part 1 of ?)</p>
<div class="thumbnail" style="text-align: center;"><a href="https://skitch.com/michaelhall/857ne/drupal-migrate-progress"></a></div>
<p>I've got to move some user profiles, feeds and posts from one Drupal 6 site to another. That came with some frustrations. This should not be read as a lot of crowing, because the work isn't done. A few things worth noting, though, that I'm putting here to help anyone who's found some excellent tutorials from ca. 2010 and wonders why on Earth they are not working.</p>
<h4>Migrate</h4>
<p>The Migrate module provides a very complete API for handling this sort of thing. Migrate v1 provided a number of GUI tools for managing field mappings, rolling back migrations, etc. Migrate v2 is much more complex, offers little in the way of GUI setup, and has proved over complex for what I'm trying to do, which is move nodes between two sites on the same MySQL server.</p>
<p>Migrate v1 uses <a href="http://drupal.org/project/tw">Table Wizard</a> as a data source for incoming nodes. There's a <a href="http://www.lullabot.com/articles/drupal-data-imports-migrate-and-table-wizard">great tutorial by Angie "webchick" Byron</a> on Lullabot's site, but it may prove frustrating until you realize it's for people using Migrate v1, which you can <a href="http://drupal.org/node/1111238">download here</a>. To support CCK fields and a few other things, you'll also want <a href="http://drupal.org/node/756404">migrate_extras</a> for the v1 module.</p>
<p>Once you have those things, the tutorial will make a lot more sense and I have just a few more things to add:</p>
<h4>MySQL Views and TableWizard</h4>
<p>For Drupal-to-Drupal migrations, you'll also need to set up your databases with a little more care. In my case, each site has a database sitting on the same MySQL server. To bring content from the incoming database into the receiving site, you'll have to let Drupal on the receiving site know about it. Adding a line like this in settings.php for the receiving site will do it:</p>
<pre><code>$db_url['db_for_source_site'] = 'mysqli://user:pass@database_host/database_name'; </code></pre>
<p>Since you're using a pair of Drupal databases that probably have the same table names, if you haven't prefixed your table name this will probably bother TableWizard. The quick way around that is to use MySQL views to effectively rename the tables on the incoming site. Here, for instance, is a query to make a MySQL view to provide all your incoming site's node data to the receiving site. It will appear to Table Wizard as if you have a table called "foo_node."</p>
<pre><code>create view foo_node AS SELECT * FROM node </code></pre>
<p>Table Wizard will then allow you to create relationships between your incoming tables using these views. If you don't take this step, the views generated by Table Wizard will be disagreeable. You might be tempted to bypass the creation of views and simply make sure your Table Wizard default views are named with unique names that won't collide with existing tables. That didn't work for me. Take the five seconds each to make views for the tables you need.</p>
<p>#drupal #migrate #tablewizard</p>
<p><em><a href="mailto:mike@puddingtime.org?subject=Re%3A%20Migrating%20content%20from%20Drupal%206%20to%20Drupal%206%E2%80%A6">Drop a line about this</a>.</em></p>]]></content:encoded>
    </item>
  </channel>
</rss>
