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
d0981ed8
Commit
d0981ed8
authored
Apr 05, 2016
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1 from IamIpanda/patch-1
Update Command.rb
parents
17293014
bdf82f74
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
Commands.rb
Commands.rb
+17
-16
No files found.
Commands.rb
View file @
d0981ed8
...
@@ -18,37 +18,38 @@ module Commands
...
@@ -18,37 +18,38 @@ module Commands
def
generate_all
def
generate_all
Log
.
logger
.
info
"Generate all the card images with language
#{
Global
.
language
}
."
Log
.
logger
.
info
"Generate all the card images with language
#{
Global
.
language
}
."
self
.
clear_mse
self
.
clear_mse
data
=
Sqlite
.
split
Sqlite
.
load
data
=
Sqlite
.
split
Sqlite
.
load
MSETranslator
.
generate_mse_all
(
data
)
MSETranslator
.
generate_mse_all
(
data
)
MSETranslator
.
export_mse_all
MSETranslator
.
export_mse_all
end
end
def
generate_delta
(
languages
=
nil
)
def
generate_delta
(
languages
=
nil
)
Log
.
logger
.
info
"Generate delta card image(s)"
Log
.
logger
.
info
"Generate delta card image(s) with parameter:
#{
languages
.
inspect
}
"
self
.
clear_mse
data
=
Sqlite
.
load
changes
=
HashJudger
.
compare
data
generates
=
changes
[
0
]
+
changes
[
2
]
removes
=
changes
[
1
]
data
=
Sqlite
.
split
generates
if
languages
==
nil
if
languages
==
nil
process
(
removes
,
data
)
process
_generate_delta
else
else
for
language
in
languages
for
language
in
languages
Global
.
language
=
language
Global
.
language
=
language
process
(
removes
,
data
)
process
_generate_delta
end
end
end
end
end
end
def
process
(
removes
,
data
)
def
process_generate_delta
Log
.
logger
.
info
"Generate delta card image with language
#{
Global
.
language
}
"
self
.
clear_mse
data
=
Sqlite
.
load
# Language effected here
changes
=
HashJudger
.
compare
data
generates
=
changes
[
0
]
+
changes
[
2
]
removes
=
changes
[
1
]
data
=
Sqlite
.
split
generates
for
card
in
removes
for
card
in
removes
id
=
YGOCoreJudgers
.
get_id
card
id
=
YGOCoreJudgers
.
get_id
card
path
=
File
.
join
Global
.
full_answer_path
,
id
.
to_s
+
Global
.
image_type
path
=
File
.
join
Global
.
full_answer_path
,
id
.
to_s
+
Global
.
image_type
File
.
delete
path
if
File
.
exist?
path
File
.
delete
path
if
File
.
exist?
path
end
end
MSETranslator
.
generate_mse_all
(
data
)
MSETranslator
.
generate_mse_all
(
data
)
MSETranslator
.
export_mse_all
MSETranslator
.
export_mse_all
end
end
def
generate_single
(
id
)
def
generate_single
(
id
)
...
@@ -69,4 +70,4 @@ module Commands
...
@@ -69,4 +70,4 @@ module Commands
languages
languages
end
end
end
end
\ No newline at end of file
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