When i run homescrape, i get this error after a few entries:
........
Modified 1 entries
eugene count 1 "artist='Gran Ronde' and title='Wisdom'"
Modified 1 entries
eugene count --artist 1 "name='Gran Ronde'"
Modified 1 entries
/usr/bin/homescrape:125:in sprintf': malformed format string - %' (ArgumentError) from /usr/bin/homescrape:125:inblock in '
from /usr/bin/homescrape:77:in call' from /usr/bin/homescrape:77:inblock in fetch'
from /usr/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.1/lib/nokogiri/xml/node_set.rb:213:in block in each' from /usr/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.1/lib/nokogiri/xml/node_set.rb:212:inupto'
from /usr/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.1/lib/nokogiri/xml/node_set.rb:212:in each' from /usr/bin/homescrape:67:infetch'
from /usr/bin/homescrape:81:in fetch' from /usr/bin/homescrape:81:infetch'
from /usr/bin/homescrape:81:in fetch' from /usr/bin/homescrape:81:infetch'
from /usr/bin/homescrape:81:in fetch' from /usr/bin/homescrape:81:infetch'
from /usr/bin/homescrape:81:in fetch' from /usr/bin/homescrape:81:infetch'
from /usr/bin/homescrape:123:in `'
It was because the name of the song had a '%' in it, this change to def quote src fixed it:
def quote src
src.gsub(/'/, "''").gsub(/"/, "\"").gsub(/%/, "%%")
end
When i run homescrape, i get this error after a few entries:
........ Modified 1 entries
sprintf': malformed format string - %' (ArgumentError) from /usr/bin/homescrape:125:in
block incall' from /usr/bin/homescrape:77:in
block in fetch' from /usr/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.1/lib/nokogiri/xml/node_set.rb:213:inblock in each' from /usr/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.1/lib/nokogiri/xml/node_set.rb:212:in
upto' from /usr/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.1/lib/nokogiri/xml/node_set.rb:212:ineach' from /usr/bin/homescrape:67:in
fetch' from /usr/bin/homescrape:81:infetch' from /usr/bin/homescrape:81:in
fetch' from /usr/bin/homescrape:81:infetch' from /usr/bin/homescrape:81:in
fetch' from /usr/bin/homescrape:81:infetch' from /usr/bin/homescrape:81:in
fetch' from /usr/bin/homescrape:81:infetch' from /usr/bin/homescrape:81:in
fetch' from /usr/bin/homescrape:123:in `