chohj06ms commited on
Commit
1b60bb3
β€’
1 Parent(s): 8a6c79e

Delete fn.py

Browse files
Files changed (1) hide show
  1. fn.py +0 -44
fn.py DELETED
@@ -1,44 +0,0 @@
1
- from datetime import datetime
2
- import pytz
3
- import os
4
- import shutil
5
-
6
-
7
-
8
- def hex_to_rgb(hex_color):
9
- # Remove the '#' character if it exists
10
- hex_color = hex_color.lstrip('#')
11
-
12
- # Convert the hex string to integers
13
- r, g, b = tuple(int(hex_color[i:i + 2], 16) for i in (0, 2, 4))
14
- return r, g, b
15
-
16
-
17
- def get_kr_time():
18
- # ν•œκ΅­ μ‹œκ°„λŒ€ μ„€μ •
19
- korea_time_zone = pytz.timezone('Asia/Seoul')
20
-
21
- # ν˜„μž¬ μ‹œκ°„μ„ ν•œκ΅­ μ‹œκ°„λŒ€λ‘œ λ³€ν™˜
22
- current_time_in_korea = datetime.now(korea_time_zone)
23
-
24
- # μ›ν•˜λŠ” ν˜•μ‹μœΌλ‘œ μ‹œκ°„ ν¬λ§·νŒ…
25
- return current_time_in_korea.strftime("%Y%m%d-%H%M%S")
26
-
27
- def url_mapping(url):
28
- # 각 λ¬Έμžμ—΄μ— λŒ€μ‘ν•˜λŠ” URL 맀핑
29
- url_mapping = {
30
- "tripleS website": "https://triplescosmos.com/",
31
- "tripleS youtube": "https://youtube.com/@triplescosmos",
32
- "tripleS 𝕏": "https://x.com/triplescosmos",
33
- "tripleS discord": "https://discord.gg/triplescosmos"
34
- }
35
-
36
- # qr_url이 λ§€ν•‘λœ λ¬Έμžμ—΄ 쀑 ν•˜λ‚˜λΌλ©΄ ν•΄λ‹Ή URL을, μ•„λ‹ˆλΌλ©΄ qr_url κ·ΈλŒ€λ‘œλ₯Ό λ°˜ν™˜
37
- return url_mapping.get(url, url)
38
-
39
-
40
- def storage(name):
41
- # '/data' 폴더λ₯Ό 'data.zip'으둜 μ••μΆ•
42
- shutil.make_archive(f'/data/{name}', 'zip', f'/data/{name}')
43
- shutil.rmtree(f'/data/{name}')
44
-