MathML Track – Connecting The Code

Greetings from #rdcHQ! This week in the MathML Track, we made a big step towards finalizing how our equations will be integrated into the Title 24 documents. Jasper wrote a Ruby script that will solve that piece of the puzzle by creating a wrapper around each equation as outlined earlier in the program. This code will ultimately be published in github during our documentation phase.

Our draft code is below … More news as it develops! (We also have more equations to add to the repository … stay tuned!)

grem.rb (draft)

Note: We are still working out details on how to gracefully degrade to the generated SVG, and in the absence of an SVG, the original JPG image.

name = ARGV.shift #get individual filenames from helper.rb
# grem.rb: grep for MathML
# Jasper Shumaker-Pruitt
# extracts MathML from html files
# see helper.rb for instructions

File.open(name, "w") do |writefile|   #open a new file of the same name
  writefile.puts '<span class="display">
	<span id="equation-item[n]" class="formula">
		<span class="label">
			[EQUATION IDENTIFIER]
		</span>
		<span class="math">' #write some html to that file

  current_state = 0
  while line = gets    #iterate through the lines from original file
    if line.index("<math") #look for an opening math tag
      current_state = 1
    end
    if current_state > 0    #write the content from opening to closing math tags
      writefile.puts line
    end
    if line.index("</math") #quit writing when closing tag is found
      current_state -= 1
    end
  end
  writefile.puts '
		</span>
	</span>
</span>'  #write the rest of the html wrapper
end

helper.rb (draft)

Note: This code could be repurposed to convert an entire directory of xml/mml/html documents to svg with SVGMath.

#helper.rb
#Jasper Shumaker-Pruitt
#usage:
#1) create new destination directory
#2)into the command line type: ruby helper.rb SourceDir DestinationDir
# i.e. ruby helper.rb /home/foo/sourcedir /home/foo/destinationdir for a #computer named foo

origin = ARGV.shift #retrieve and store user input for source and destination
destin = ARGV.shift #directories
fileNameArray=`ls #{origin}`.split #create an array of filenames in source dir
fileNameArray.each do |htmlFile|  #iterate through array
 if !(htmlFile.index("~"))#ignore html backup files
 	system("ruby grem.rb #{destin}/#{htmlFile} < #{origin}/#{htmlFile}")
        #execute grem for each file
 end
end

SVG Track – Copy Right

100 graphics are now in the SVG repository! We’re building out more components for the illustrations and creating these graphics is becoming much easier. We started work on a symbol set this week and updated the look to match some of the standard icon sets such as the passenger/pedestrian set developed by AIGA and released into the public domain.

Symbols for Title 24 “vectorized” by the SVG Team at #rdcHQ
“Copy Right” by
Gerd Arntz <3

This collection led us to The Noun Project which contains a wealth of useful pictograms (and this, in turn, led us to the first ever ICONATHON being held today in San Francisco). When working on a project of this nature, it always makes sense to conduct research to see if there are similar efforts that can be built upon or may benefit from the end result of your own project. That’s why attribution is key to build links between these projects so interested people are aware of their co-existence. Attribution is what makes the Web world-wide. Without attribution and contextual hyperlinking meaning is lost and authorship is obscured. You never know what serendipitous discoveries you will make!

Production-Ready Art

The Scalable Vector Graphic format that we are using is moving this document set into the modern era. It is not difficult to spot the difference in quality between the original art we are working from and the resolution-independent vector files we are producing (you can view two examples side-by-side here). The new files will be reusable in web and print applications, and ready for use in the next wave of interactive and mobile applications. This adds value and improves accessibility for anyone using this document set and not just for a subset of people. That’s cool! Our art is production-ready and released freely into the public domain – they are designed to “copy right” in more ways than one!

Hacker Wednesday – Content, Navigation and Design

Greetings from #rdcHQ! We made great progress yesterday building out the navigation on our “VERY ALPHA” website! Jenn successfully created secondary and tertiary navigation options using the “Pages” and “Menu” controls in WordPress and the “Theme Skinning” capabilities of Suffusion:

Suffusion/WordPress navigational goodness by Jenn Covington

We weren’t sure this would be possible without modifying the underlying template code, but we only had to make one small change to the template CSS file in order to keep the text from wrapping on the menu options. We’ll release this code as a patch along with the tutorials we create for our project. The goal is to make minimal changes to any theme files to simplify the upgrade path. We want new menu items to be easy to add and software upgrades to be painless for New Artists Productions. We still have a few stylistic changes to make to the navigation, but now the architecture is in place and we can start building out the site.

We started the first phase of adding more content to the Scrapbook area of the site. The Newspaper Articles section now contains many more stories about the group (see below), and we have added a section of cast photos highlighting the various performances by the group over the years.

We are waiting on one last derive from the Internet Archive of the Poster History section – we’ve added quite a bit of content including stories behind the set designs, site sketches and letters of appreciation from participants in the program. We will add these to our “VERY ALPHA” site in progress as soon as the build is complete and the files are available.

We’ll be working on the next round of content for the site. Everything is really starting to come together and we’ll be rolling out the site at our Rural Design Collective Launch Party over Labor Day Weekend! Stay tuned!


Groovy “VERY ALPHA” Stage mockup by Oceana Fields

#rdcHQ Home Movie News

Our resident videographer, Nate Malamud, has extended his movie release date until August 17 to give himself more time to perfect his final work. We’re arranging to get some better audio equipment at #rdcHQ, and will release the movie in episodes up until the Rural Design Collective Launch Party which takes place on Labor Day Weekend. In the meantime, he created a new trailer for our Kickstarter fundraising campaign using some of the frames from our stage animation for the New Artists Production website.

More news coming up from Hacker Wednesday – Stay Tuned!

Return top