Using a MarkLogic application at work to manage and deploy content. We have almost no available metadata nearly any of our thousands and thousands of video and flash content. We’re generating it by hook or by crook, often repurposing editorial transmittal grids into csv for import. Needless to say, stuff like native dimensions or the like have been lost in the sands of time – existing html embeds are done in a multitude of slapdash ways, with height and width varying greatly per instance.
I should also say that this is all legacy content being shoehorned into “responsive” courseware. So there are width restrictions now, when before these activities were just popped up in new windows with “100%” widths.
Anyway, when trying to place said swfs into the product, the embed codes for an entire disciple were completely wrong. Things squished, white spaced abounded. Turns out the person who loaded the original metadata set all the widths to the max width for the product (595 px) and then grabbed heights from the questionable html wrappers. But they didn’t in turn adjust this grabbed height in light of a new width. Oooooof. A complete mess!
I needed to start from scratch, but I was looking at several hundred swfs. Grepping the dimensions from the html was out, as they were suspect. As was opening each in Flash, I refuse to do manual labor! I needed a csv with all the filenames and native dimensions. If the width is over 595px, I needed an aspect ratio calculation done.
So swfdump and bash to the rescue!


