tizdppd 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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tizdppd.rb +15 -15
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7642eca4eef7d1f311213730f6d2509acbd393fd0495f082b87aa0d499dd4e03
4
- data.tar.gz: a446b194b0fd784e24301b7d28cf2b487610ce09b9944bb488098afecd18d1d1
3
+ metadata.gz: e7f60635d2491a03b93c7953acb54eaa0a2fa6d1caab3d2ad15fc1e0e94438a9
4
+ data.tar.gz: 71ae5b9e3fa03bba44667b9fad11149892ea30a31f8bba93495ded1e0a3f1923
5
5
  SHA512:
6
- metadata.gz: 75da54bdae61b04878bbe7766682cdd2134accbac11650f165bdcd319aab2ad29ee247964dc0a27ae5312a4bd3eda486755ac09a545d8a2ea0db822428f84fc4
7
- data.tar.gz: 5fe8da8588329d12ceefb64f93d146a60abcb0fb1b4036733cce03d26eef1c38f2c4543d94f573e20f56f6970d520fedb1fdd460bc5dbebc8d703e632542fd81
6
+ metadata.gz: cd26a654fb67e5ca8fdf7cbd66fc004c212c2a10ae5518879e6545628d81395ea2c84448020d6302fd7ddbe9c917c66ad13dd6df1100989d27eeda127044f410
7
+ data.tar.gz: b5bd5cb682a7266147c90c3834d0874fa837f7275f45296a0fd0482a60a12ecca9ce4afd6ce979a3762478fea35c0d2f3d6c967f90adb22b30ab4625785c8fe9
data/lib/tizdppd.rb CHANGED
@@ -2226,33 +2226,33 @@ class Wordpress
2226
2226
  }
2227
2227
  button(' 폴더째로 불러오기 ') {
2228
2228
 
2229
- on_clicked {
2230
- begin
2229
+ on_clicked {
2231
2230
  path = @data['디엠설정']['폴더경로'].text.to_s.force_encoding('utf-8').force_encoding('utf-8')
2232
2231
 
2233
- if Dir.exists?(path) # 경로가 존재하는지 확인
2232
+ # 경로가 유효한지 확인
2233
+ if Dir.exist?(path)
2234
2234
  Dir.entries(path).each do |file|
2235
- # '.' '..'을 제외한 파일들만 처리
2236
- if file != '.' and file != '..'
2235
+ if file == '.' or file == '..'
2236
+ next
2237
+ else
2237
2238
  begin
2238
- file_data = File.open(path+'/'+file, 'r', encoding: 'utf-8').read()
2239
- @data['디엠설정']['내용'] << [false, file, file_data]
2239
+ # 파일을 열고 내용을 읽어서 추가
2240
+ file_data = File.open(path + '/' + file, 'r', encoding: 'utf-8').read
2241
+ @data['디엠설정']['디엠'] << [false, file, file_data]
2240
2242
  rescue => e
2241
- # 파일 열기 오류 처리
2242
- puts "파일 '#{file}'을 열 수 없습니다: #{e.message}"
2243
+ # 파일을 수 없는 경우, 오류 메시지 출력
2244
+ puts "파일을 열 수 없습니다: #{file}, 오류: #{e.message}"
2243
2245
  end
2244
2246
  end
2245
2247
  end
2248
+
2249
+ # 내용 배열에서 마지막 빈 항목 제거
2246
2250
  @data['디엠설정']['디엠'] << []
2247
2251
  @data['디엠설정']['디엠'].pop
2248
2252
  else
2249
- # 경로가 없으면 경고 메시지 출력
2250
- puts "경로 '#{path}'이 존재하지 않습니다."
2253
+ # 경로가 유효하지 않을 경우, 오류 메시지 출력
2254
+ puts "경로가 존재하지 않습니다: #{path}"
2251
2255
  end
2252
- rescue => e
2253
- # 경로 처리 중 발생한 오류 처리
2254
- puts "오류 발생: #{e.message}"
2255
- end
2256
2256
  }
2257
2257
  }
2258
2258
  }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tizdppd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
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-04-30 00:00:00.000000000 Z
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