Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-images-generator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
ygopro-images-generator
Commits
ba3806a3
Commit
ba3806a3
authored
Apr 04, 2016
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
broken
parent
368b36f3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
7 deletions
+37
-7
Global.rb
Global.rb
+5
-3
LanguageConstants.rb
LanguageConstants.rb
+0
-1
Log.rb
Log.rb
+2
-2
generator.rb
generator.rb
+5
-0
web.sh
web.sh
+24
-0
ygopro-database
ygopro-database
+1
-1
No files found.
Global.rb
View file @
ba3806a3
...
@@ -5,6 +5,7 @@ module Global
...
@@ -5,6 +5,7 @@ module Global
attr_accessor
:language
attr_accessor
:language
attr_accessor
:git_path
attr_accessor
:git_path
attr_accessor
:git_uri
attr_accessor
:git_uri
attr_accessor
:database_path
attr_accessor
:database_name
attr_accessor
:database_name
attr_accessor
:temp_database_name
attr_accessor
:temp_database_name
attr_accessor
:image_type
attr_accessor
:image_type
...
@@ -15,10 +16,11 @@ module Global
...
@@ -15,10 +16,11 @@ module Global
attr_accessor
:mse_set_path
attr_accessor
:mse_set_path
attr_accessor
:sql_fix_name
attr_accessor
:sql_fix_name
end
end
self
.
language
=
'
cn
'
self
.
language
=
'
zh-CN
'
self
.
git_path
=
'ygopro-images-raw'
self
.
git_path
=
'ygopro-images-raw'
self
.
database_path
=
'ygopro-database'
self
.
git_uri
=
'https://github.com/mycard/ygopro-images-raw.git'
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
.
temp_database_name
=
"working-cards.cdb"
self
.
image_type
=
'.jpg'
self
.
image_type
=
'.jpg'
self
.
records_name
=
"records.json"
self
.
records_name
=
"records.json"
...
@@ -29,7 +31,7 @@ module Global
...
@@ -29,7 +31,7 @@ module Global
self
.
mse_set_path
=
"mse-sets"
self
.
mse_set_path
=
"mse-sets"
module_function
module_function
def
full_database_path
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
end
def
full_image_path
def
full_image_path
...
...
LanguageConstants.rb
View file @
ba3806a3
...
@@ -46,5 +46,4 @@ class LanguageConstants
...
@@ -46,5 +46,4 @@ class LanguageConstants
self
.
languages
[
locale
].
monster_effect_head
=
value
[
'monster_effect_head'
]
self
.
languages
[
locale
].
monster_effect_head
=
value
[
'monster_effect_head'
]
end
end
end
end
p
self
.
languages
end
end
Log.rb
View file @
ba3806a3
...
@@ -5,5 +5,5 @@ module Log
...
@@ -5,5 +5,5 @@ module Log
class
<<
self
class
<<
self
attr_accessor
:logger
attr_accessor
:logger
end
end
self
.
logger
=
Logger
.
new
'generator.log'
self
.
logger
=
Logger
.
new
STDOUT
end
end
\ No newline at end of file
generator.rb
0 → 100755
View file @
ba3806a3
#!/usr/bin/env ruby
#usage: ./generator.rb zh-CN
require_relative
'Commands.rb'
Commands
.
generate_delta
(
ARGV
)
web.sh
0 → 100755
View file @
ba3806a3
#!/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
ygopro-database
@
89d97d98
Subproject commit 8
89c5d0315b454634a0af41c53337b3ad2f8a498
Subproject commit 8
9d97d9875fc1b4a954ab8b168916f79390cec85
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment