diff options
Diffstat (limited to 'lib/sisu/v4/git.rb')
-rw-r--r-- | lib/sisu/v4/git.rb | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/lib/sisu/v4/git.rb b/lib/sisu/v4/git.rb index 7c0d573a..50521fba 100644 --- a/lib/sisu/v4/git.rb +++ b/lib/sisu/v4/git.rb @@ -90,7 +90,6 @@ module SiSU_Git po: git_path_fnb + '/' + Gt[:po] + '/' + lng, pot: git_path_fnb + '/' + Gt[:pot], conf: git_path_fnb + '/' + Gt[:sisupod] + '/' + Gt[:conf], - skin: git_path_fnb + '/' + Gt[:sisupod] + '/' + Gt[:skin], image: git_path_fnb + '/' + Gt[:sisupod] + '/' + Gt[:image], audio: git_path_fnb + '/' + Gt[:sisupod] + '/' + Gt[:audio], video: git_path_fnb + '/' + Gt[:sisupod] + '/' + Gt[:video], @@ -127,7 +126,6 @@ module SiSU_Git FileUtils::mkdir_p(@git_path[:po]) unless FileTest.directory?(@git_path[:po]) FileUtils::mkdir_p(@git_path[:pot]) unless FileTest.directory?(@git_path[:pot]) FileUtils::mkdir_p(@git_path[:conf]) unless FileTest.directory?(@git_path[:conf]) - FileUtils::mkdir_p(@git_path[:skin]) unless FileTest.directory?(@git_path[:skin]) FileUtils::mkdir_p(@git_path[:image]) unless FileTest.directory?(@git_path[:image]) #FileUtils::mkdir_p(@git_path[:audio]) unless FileTest.directory?(@git_path[:audio]) #FileUtils::mkdir_p(@git_path[:video]) unless FileTest.directory?(@git_path[:video]) @@ -197,56 +195,10 @@ module SiSU_Git else "#{@env.path.pwd}/#{@opt.fns}" end end - def locate_skin - SiSU_Env::InfoSkin.new(@md).select - end def read_composite #print __FILE__ + ':' #p __LINE__ end - def extract_skin - #print __FILE__ + ':' - #p __LINE__ - end - def extract_skin_and_images #(parse_file) - parse_file_name=locate_parse_file - parse_file=IO.readlines(parse_file_name,'') - rgx_image=/(?:^|[^_\\])\{\s*(\S+?\.(?:png|jpg|gif))/ - #rgx_rb_image=/["'](\S+?\.(?:png|jpg|gif))["']/ - #rgx_rb_image=/[^\/]?([a-z]\S+?\.(?:png|jpg|gif))/ - rgx_rb_image=/([a-z][^ \/]+?\.(?:png|jpg|gif))/ - rgx_skin=/^\s+:skin:\s+(\S+)/ - skin_get=nil - images=[] - skin_get - parse_file.each do |f| #% work area - if f !~/^%+\s/ - skin_get ||= f.scan(rgx_skin).uniq.flatten if f =~rgx_skin - if f =~rgx_image - images << f.scan(rgx_image).uniq - end - end - end - skin=skin_get[0] if skin_get - skin=locate_skin - parse_skin=IO.readlines(skin,"\n") - parse_skin.each do |f| #% work area - if f !~/^#/ \ - and f =~rgx_rb_image - images << f.scan(rgx_rb_image).uniq - end - end - image_path="#{@env.path.pwd}/_sisu/image" - images.flatten.each do |i| - if FileTest.file?("#{image_path}/#{i}") - FileUtils::cp_r("#{image_path}/#{i}",@git_path[:image]) - end - end - if FileTest.file?(skin) - FileUtils::cp_r(skin,"#{@git_path[:conf]}/skin") - end - { skin: skin, images: images } - end def sisuyaml_rc sisurc=@env.path.sisurc_path if FileTest.file?(sisurc) @@ -265,11 +217,9 @@ module SiSU_Git if composite_src? populate.copy_related_sst_ssi end - populate.extract_skin #parse_file_name=locate_parse_file #parse_file=IO.readlines(parse_file_name,'') populate.sisuyaml_rc #(parse_file) - populate.extract_skin_and_images #(parse_file) #populate.extract_composite_source #populate.read_composite # or read_each_composite populate.identify_language_versions |