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