Created
February 8, 2014 07:39
-
-
Save tkurki/8878068 to your computer and use it in GitHub Desktop.
Sed oneliner to convert markup to d3 append/attr commands. Not terribly pretty, but helps with tedious conversions.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat | sed 's/\<\([a-z]*\)/append("\1")/' | sed 's/ \([a-z]*\)="/.attr("\1","/g' | sed 's/"\.att/"\)\.att/g' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment