slideshow 1 slideshow 2 slideshow 3 slideshow 4 slideshow 5 slideshow 6 slideshow 7 slideshow 8

Blog

Using iMacros to loop through Drupal content list and save

On a recent client project, I imported several hundred nodes from a legacy system.  The problem was, when looking at the individual nodes, the titles didn't appear.  After hitting edit and then save on that node though, the title would show up.

After spending some time trying to figure out where the logic was that was killing my titles, I decided to try fixing this another way.  I first tried a variety of save commands through VBO, but sadly unpublish/publish, changing authors, nor just resaving all the nodes fixed my issue, leading me to think that the nodes needed some piece of content (even if blank or null) from the node submission form.  

Stymied from a more elegant solution, with my deadline looming, I turned to my old friend, the iMacros Firefox extension.  For those unfamiliar, it allows you to record macros in your browser and then loop them in an automated fashion.  I recorded what the macro looked like to load the /admin/content screen, hit the edit link and then hit save on the resulting screen.  This is what that looked like:

TAB T=1
TAG POS=1  TYPE=A ATTR=TXT:edit
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:press-release-node-form ATTR=ID:edit-submit
This was all hunky dory, but would only do it for the top node on the content list.  I had to find a looping variable.  Enter the {{!LOOP}} variable.  All I had to do was change the position tag of the first instruction to correspond to the loop iteration number and my browser was off to the races:
TAB T=1
 
TAG POS={{!LOOP}}  TYPE=A ATTR=TXT:edit
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:press-release-node-form ATTR=ID:edit-submit
Sadly this is a slower than I might like, but in the time its taken me to write this post, my browser has looped through this macro 50 times, so it is acceptably low involvement that I think I can use it to finish out this project.  Drop me a line if you have ideas as to why the nodes wouldn't show the tile without manually saving it through the browser!

Re-launched winikates.com

Winikates.com has been reborn as a Drupal 7 site, migrating from self hosted Wordpress previously, and wordpress.com before that.  No promises of active blogging here but thanks for stopping by!

Tags: 

I'm sorry Ted

I'm sorry, Ted.

I visited your grave yesterday in Arlington, then returned to my home on Capitol Hill and called voters in our home state, encouraging them to elect a successor who would vote for the cause of your life: health care.

I woke up this morning and put on the t-shirt I got during my time working on your last campaign. While I have toiled for many other candidates, you were the first I was serious about.

I have no blame or anger in my heart. There is doubt that we now possess the ability to accomplish the work that faces our government today. We have serious problems, and we need serious people to discuss them. I don't want an opposition that just says no, like a two year old presented with a plate full of vegetables. I want an opposition that debates ideas, forces us to work hard, and makes valuable contributions to our society.

There is a problem with the way we govern ourselves. We are the only country in the world to allow unlimited debate on legislative issues, hence the filibuster and the need for 60 votes to pass any substantive bill in the Senate. I am not one for allowing the majority party to run roughshod over the minority; there must be time for debate, but no time should be allowed for obstructionism.

The American people spend their time living their lives and working at their jobs, and they elect representatives to spend their lives working at theirs. I reject the "public service" of anyone who operates to solely block progress. One may object to a bill and wish to oppose it for many reasons, but I fail to see how comprehensive reform that will reduce the cost while increasing the coverage and availability of health care to the American populace could be seen as anything but progress.

Joseph Kennedy told his young son: "You can have a serious life or a nonserious life, Teddy. I'll still love you whichever choice you make." With this statement in mind, Edward Moore Kennedy decided to serve the people of Massachusetts and chose the serious life, despite the loss of his two brothers who had made the same choice before him. For the next two years, I foresee Ted's seat being held by a man who stands with those who deal in the politics of counteraction, rather than that of cooperation. But I will say this: progress will be ours, and we will earn it, through the strength of our arguments and our dedication to the founding principle of equality.

I miss you Ted, but I will not abandon that for which you fought.

Tags: 

Proof that John Kerry is human, or Suppoort for why I've liked him all along

Politico has an interview with him, reminds me of the Al Gore video that made people say "Why couldn't he be like this during the campaign??" Some of my favorites include the following:

Q: Tell us your favorite joke.

A: On the advice of my attorney, my family and every member of my staff, I am no longer allowed to tell jokes.

Q: On what types of products do you never go cheap, for the sake of quality?

A: Ketchup.

Q: How often do you Google yourself?

A: When I was growing up, the priests taught us to think that was a sin.

Read on to see comments comparing himself to Blagojevich and his comments about Red Sox and Patriots as they pertain to his life.

Also, I know things have been quiet on the BostonRob front, I've been working on a new blog to launch that I'm hosting myself. It allows me to geek out a bit and do some customizations I'm not able to do on the free, yet limited account I have here. More to come soon.

Tags: 

Breaking News: 4 Million Blankets with Sleeves sold

All I have to say is that probably half of those were bought as a joke for someone. The other half, well, I just don't have words for them. CNN has a video about it that I can't seem to embed, view it here.

Tags: 

Look Ma, I was on tv!

Well, kinda anyhow. Here's the video of Kanye's performance, definitely high-octane start. I was about ten rows back right in front of the center of his stage and the atmosphere was one of pure enjoyment and celebration. (Although one does have to question the choice of Kanye's mullet. Really, Kanye?)

Here is the big man himself entering the ballroom. I especially found the "Yes We Can" cheer poignant, given all that has happened since the first time it was used, when I was at the post-NH primary rally back last January. Barack really gets the crowd going with that cheer at the end, MTV sound editors decided to not let us overpower his words, but let's just say it was loud.

And the "old school" dance. Man our President is cool. 

Also, Fall Out Boy has a member whose parents marched during the fight for civil rights. Definitely an interesting personal connection. Also they make fun of Bush at the beginning of this clip.

I have pictures to post, but I am getting lunch with some friends from Alaska and should get running. More to come, more to come!

Tags: 

Star Wars: Retold (by someone who hasn't seen it)

This is a pretty funny redux of the original Star Wars trilogy.

Tags: 

This is something I can get behind

People often see me as "the tech guy."  Thing is, I don't even really like computers innately.  It is just that sometimes they allow for some pretty cool stuff to happen.  Things like instant communication between people continents apart or creative applications like photo editings and video creation.

With a hat tip to Rachel, I must say that I love this idea: a Congressional API. Now, before my non-technical readers leave, API stands for application programming interface.  This means that APIs are the things that allow people to write applications for Facebook and your iPhone.

Basically this means enterprising poli-techies can create websites that take roll-call vote information and make it user friendly with lots of different ways to dissect it, whether it is by elected official, state, date, vote, you name it. The truly interesting part about this is that it should enable greater government transparency because it lowers the barrier of entry for a great number of people.

Apparently, this is becoming something of a popular idea, since Sunlight Labs is having a competition to create a mashup using their collection of government related APIs for the most user friendly website.  Sunlight Labs is a group that describes itself as a "pilot project to prototype tech ideas to improve government transparency and political influence disclosure."  I'll be interested to see what comes out of this competition, if we can combine private and public efforts to open up our government.

De Tocqueville said that citizens in a democracy get the government they deserve.  Hopefully these tools will help our citizenry become more involved and get the better government we all desire.

Tags: 

New job!! Inauguration tickets!! Exclamation points!!

So I came to DC a little over a week ago, and I'm happy to announce that today I accepted a job at NGP Software.  The major product of NGP is software that tracks political donations and then helps the campaign or party client submit their compliance reports to the FEC and the respective state ethics boards.  So there is a lot to be learned, but I am quite excited about it.  I'll be starting after the inauguration and it turns out I work in an area with a lot of other friends from school.  This looks to be a job where I could be happy for a while, so I'm in DC for the foreseeable future. Next big life decision?  Where to live.  I have a lot of Craigslisting to do.

I also promised some people pictures of my inauguration tickets, so check them out below![gallery columns="2"]

Tags: 

The President-elect is a good man

I say this because he just came to visit all the staff and volunteers at the Presidential Inaugural Committee to shake their hands and say thank you.  Totally unnecessary for him to do, but he did it anyhow.  As I look back on it, it has been 11 months since I met him last, on Super Tuesday (February 5th), a picture which you can see as my Facebook profile picture.

On the note of dates passing, it was a year ago today that the voters in New Hampshire went to the polls and destroyed my faith in primary polling data.  Barack won in Iowa, a big upset and polls showed him up by a fair amount going into the primary, which he ended up losing by a few points.  Having been sleep deprived for the week before the election I decided to avail myself of the corner of the gym where I got about 45 minutes of sleep before Barack took the stage to give his speech.  That night was the first time the Yes We Can cheer went up.  The great part about it is that that speech was 95% unchanged by the result of the election, really only a few sentences at the beginning were altered by the outcome.

If I get a picture of myself shaking hands with the President-elect, I'll post it.

It is also a year since I was asleep in the corner of a gym in Nashua, NH waiting for him to get up and give his concession speech after losing the first primary, which he was favored to win after his big win in Iowa.

Tags: 

Pages