Profile

wshaffer: (Default)
wshaffer

September 2021

S M T W T F S
   123 4
56789 1011
12131415161718
19202122232425
2627282930  

Custom Text

Most Popular Tags

Jan. 13th, 2016

My efforts to teach myself Ruby programming have not advanced much in the past few months, having been displaced by acquisition of other skills more immediately of need in Ye Daye Jobbe. However, I have a solid skill base in writing scripts that take information in one format, slice it and dice it a bit, and spit it out in another format. This is surprisingly useful.

This morning I was in a meeting where we found ourselves saying, "We have a pile of XML files with a ton of information - if only we could turn them into a CSV file containing that information." I have now written a script that does just that.

Using the Nokogiri gem actually makes it pretty stupidly easy to parse XML/HTML. One of these days I'll set myself a programming challenge in Ruby that does not basically reduce to 1) Find the gem that provides the correct objects and methods to handle your data set. 2) Perform basic string and array manipulations. 3) Profit!

Today is not that day.

Expand Cut Tags

No cut tags

Style Credit