1) ํ์ด์ฌ ์คํ ํ์ผ ๋ง๋ค๊ธฐ
1. ๋จผ์ ์ฝ๋๋ฅผ gpt์ ์
๋ ฅํ๋ , ์์ ์ด ์ฐพ์๋ณด๋ , ๋ง๋ค๋ ํด์ ์ฝ๋๋ฅผ ์์ฑํ๊ณ ์คํ ์ํต๋๋ค. (์ฝ๋ ์คํ๋์ด์ผ ๊ฐ๋ฅ)
import tkinter as tk
import datetime
class CountdownApp:
def __init__(self, master):
self.master = master
self.master.title("์ ๋ณด์ฒ๋ฆฌ๊ธฐ์ฌ ํ๊ธฐ ํฉ๊ฒฉ ๊ฐ๋ณด์๊ณ !")
self.master.attributes("-fullscreen", True)
self.end_date = datetime.datetime(2023, 5, 13)
self.remaining_time_str = tk.StringVar(value=self.get_remaining_time())
self.remaining_time_label = tk.Label(
self.master,
textvariable=self.remaining_time_str,
font=("Arial", 96),
fg="blue",
bg="gray",
)
self.remaining_time_label.pack(pady=20)
# Create image label
self.image_label = tk.Label(self.master)
self.image_label.pack(pady=10)
self.message_label = tk.Label(
self.master,
text="์กฐ์ํ ์์์์ ํ์ดํ
!",
font=("Arial", 48),
fg="white",
bg="green",
)
self.message_label.pack(pady=10)
# Load image and set it to the image label
self.kakao_image = tk.PhotoImage(file="shsu.png")
self.image_label.configure(image=self.kakao_image)
self.countdown()
def get_remaining_time(self):
remaining = self.end_date - datetime.datetime.now()
days, seconds = remaining.days, remaining.seconds
hours = seconds // 3600
minutes = (seconds % 3600) // 60
seconds = seconds % 60
remaining_time = f"{days:02}:{hours:02}:{minutes:02}:{seconds:02}"
return remaining_time
def countdown(self):
self.remaining_time_str.set(self.get_remaining_time())
if datetime.datetime.now() >= self.end_date:
self.remaining_time_str.set("Time's up!")
return
self.master.after(1000, self.countdown)
if __name__ == "__main__":
root = tk.Tk()
app = CountdownApp(root)
root.mainloop()
๊ฒฐ๊ณผ๋ ์ด๋ ๊ฒ ๋์ค๊ตฌ์ฌ~~ ์ด๊ฑธ ํ์ผ๋ก ๋ง๋ค์ด ๋ณด๊ฒ ์ต๋๋ค!! (์ ์ฒ๊ธฐ ์ค๋นํ์๋๋ถ๋ค ํ์ด๋ง)
2. ํฐ๋ฏธ๋์ pip install pyinstaller์ ์
๋ ฅํด์ค๋๋ค
3. ๊ทธ ํ์ pyinstaller -w ํ์ผ๋ช
(countdown_gosim.py)์ ํฐ๋ฏธ๋์ ์
๋ ฅํด์ค๋๋ค
4. ๋ง์ง๋ง์ผ๋ก dist ์์ ์๋ ์ฑ
๋ชจ์ ์คํ ํ์ผ์ ์ฐพ์์ ์ด์ด์ฃผ๋ฉด ํ์ด์ฌ์ด ์์ด๋ ์ฌ์ฉ ๊ฐ๋ฅํ ์คํ ํ์ผ ๋ง๋ค๊ธฐ ๋!!!
2) chat gpt๋ฅผ vscode ์์ผ๋ก ๋ฐ๋ฆฌ๊ณ ์ค๊ธฐ๐
(421) ChatGPT๋ฅผ VSCode์์ผ๋ก ๋ฐ๋ฆฌ๊ณ ์ค์ | ์ธ๊ณต์ง๋ฅ ์ฝ๋ฉ - YouTube
https://platform.openai.com/account/api-keys
1. ์ ๋งํฌ ๋ค์ด๊ฐ์
์ ํค๋ฅผ ๋ง๋ค๊ณ ๋ณต์ฌ๋ฅผ ํํ์
2. ์ค์ (Setting) ๋ค์ด๊ฐ์
์ Goto Location: Alternative Definition Command ๋ฐ์ ๋ณต์ฌํ ํค๋ฅผ ๋ณต์ฌ๋ถ์ฌ๋ฃ๊ธฐ ํ๋ฉด ๋!!3.
++chat gpt๋ฅผ ๋ถ๋ฌ์ค๋ ๋ฐฉ๋ฒ์ ์ด๋ฌ์ด๋ฌํฉ๋๋น