Skip to content

Instantly share code, notes, and snippets.

@Cutta
Last active September 5, 2016 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Cutta/afbfb8cd572160f1bb829cbf32f41231 to your computer and use it in GitHub Desktop.
Save Cutta/afbfb8cd572160f1bb829cbf32f41231 to your computer and use it in GitHub Desktop.
Extracts and displays SVG Path path from your .svg file
require 'nokogiri'
File.open("/your/file/path/test.svg", "r") do |f|
@doc = Nokogiri::XML(f)
puts "\n\n\n"
puts @doc.css("path").first.attr("d")
puts "\n\n\n"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment