tidpz 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/tidpz.rb +24 -24
- 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: 6f50986d421fa93201ac296175efd66e15d29a0cd0781d0d6317a3b4a6bbb59e
|
4
|
+
data.tar.gz: f773d9f4fe2b0b1eac1c3e1321f2c0dba4f2581b5a7aaf251d8f07ff1ead38af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fcd24c24a8c3ea469bc29494c285b0e44846436f3dc22ee7d05c31546b7c9a8709ceb1aac96b424f2ed916d57601d6781db0e6ddcafba423423dfd34ef0a1bf
|
7
|
+
data.tar.gz: 635c2aabca694ddf7dd4955064e20f583418f4ba6ca078da0e93aa3c9c89af5da83ae3c8bd848d780a4906a9d3dc20efe57791ebe6605f7960c6b7e6b2fd56ea
|
data/lib/tidpz.rb
CHANGED
@@ -2046,33 +2046,33 @@ end
|
|
2046
2046
|
}
|
2047
2047
|
button(' 폴더째로 불러오기 ') {
|
2048
2048
|
|
2049
|
-
|
2050
|
-
|
2051
|
-
|
2052
|
-
|
2053
|
-
|
2054
|
-
|
2055
|
-
|
2056
|
-
|
2057
|
-
begin
|
2058
|
-
file_data = File.open(path+'/'+file, 'r', encoding: 'utf-8').read()
|
2059
|
-
@data['디엠설정']['내용'] << [false, file, file_data]
|
2060
|
-
rescue => e
|
2061
|
-
# 파일 열기 오류 처리
|
2062
|
-
puts "파일 '#{file}'을 열 수 없습니다: #{e.message}"
|
2063
|
-
end
|
2064
|
-
end
|
2065
|
-
end
|
2066
|
-
@data['디엠설정']['디엠'] << []
|
2067
|
-
@data['디엠설정']['디엠'].pop
|
2049
|
+
on_clicked {
|
2050
|
+
path = @data['디엠설정']['폴더경로'].text.to_s.force_encoding('utf-8').force_encoding('utf-8')
|
2051
|
+
|
2052
|
+
# 경로가 유효한지 확인
|
2053
|
+
if Dir.exist?(path)
|
2054
|
+
Dir.entries(path).each do |file|
|
2055
|
+
if file == '.' or file == '..'
|
2056
|
+
next
|
2068
2057
|
else
|
2069
|
-
|
2070
|
-
|
2058
|
+
begin
|
2059
|
+
# 파일을 열고 내용을 읽어서 추가
|
2060
|
+
file_data = File.open(path + '/' + file, 'r', encoding: 'utf-8').read
|
2061
|
+
@data['디엠설정']['디엠'] << [false, file, file_data]
|
2062
|
+
rescue => e
|
2063
|
+
# 파일을 열 수 없는 경우, 오류 메시지 출력
|
2064
|
+
puts "파일을 열 수 없습니다: #{file}, 오류: #{e.message}"
|
2065
|
+
end
|
2071
2066
|
end
|
2072
|
-
rescue => e
|
2073
|
-
# 경로 처리 중 발생한 오류 처리
|
2074
|
-
puts "오류 발생: #{e.message}"
|
2075
2067
|
end
|
2068
|
+
|
2069
|
+
# 내용 배열에서 마지막 빈 항목 제거
|
2070
|
+
@data['디엠설정']['디엠'] << []
|
2071
|
+
@data['디엠설정']['디엠'].pop
|
2072
|
+
else
|
2073
|
+
# 경로가 유효하지 않을 경우, 오류 메시지 출력
|
2074
|
+
puts "경로가 존재하지 않습니다: #{path}"
|
2075
|
+
end
|
2076
2076
|
}
|
2077
2077
|
}
|
2078
2078
|
}
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tidpz
|
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
|