OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[pettanr/pettanr.git] / script / ls_helper.rb
index 4ea1a66..bc504ac 100644 (file)
@@ -29,9 +29,20 @@ lg.each do |k, g|
       puts 'open system picture file ' + fn\r
       d = File.open(fn, 'rb').read\r
       b = Base64.encode64(d).gsub(/\r/, '').gsub(/\n/, '')\r
-      l['system_picture'] = b\r
+      l['system_picture_id'] = {"text" => b}\r
       l.delete 'system_picture_file'\r
     end\r
+    if l['credit_pictures']\r
+      credit_pictures = {}\r
+      l['credit_pictures'].each do |n, v|\r
+        fn = File.expand_path(wd + '/' + v)\r
+        puts 'open system picture file ' + fn\r
+        d = File.open(fn, 'rb').read\r
+        b = Base64.encode64(d).gsub(/\r/, '').gsub(/\n/, '')\r
+        credit_pictures[n] = {"text" => b}\r
+      end\r
+      l['credit_pictures'] = credit_pictures\r
+    end\r
   end\r
 end\r
 puts "generating " + o\r