Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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-2pick
Commits
7e4b7159
Commit
7e4b7159
authored
Jan 02, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update_load_data
parent
5ca14036
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
2pick/pick.lua
2pick/pick.lua
+11
-6
2pick/sqlite_cmd.txt
2pick/sqlite_cmd.txt
+1
-1
No files found.
2pick/pick.lua
View file @
7e4b7159
...
@@ -18,15 +18,20 @@ local extra_sp={
...
@@ -18,15 +18,20 @@ local extra_sp={
[
TYPE_LINK
]
=
{},
[
TYPE_LINK
]
=
{},
}
}
function
Auxiliary
.
SplitData
(
inputstr
)
local
t
=
{}
for
str
in
string.gmatch
(
inputstr
,
"([^|]+)"
)
do
table.insert
(
t
,
tonumber
(
str
))
end
return
t
end
function
Auxiliary
.
LoadDB
()
function
Auxiliary
.
LoadDB
()
os.execute
(
"sqlite3 2pick/2pick.cdb < 2pick/sqlite_cmd.txt"
)
os.execute
(
"sqlite3 2pick/2pick.cdb < 2pick/sqlite_cmd.txt"
)
for
line
in
io.lines
(
"card_list.txt"
)
do
for
line
in
io.lines
(
"card_list.txt"
)
do
local
col
=
line
:
find
(
"|"
)
local
data
=
Auxiliary
.
SplitData
(
line
)
local
code
=
tonumber
(
line
:
sub
(
1
,
col
-
1
))
local
code
=
data
[
1
]
local
rest_line
=
line
:
sub
(
col
+
1
,
#
line
)
local
cat
=
data
[
5
]
local
rest_col
=
rest_line
:
find
(
"|"
)
local
lv
=
data
[
8
]
local
cat
=
tonumber
(
rest_line
:
sub
(
1
,
col
-
1
))
local
lv
=
tonumber
(
rest_line
:
sub
(
col
+
1
,
#
line
))
if
(
cat
&
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
+
TYPE_LINK
)
>
0
then
if
(
cat
&
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
+
TYPE_LINK
)
>
0
then
table.insert
(
extra
,
code
)
table.insert
(
extra
,
code
)
for
tp
,
list
in
pairs
(
extra_sp
)
do
for
tp
,
list
in
pairs
(
extra_sp
)
do
...
...
2pick/sqlite_cmd.txt
View file @
7e4b7159
.output card_list.txt
.output card_list.txt
select
id,type,level
from datas;
select
*
from datas;
.output stdout
.output stdout
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