Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
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
List
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
syntax_j
mycard
Commits
e221baad
Commit
e221baad
authored
Feb 04, 2014
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
8230ce54
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
15 deletions
+18
-15
main.rb
main.rb
+18
-15
No files found.
main.rb
View file @
e221baad
...
...
@@ -135,14 +135,16 @@ begin
result
=
szFile
.
delete
(
"
\0
"
.
encode
(
Encoding
::
UTF_16LE
)).
encode
(
Encoding
::
UTF_8
)
if
!
result
.
empty?
and
File
.
file?
result
require
'pathname'
result
=
Pathname
.
new
(
result
).
cleanpath
result
=
Pathname
.
new
(
result
).
cleanpath
.
to_s
.
gsub
(
'\\'
,
'/'
)
Config
[
'ygopro'
][
'path'
]
=
result
else
exit
end
else
require
'pathname'
Config
[
'ygopro'
][
'path'
]
=
Pathname
.
new
(
Config
[
'ygopro'
][
'path'
]).
cleanpath
.
to_s
.
gsub
(
'\\'
,
'/'
)
end
def
save_config
(
config
=
Config
)
require
'json'
open
(
'config.json'
,
'w'
)
{
|
f
|
JSON
.
dump
config
,
f
}
...
...
@@ -264,6 +266,7 @@ an error occurs, please send your operation and message below to zh99998@gmail.c
thumbnails_count
=
thumbnails_to_download
.
size
images_count
=
images_to_download
.
size
errors_count
=
0
puts
files
.
keys
.
join
(
"
\n
"
)
batch_download
(
image_url
.
to_s
,
files
,
'image/jpeg'
)
{
|
http
|
if
http
.
req
.
path
[
"thumbnail"
]
thumbnails_count
-=
1
...
...
@@ -590,7 +593,7 @@ an error occurs, please send your operation and message below to zh99998@gmail.c
def
parse_path
(
path
)
require
'fileutils'
require
'pathname'
path
=
Pathname
.
new
(
path
).
cleanpath
path
=
Pathname
.
new
(
path
).
cleanpath
.
to_s
.
gsub
(
'\\'
,
'/'
)
case
File
.
extname
(
path
)
when
'.ydk'
...
...
@@ -638,21 +641,21 @@ an error occurs, please send your operation and message below to zh99998@gmail.c
deck
(
$2
)
when
/^(?:(.+?)(?:\:(.+?))?\@)?([\d\.]+)\:(\d+)(?:\/(.*))$/
join
({
'name'
=>
$5
.
to_s
,
'user'
=>
{
'nickname'
=>
$1
,
'password'
=>
$2
},
'server'
=>
{
'ip'
=>
$3
,
'port'
=>
$4
.
to_i
,
'auth'
=>
!!
$2
}
})
'name'
=>
$5
.
to_s
,
'user'
=>
{
'nickname'
=>
$1
,
'password'
=>
$2
},
'server'
=>
{
'ip'
=>
$3
,
'port'
=>
$4
.
to_i
,
'auth'
=>
!!
$2
}
})
end
end
#monkey patch for exerb & addressable
#monkey patch for exerb & addressable
if
defined?
ExerbRuntime
module
Addressable
module
IDNA
...
...
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