wp_posting_zon 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/wp_posting_zon.rb +27 -7
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe81f2c693e790f25f7af4242eae8dd65fce3117e2eac28c28ab9ef30c04f533
4
- data.tar.gz: db0052411d585dfc965d5a14a958bfa2a8201ce138ca4f849e14bb342bc171aa
3
+ metadata.gz: 90696d79e57c50464e4d6ef3278261617a1fbb15990365b5c9da07f8dbeed5cd
4
+ data.tar.gz: a6d5cc1cccac9fe3c5bdc8c064f7874d7b3c8e86c9733ce3828c10f81d1ffe87
5
5
  SHA512:
6
- metadata.gz: 120aa20512b4877e6be481716fc1bf6ed5445bb1e609a504c8c432799a81fdb420c7a1c7e12d133385d2807f43a49d2eeb751feb4a9e71c6f4711c9ab190ee10
7
- data.tar.gz: 55f531b7167558ae6e2781f0f7c0e6c63f225b3971724fc7dd3e2e6c3408d34ccf694e07255d51be006aae6587c0295b27b7c164fa94cee60f4af81a167ee402
6
+ metadata.gz: ec7085474ca62d8cb9d73ebc5eb4f5827e2a5d1d5eb7537a7f7f03080036a0f74191aa88146379e9f1bae7d1b6a294dc170decd2fcc886a84f90156bcaaff160
7
+ data.tar.gz: cc08cb475aad2a23ed8a48e3c17e1ced3f155d953a6877cc05753c3d88415ab73f7621b7c0b5a54174fd41af813c7c68b38fee6c2fb44045f4718ed05b1afa86
@@ -891,6 +891,11 @@ class Wordpress
891
891
  if @data['포스트설정']['내용과자동생성'].checked? == false and @data['포스트설정']['내용을자동생성'].checked? == false and @data['포스트설정']['막글삽입'].checked? == true
892
892
  snumber = @data['포스트설정']['막글삽입시작숫자'].text.to_s.to_i
893
893
  enumber = @data['포스트설정']['막글삽입끝숫자'].text.to_s.to_i
894
+ @data['포스트설정']['막글'] = @data['포스트설정']['막글'].split(' ').shuffle.join(' ')
895
+ @data['포스트설정']['막글'] = @data['포스트설정']['막글'].split(' ').shuffle.join(' ')
896
+ @data['포스트설정']['막글'] = @data['포스트설정']['막글'].split(' ').shuffle.join(' ')
897
+ @data['포스트설정']['막글'] = @data['포스트설정']['막글'].split(' ').shuffle.join(' ')
898
+ @data['포스트설정']['막글'] = @data['포스트설정']['막글'].split(' ').shuffle.join(' ')
894
899
  last_text = @data['포스트설정']['막글'][0..rand(snumber..enumber)].split(' ').shuffle.join(' ')
895
900
  content22 = last_text.split(' ')
896
901
  else
@@ -1296,6 +1301,11 @@ class Wordpress
1296
1301
  else
1297
1302
  snumber = @data['포스트설정']['막글삽입시작숫자'].text.to_s.to_i
1298
1303
  enumber = @data['포스트설정']['막글삽입끝숫자'].text.to_s.to_i
1304
+ @data['포스트설정']['막글'] = @data['포스트설정']['막글'].split(' ').shuffle.join(' ')
1305
+ @data['포스트설정']['막글'] = @data['포스트설정']['막글'].split(' ').shuffle.join(' ')
1306
+ @data['포스트설정']['막글'] = @data['포스트설정']['막글'].split(' ').shuffle.join(' ')
1307
+ @data['포스트설정']['막글'] = @data['포스트설정']['막글'].split(' ').shuffle.join(' ')
1308
+ @data['포스트설정']['막글'] = @data['포스트설정']['막글'].split(' ').shuffle.join(' ')
1299
1309
  last_text = @data['포스트설정']['막글'][0..rand(snumber..enumber)].split(' ').shuffle.join(' ')
1300
1310
 
1301
1311
  if @data['포스트설정']['막글삽입2'].checked?
@@ -2186,17 +2196,27 @@ class Wordpress
2186
2196
  }
2187
2197
  button('폴더째로불러오기'){
2188
2198
  stretchy false
2189
- on_clicked{
2199
+ on_clicked {
2190
2200
  path = @data['이미지설정']['폴더경로'].text.to_s.force_encoding('utf-8')
2191
- Dir.entries(@data['이미지설정']['폴더경로'].text.to_s).each do |file|
2192
- if file == '.' or file == '..'
2193
2201
 
2194
- else
2195
- @data['이미지설정']['이미지'] << [false, file, path+"\\"+file.force_encoding('utf-8')]
2202
+ # 경로가 유효한지 확인
2203
+ if Dir.exist?(path)
2204
+ Dir.entries(path).each do |file|
2205
+ if file == '.' or file == '..'
2206
+ next
2207
+ else
2208
+ # 폴더 내의 파일을 이미지 리스트에 추가
2209
+ @data['이미지설정']['이미지'] << [false, file, path + "\\" + file.force_encoding('utf-8')]
2210
+ end
2196
2211
  end
2212
+
2213
+ # 마지막 빈 항목 추가 후 제거 (원래 로직에 맞춰)
2214
+ @data['이미지설정']['이미지'] << []
2215
+ @data['이미지설정']['이미지'].pop
2216
+ else
2217
+ # 경로가 존재하지 않으면 경고 메시지 출력
2218
+ puts "경로가 존재하지 않습니다: #{path}"
2197
2219
  end
2198
- @data['이미지설정']['이미지'] << []
2199
- @data['이미지설정']['이미지'].pop
2200
2220
  }
2201
2221
  }
2202
2222
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wp_posting_zon
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
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-22 00:00:00.000000000 Z
11
+ date: 2025-01-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: File to Clipboard gem
14
14
  email: mymin26@naver.com