peterm's blog

Migrating CSV Data - Drupal 8.5.3

Building Address Project
Given a CSV file and a matching content type, here's how we get the data migrated into Drupal.
The following modules will be required:
Migrate, Migrate Plus, Migrate Source CSV, Migrate Tools, Migrate Drupal UI
Note that in this example we will import latitude, longitude into a geofield.
I had some drush migrate-import errors and needed to work with composer to get he latest dev version installed for Migrate Tools.

XCode Tip - Orientation

After struggling for a few days thinking that my jQuery code was somehow wrong, I found that I hadn't selected the various "supported device orientation" icons in my proejcts' target screen. 

To navigate to the this window, select the project, find the 4 icons and select away. While you're there, setup an App Icon and Launch Images.

Switching Contexts - Strategic v. Operational

I reflected a bit this weekend on wearing dual hats as both a Director in our Senior Management Team as well as a DL serving (BAS, Chancellor's/EVC units Planning & Budget, VPAA, VPDUE, University Relations and Student Affairs). It's evaluation season, so as I think back on another year of service a couple of nuggets fell out.


Operational v. Strategic

Another Steve McQueen the cat story

Steve McQueen is a cat. I've written about him before.

On or about June 21, on a warm evening, Steve and James Dean pushed out a window screen and escaped into the night. Around 1am, we heard what I thought was racoons mating; loud screeching. Lynda woke us up to discover that the cats weren't in the house. Panic ensued.

We found James in the front entrance way; his fur fluffed up to near double. We started to hunt for Steve. 

Use Case for Cloud Computing


The UC Santa Cruz web site is used as a primary information source for near real time information in the case of a campus or regional incident.

The emergency site is based on the Drupal platform and runs under Aegir on an Ubuntu operating system. The hardware running the site is nearly five years old. It has several other Drupal sites running on the same hardware. We manage this server using a combination of shell and Webmin.

Project and Proposal - Modify Case Tracker?



We need a method to handle work intake using as much of the ITS project management methodology as possible. Basically, this involves getting the appropriate details and initial scoping information into a one page form. One of the benefits of following the methodology is that we can aggregate and start to look at priorities against capacity for our group.

Upgrading Aegir to 0.4 a5

I wanted to upgrade the aegir tools on the -dev and -prod sites. I ran into some problems running the upgrade steps; which are probably due to some mistake I had made in managing the changes made since the original install. During the upgrade process, I was getting a variety of database error messages. I'm assuming that part of the problem was that I had originally installed 0.2, then upgraded to 0.3 and somewhere along the line, upgraded drush. Another symptom I was seeing was that my crontab for aegir was gone, so I could not process tasks.

Removing Trailing Commas with TextMate

 I finally got bugged by not having enough automation in text processing for the TPP project. In TextMate, I edited the Text bundle duplicating the remove Trailing Spaces and creating a remove Trailing Commas. It's a simple perl expression, perl -pe 's/[\,, ]+$//g'.

Huge time savings. One click vs scanning through the file for commas. More to follow on TextMate modifications.

TPP update - more on using node_import

 I came back to work on the TPP project over the past few days. A couple of problems needed resolving. First, I'd used the CCK float type instead of using Decimal type to hold salary data. While it worked for hourly and monthly salaries, annual salaries were longer than the column could allow. So, I started my test by deleting the 37 float fields and recreating them as decimal 10,2.

Steve McQueen is a Cat

 Yup, we've got a cat. Four months ago, Alison found a cat and Lynda brought it home. It was found in a parking lot over at UNEX. He's healthy and very rambunctious. Lynda named him. I was going for Demon or Badkitty, but Steve has hung on. 

Here's a few shots of our cat Steve McQueen. He's fast and does all his own stunts. In this shot, he's been ripping through his tunnel and I'm chasing him with a camera. Cute?

Managing News as a EOC Tool

Updated – 02-17-2010

The new beta of Managing News has some changes to channel tagging. In order to summarize the most relevant data across a number of feeds, a "tag" can be applied that allows for grouping of like items based on the tag. For any particular incident, we'd be able to develop a set of keywords for searching out sources (Google, local news, Twitter, etc.) and tags for organizing content in near real-time.

Project Idea

Override a Views Exposed Form

For the Title and Pay Plan application, I had been using the standard views filtering to display a paginated result set of several hundred rows formatted as a table. As you know, the standard Views UI form uses a text field to accept user input. The clients didn't want to have users type, but rather select from a drop down menu.