Last active
September 5, 2016 21:02
-
-
Save Cutta/afbfb8cd572160f1bb829cbf32f41231 to your computer and use it in GitHub Desktop.
Extracts and displays SVG Path path from your .svg file
This file contains hidden or 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
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