cafe_buy_duo 0.0.10 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/cafe_buy_duo.rb +45 -22
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62b5bdbc76a52f74d44f933c96ca76668575b5ad009d7d6f565c4915dee8f846
|
4
|
+
data.tar.gz: 4b23f2d5714c23cbc8df08e04c94fc7c92f7da6bf2eae3bdbb7a6389b9601215
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5de9d54b03e3777c2f9f9d4fff197c4a6a8c66fc13b0967a116b06caadc62f03013d0c156857bb85dcd1481fd57e83fc32faa13ba4c2c8d783e87a080586d86a
|
7
|
+
data.tar.gz: 30e2304ac80f250ce69be1f4bbb8d3e8c94f062bc9cac1f981f2518f100ba01459509c1826b1444dbc31a2198e5c6583f8c999e0f1d149de524c83bf2a93639a
|
data/lib/cafe_buy_duo.rb
CHANGED
@@ -4122,20 +4122,34 @@ class Wordpress
|
|
4122
4122
|
stretchy false
|
4123
4123
|
text "내용폴더경로 ex)C:\\내용\\폴더1"
|
4124
4124
|
}
|
4125
|
-
button('폴더째로 불러오기'){
|
4126
|
-
|
4127
|
-
|
4128
|
-
path = @data['이미지설정']['폴더경로2'].text.to_s.force_encoding('utf-8').force_encoding('utf-8')
|
4129
|
-
Dir.entries(@data['이미지설정']['폴더경로2'].text.to_s.force_encoding('utf-8')).each do |file|
|
4130
|
-
if file == '.' or file == '..'
|
4125
|
+
button('폴더째로 불러오기') {
|
4126
|
+
on_clicked {
|
4127
|
+
path = @data['이미지설정']['폴더경로2'].text.to_s.force_encoding('utf-8')
|
4131
4128
|
|
4132
|
-
|
4133
|
-
|
4134
|
-
|
4129
|
+
# 경로가 유효한지 확인
|
4130
|
+
if Dir.exist?(path)
|
4131
|
+
Dir.entries(path).each do |file|
|
4132
|
+
if file == '.' or file == '..'
|
4133
|
+
next
|
4134
|
+
else
|
4135
|
+
begin
|
4136
|
+
# 파일을 열고 내용을 읽어서 추가
|
4137
|
+
file_data = File.open(path + '/' + file, 'r', encoding: 'utf-8').read
|
4138
|
+
@data['내용설정']['내용'] << [false, file, file_data]
|
4139
|
+
rescue => e
|
4140
|
+
# 파일을 열 수 없는 경우, 오류 메시지 출력
|
4141
|
+
puts "파일을 열 수 없습니다: #{file}, 오류: #{e.message}"
|
4142
|
+
end
|
4143
|
+
end
|
4135
4144
|
end
|
4145
|
+
|
4146
|
+
# 내용 배열에서 마지막 빈 항목 제거
|
4147
|
+
@data['내용설정']['내용'] << []
|
4148
|
+
@data['내용설정']['내용'].pop
|
4149
|
+
else
|
4150
|
+
# 경로가 유효하지 않을 경우, 오류 메시지 출력
|
4151
|
+
puts "경로가 존재하지 않습니다: #{path}"
|
4136
4152
|
end
|
4137
|
-
@data['내용설정']['내용'] << []
|
4138
|
-
@data['내용설정']['내용'].pop
|
4139
4153
|
}
|
4140
4154
|
}
|
4141
4155
|
}
|
@@ -4220,19 +4234,28 @@ class Wordpress
|
|
4220
4234
|
stretchy false
|
4221
4235
|
text "사진폴더경로 ex)C:\\사진\\폴더2"
|
4222
4236
|
}
|
4223
|
-
button('
|
4224
|
-
|
4225
|
-
|
4226
|
-
|
4227
|
-
|
4228
|
-
|
4229
|
-
|
4230
|
-
|
4231
|
-
|
4237
|
+
button('폴더째로 불러오기') {
|
4238
|
+
on_clicked {
|
4239
|
+
path = @data['이미지설정']['폴더경로'].text.to_s.force_encoding('utf-8')
|
4240
|
+
|
4241
|
+
# 경로가 유효한지 확인
|
4242
|
+
if Dir.exist?(path)
|
4243
|
+
Dir.entries(path).each do |file|
|
4244
|
+
if file == '.' or file == '..'
|
4245
|
+
next
|
4246
|
+
else
|
4247
|
+
# 폴더 내의 파일을 이미지 리스트에 추가
|
4248
|
+
@data['이미지설정']['이미지'] << [false, file, path + "\\" + file.force_encoding('utf-8')]
|
4249
|
+
end
|
4232
4250
|
end
|
4251
|
+
|
4252
|
+
# 마지막 빈 항목 추가 후 제거 (원래 로직에 맞춰)
|
4253
|
+
@data['이미지설정']['이미지'] << []
|
4254
|
+
@data['이미지설정']['이미지'].pop
|
4255
|
+
else
|
4256
|
+
# 경로가 존재하지 않으면 경고 메시지 출력
|
4257
|
+
puts "경로가 존재하지 않습니다: #{path}"
|
4233
4258
|
end
|
4234
|
-
@data['이미지설정']['이미지'] << []
|
4235
|
-
@data['이미지설정']['이미지'].pop
|
4236
4259
|
}
|
4237
4260
|
}
|
4238
4261
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cafe_buy_duo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: File to Clipboard gem
|
14
14
|
email: mymin26@naver.com
|