baqu2213 commited on
Commit
7298ef6
โ€ข
1 Parent(s): dbea0b3

Upload 2 files

Browse files
Danbooru Prompt Selector/TEST2024/NAIA_0107_testv3.exe CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9feca3cdd1196a20b982072bdc329aa28eb4cf5282199f8dc4fa59f8881c3521
3
- size 837947086
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0a0e46231dc0dcaddf1afef90d32b03fd32058683b065417577336f866c22cee
3
+ size 837990074
Danbooru Prompt Selector/TEST2024/NAIA_0107_testv3.py CHANGED
@@ -29,6 +29,9 @@ import requests
29
  import base64
30
  import queue
31
  import webbrowser
 
 
 
32
 
33
  class Data:
34
  def __init__(self, wlist, tagbag, arti_list, copyright_list_reformatted, cd, remove_result_e, remove_result_qe):
@@ -315,6 +318,14 @@ class Automation_setting(customtkinter.CTkToplevel):
315
  app.automation_button.deselect()
316
  if self.windows_shutdown.get() == 1:
317
  shutdown_computer()
 
 
 
 
 
 
 
 
318
 
319
  while not stop_event.is_set() and app.auto_time_left > 0:
320
  time.sleep(1)
@@ -336,6 +347,14 @@ class Automation_setting(customtkinter.CTkToplevel):
336
  app.automation_button.deselect()
337
  if self.windows_shutdown.get() == 1:
338
  shutdown_computer()
 
 
 
 
 
 
 
 
339
 
340
  while not stop_event.is_set():
341
  time.sleep(1) # ์ฃผ๊ธฐ์ ์œผ๋กœ ํ™•์ธ
@@ -1144,6 +1163,7 @@ class App(customtkinter.CTk):
1144
  basedir = sys._MEIPASS
1145
  else:
1146
  basedir = os.path.dirname(__file__)
 
1147
  ctypes.windll.gdi32.AddFontResourceW(os.path.abspath(os.path.join(basedir,"Pretendard-Bold.otf")))
1148
  ctypes.windll.gdi32.AddFontResourceW(os.path.abspath(os.path.join(basedir,"Pretendard-Regular.otf")))
1149
  my_font = customtkinter.CTkFont('Pretendard', 13)
@@ -2482,9 +2502,21 @@ class App(customtkinter.CTk):
2482
  self.image_history_button_up.configure(text="โ–ฒ")
2483
  self.image_history_button_down.configure(text="โ–ผ")
2484
 
 
 
 
 
 
 
 
 
 
 
 
2485
  self.control_pressed = False
2486
  self.bind_all("<Control_L>", on_ctrl_press)
2487
  self.bind_all("<KeyRelease-Control_L>", on_ctrl_release)
 
2488
  self.last_window_size = None
2489
  self.random_artist_select = "global"
2490
  self.random_artist_list_length = 0
@@ -3273,12 +3305,6 @@ class App(customtkinter.CTk):
3273
 
3274
 
3275
 
3276
-
3277
-
3278
-
3279
-
3280
-
3281
-
3282
  if __name__ == "__main__":
3283
  customtkinter.set_appearance_mode("dark")
3284
  app = App()
 
29
  import base64
30
  import queue
31
  import webbrowser
32
+ import ctypes
33
+ from plyer import notification
34
+ import subprocess
35
 
36
  class Data:
37
  def __init__(self, wlist, tagbag, arti_list, copyright_list_reformatted, cd, remove_result_e, remove_result_qe):
 
318
  app.automation_button.deselect()
319
  if self.windows_shutdown.get() == 1:
320
  shutdown_computer()
321
+ else:
322
+ notification.notify(
323
+ title = '์ž๋™์ƒ์„ฑ์ด ์™„๋ฃŒ๋˜์—ˆ์–ด์š”.',
324
+ message = '๊ฒฐ๊ณผ๋ฅผ ํ™•์ธํ•ด ๋ณด์„ธ์š”.',
325
+ app_name = "NAIA",
326
+ app_icon = app.basedir+'/icoico.ico',
327
+ timeout = 5, # seconds
328
+ )
329
 
330
  while not stop_event.is_set() and app.auto_time_left > 0:
331
  time.sleep(1)
 
347
  app.automation_button.deselect()
348
  if self.windows_shutdown.get() == 1:
349
  shutdown_computer()
350
+ else:
351
+ notification.notify(
352
+ title = '์ž๋™์ƒ์„ฑ์ด ์™„๋ฃŒ๋˜์—ˆ์–ด์š”.',
353
+ message = '๊ฒฐ๊ณผ๋ฅผ ํ™•์ธํ•ด ๋ณด์„ธ์š”.',
354
+ app_name = "NAIA",
355
+ app_icon = app.basedir+'/icoico.ico',
356
+ timeout = 5, # seconds
357
+ )
358
 
359
  while not stop_event.is_set():
360
  time.sleep(1) # ์ฃผ๊ธฐ์ ์œผ๋กœ ํ™•์ธ
 
1163
  basedir = sys._MEIPASS
1164
  else:
1165
  basedir = os.path.dirname(__file__)
1166
+ self.basedir = basedir
1167
  ctypes.windll.gdi32.AddFontResourceW(os.path.abspath(os.path.join(basedir,"Pretendard-Bold.otf")))
1168
  ctypes.windll.gdi32.AddFontResourceW(os.path.abspath(os.path.join(basedir,"Pretendard-Regular.otf")))
1169
  my_font = customtkinter.CTkFont('Pretendard', 13)
 
2502
  self.image_history_button_up.configure(text="โ–ฒ")
2503
  self.image_history_button_down.configure(text="โ–ผ")
2504
 
2505
+ def on_escape(event=None):
2506
+ self.focus_set()
2507
+ self.bind('<Escape>', on_escape)
2508
+
2509
+ def copy_file(event):
2510
+ focused_widget = self.focus_get()
2511
+ if focused_widget == self:
2512
+ file_path = self.image_queue[self.current_window][3]
2513
+ command = f"powershell -command \"Get-Item '{file_path}' | Set-Clipboard\""
2514
+ subprocess.run(command, shell=True)
2515
+
2516
  self.control_pressed = False
2517
  self.bind_all("<Control_L>", on_ctrl_press)
2518
  self.bind_all("<KeyRelease-Control_L>", on_ctrl_release)
2519
+ self.bind('<Control-c>', copy_file)
2520
  self.last_window_size = None
2521
  self.random_artist_select = "global"
2522
  self.random_artist_list_length = 0
 
3305
 
3306
 
3307
 
 
 
 
 
 
 
3308
  if __name__ == "__main__":
3309
  customtkinter.set_appearance_mode("dark")
3310
  app = App()