tizdppz 0.0.1 → 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/tizdppz.rb +16 -22
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae8ae5e1819d7cb47e5deaa609847fc04ab21787b3d03aea38cefdc6cff6913e
4
- data.tar.gz: 5364ede25427c2f7f3084ab70f095e92b9a079f6594fb1d7b896355d3adc6170
3
+ metadata.gz: 48e51bf5b38c1f0e0cc9fb1e7e628a17bae1f334250af9fba168bd949f72ae53
4
+ data.tar.gz: ad28043a564db167cfcc6d14d676b186ab31a444e7ecd474a2a1e9c298991208
5
5
  SHA512:
6
- metadata.gz: 5b46be8781adb4e93cb1eb2bdf8f0ca9aa5963837decb6ab69b478f4d88b1e8169ebc7576c3ef4d70fb628e2321640655ca316b439d0d109741439774759caeb
7
- data.tar.gz: c8f3d7a7e9e49bc6b6c05ff0e1887619ac49cdd3e05cf5808c1bc3309f99d38f792f76857cf4f90c8fcf235d9474c178af00ea0e5dd1e9d14836a5c72591692d
6
+ metadata.gz: aaf96d1c2ad4cd6ecb6934fca7d7a1f39d42ae5cd511c1ce2086c20431b8f9036ce709e646ffae01b24407bb9d0f50a2c28cd8aa65c28c3dc6fb49272435e2d6
7
+ data.tar.gz: 7fef59f972689e6669aacab70a7dd434bab1fcf2fda07c924c8e3564fff1cd44d812bca9240f97cb362cfccba9014c970e3ce1be93bbcc79d182de8527199fdb
data/lib/tizdppz.rb CHANGED
@@ -9,7 +9,6 @@ require 'open3'
9
9
  require 'clipboard'
10
10
  require 'crack'
11
11
  require 'uri'
12
- require 'digest'
13
12
  require 'rainbow/refinement'
14
13
  require 'win32ole'
15
14
  require 'timeout'
@@ -416,12 +415,7 @@ class Naver
416
415
  end
417
416
  end
418
417
 
419
- def create_id
420
- @seed += 1
421
- hash = Digest::SHA256.hexdigest((Time.now.to_i+@seed).to_s).to_s
422
- answer = "SE-#{hash[0..7]}-#{hash[8..11]}-#{hash[12..15]}-#{hash[16..19]}-#{hash[20..31]}"
423
- return answer
424
- end
418
+
425
419
 
426
420
  def update(content, option, tagg, table_comment_input, captcha_api_key, sleep_delay, user_id)
427
421
  @tagg = tagg
@@ -2151,33 +2145,33 @@ end
2151
2145
  }
2152
2146
  button(' 폴더째로 불러오기 ') {
2153
2147
 
2154
- on_clicked {
2155
- begin
2148
+ on_clicked {
2156
2149
  path = @data['디엠설정']['폴더경로'].text.to_s.force_encoding('utf-8').force_encoding('utf-8')
2157
2150
 
2158
- if Dir.exists?(path) # 경로가 존재하는지 확인
2151
+ # 경로가 유효한지 확인
2152
+ if Dir.exist?(path)
2159
2153
  Dir.entries(path).each do |file|
2160
- # '.' '..'을 제외한 파일들만 처리
2161
- if file != '.' and file != '..'
2154
+ if file == '.' or file == '..'
2155
+ next
2156
+ else
2162
2157
  begin
2163
- file_data = File.open(path+'/'+file, 'r', encoding: 'utf-8').read()
2164
- @data['디엠설정']['내용'] << [false, file, file_data]
2158
+ # 파일을 열고 내용을 읽어서 추가
2159
+ file_data = File.open(path + '/' + file, 'r', encoding: 'utf-8').read
2160
+ @data['디엠설정']['디엠'] << [false, file, file_data]
2165
2161
  rescue => e
2166
- # 파일 열기 오류 처리
2167
- puts "파일 '#{file}'을 열 수 없습니다: #{e.message}"
2162
+ # 파일을 수 없는 경우, 오류 메시지 출력
2163
+ puts "파일을 열 수 없습니다: #{file}, 오류: #{e.message}"
2168
2164
  end
2169
2165
  end
2170
2166
  end
2167
+
2168
+ # 내용 배열에서 마지막 빈 항목 제거
2171
2169
  @data['디엠설정']['디엠'] << []
2172
2170
  @data['디엠설정']['디엠'].pop
2173
2171
  else
2174
- # 경로가 없으면 경고 메시지 출력
2175
- puts "경로 '#{path}'이 존재하지 않습니다."
2172
+ # 경로가 유효하지 않을 경우, 오류 메시지 출력
2173
+ puts "경로가 존재하지 않습니다: #{path}"
2176
2174
  end
2177
- rescue => e
2178
- # 경로 처리 중 발생한 오류 처리
2179
- puts "오류 발생: #{e.message}"
2180
- end
2181
2175
  }
2182
2176
  }
2183
2177
  }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tizdppz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
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