tiupz 0.0.2 → 0.0.3
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/tiupz.rb +23 -23
- 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: cc9dc0d55841892b1b11cc144c7889d5cdacec4357923482617734142f74ac0c
|
4
|
+
data.tar.gz: f81655218442aa2c03db9de178b2bb7ff3d37ca6b8dad047305ffda9f7e3e2dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4951798671d491b077e36e3e3f59d185f69cc0b7937b718fbebaf67ca097ddc3bc95692ea2af9f38ed2e4716afa4007f87f960f5c54855b29a37c921a9f3821
|
7
|
+
data.tar.gz: 8af9095db421249b5fe1dd53c6572229b43e562ad318cfedd3502d6f2ef53a1f80ff1cb99f7595888162450ae26102193df27e8f63464dbfb1614a3412f260c7
|
data/lib/tiupz.rb
CHANGED
@@ -2312,33 +2312,33 @@ end
|
|
2312
2312
|
button(' 폴더째로 불러오기 ') {
|
2313
2313
|
|
2314
2314
|
on_clicked {
|
2315
|
-
|
2316
|
-
|
2317
|
-
|
2318
|
-
|
2319
|
-
|
2320
|
-
|
2321
|
-
|
2322
|
-
|
2323
|
-
|
2324
|
-
|
2325
|
-
|
2326
|
-
|
2327
|
-
|
2328
|
-
|
2315
|
+
path = @data['디엠설정']['폴더경로'].text.to_s.force_encoding('utf-8').force_encoding('utf-8')
|
2316
|
+
|
2317
|
+
# 경로가 유효한지 확인
|
2318
|
+
if Dir.exist?(path)
|
2319
|
+
Dir.entries(path).each do |file|
|
2320
|
+
if file == '.' or file == '..'
|
2321
|
+
next
|
2322
|
+
else
|
2323
|
+
begin
|
2324
|
+
# 파일을 열고 내용을 읽어서 추가
|
2325
|
+
file_data = File.open(path + '/' + file, 'r', encoding: 'utf-8').read
|
2326
|
+
@data['디엠설정']['디엠'] << [false, file, file_data]
|
2327
|
+
rescue => e
|
2328
|
+
# 파일을 열 수 없는 경우, 오류 메시지 출력
|
2329
|
+
puts "파일을 열 수 없습니다: #{file}, 오류: #{e.message}"
|
2329
2330
|
end
|
2330
2331
|
end
|
2331
|
-
@data['디엠설정']['디엠'] << []
|
2332
|
-
@data['디엠설정']['디엠'].pop
|
2333
|
-
else
|
2334
|
-
# 경로가 없으면 경고 메시지 출력
|
2335
|
-
puts "경로 '#{path}'이 존재하지 않습니다."
|
2336
2332
|
end
|
2337
|
-
|
2338
|
-
#
|
2339
|
-
|
2333
|
+
|
2334
|
+
# 내용 배열에서 마지막 빈 항목 제거
|
2335
|
+
@data['디엠설정']['디엠'] << []
|
2336
|
+
@data['디엠설정']['디엠'].pop
|
2337
|
+
else
|
2338
|
+
# 경로가 유효하지 않을 경우, 오류 메시지 출력
|
2339
|
+
puts "경로가 존재하지 않습니다: #{path}"
|
2340
2340
|
end
|
2341
|
-
|
2341
|
+
}
|
2342
2342
|
}
|
2343
2343
|
}
|
2344
2344
|
}
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tiupz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zon
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-05-01 00:00:00.000000000 Z
|
11
11
|
dependencies: []
|
12
12
|
description: File to Clipboard gem
|
13
13
|
email: mymin26@naver.com
|