Commit ba3806a3 authored by 神楽坂玲奈's avatar 神楽坂玲奈

broken

parent 368b36f3
......@@ -5,6 +5,7 @@ module Global
attr_accessor :language
attr_accessor :git_path
attr_accessor :git_uri
attr_accessor :database_path
attr_accessor :database_name
attr_accessor :temp_database_name
attr_accessor :image_type
......@@ -15,10 +16,11 @@ module Global
attr_accessor :mse_set_path
attr_accessor :sql_fix_name
end
self.language = 'cn'
self.language = 'zh-CN'
self.git_path = 'ygopro-images-raw'
self.database_path = 'ygopro-database'
self.git_uri = 'https://github.com/mycard/ygopro-images-raw.git'
self.database_name = 'cards-%s.cdb'
self.database_name = '%s.cdb'
self.temp_database_name = "working-cards.cdb"
self.image_type = '.jpg'
self.records_name = "records.json"
......@@ -29,7 +31,7 @@ module Global
self.mse_set_path = "mse-sets"
module_function
def full_database_path
return File.join self.git_path, sprintf(self.database_name, self.language)
return File.join self.database_path, sprintf(self.database_name, self.language)
end
def full_image_path
......
......@@ -46,5 +46,4 @@ class LanguageConstants
self.languages[locale].monster_effect_head = value['monster_effect_head']
end
end
p self.languages
end
......@@ -5,5 +5,5 @@ module Log
class << self
attr_accessor :logger
end
self.logger = Logger.new 'generator.log'
end
\ No newline at end of file
self.logger = Logger.new STDOUT
end
#!/usr/bin/env ruby
#usage: ./generator.rb zh-CN
require_relative 'Commands.rb'
Commands.generate_delta(ARGV)
#!/bin/bash
git_update () {
cd $1
git add -f .
git reset --hard
git checkout $2
git reset --hard origin/$2
git pull
cd ..
}
git_update ygopro-database build
git_update ygopro-images-raw master
for filename in locales/*.yml; do
locale=$(basename "$filename" .yml)
git_update ygopro-images ${locale}
ruby generator.rb ${locale}
cd ygopro-images
git commit -am 'Update card images'
#git push
cd ..
done
Subproject commit 889c5d0315b454634a0af41c53337b3ad2f8a498
Subproject commit 89d97d9875fc1b4a954ab8b168916f79390cec85
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment