-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
1,305 additions
and
521 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
SECRET_KEY='django-insecure-fl77=+_#!xbj+6dnet8(m#(@%ybq1k=+_dw+h^s+cn8@#i5-i*' | ||
DEBUG=True | ||
ENGINE='django.db.backends.mysql' | ||
DBNAME='catchcunning' | ||
DBHOST='localhost' | ||
DBPORT='3306' | ||
DBUSER='du' | ||
DBPW='aa1541' | ||
STATIC_URL='/static/' | ||
EMAIL_BACKEND='django.core.mail.backends.smtp.EmailBackend' | ||
EMAIL_HOST='email-smtp.ap-northeast-2.amazonaws.com' | ||
EMAIL_PORT=587 | ||
EMAIL_USE_TLS=True | ||
EMAIL_HOST_USER='AKIAS5D7RJ4TB2BJ4P63' | ||
EMAIL_HOST_PASSWORD='BDmxjvri6lwORjy0Ce7odErul2Kw78YlI9e+U/jYAOtA' | ||
DEFAULT_FROM_EMAIL='hn06038@gmail.com' | ||
MEDIA_URL='/media/' |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import json | ||
from signal import alarm | ||
import requests | ||
import sys | ||
|
||
|
||
def sendToMeMessage(text): | ||
|
||
header = {"Authorization": 'Bearer ' + KAKAO_TOKEN} | ||
url = "https://kapi.kakao.com/v2/api/talk/memo/default/send" #나에게 보내기 주소 | ||
|
||
post = { | ||
"object_type": "text", | ||
"text": text, | ||
"link": { | ||
"web_url": "https://developers.kakao.com", | ||
"mobile_web_url": "https://developers.kakao.com" | ||
}, | ||
|
||
"button_title": "바로 확인" | ||
} | ||
data = {"template_object": json.dumps(post)} | ||
return requests.post(url, headers=header, data=data) | ||
|
||
alarm = "" | ||
for arg in sys.argv: | ||
alarm += (str(arg)) | ||
|
||
|
||
message = alarm.replace("meeting/kakaoAlarm.py", "") | ||
|
||
|
||
# alarm = sys.argv[1] | ||
|
||
# if len(sys.argv) != 2: | ||
# print("Insufficient arguments") | ||
# sys.exit() | ||
|
||
|
||
text = "나에게 보내는 카톡: " + message | ||
KAKAO_TOKEN = 'hbMIfEbVMXYnvukOHRjf2uBVlPp0rQOeewUEc-GgCj1zGAAAAYLX3t4F' | ||
|
||
print(sendToMeMessage(text).text) | ||
|
||
|
||
# import requests | ||
# import json | ||
|
||
# url = 'https://kauth.kakao.com/oauth/token' | ||
# client_id = '5150e927350491eae8a6f52e4a81c17f' | ||
# redirect_uri = 'https://example.com/oauth' | ||
# code = 'qeW907Pscxzck_KBY1VJUd-aZOcZxtIzjRlrGm31HZk3DIC-hvqgdPF26PPOUTffvOSH8Ao9dNkAAAGC19zKwA' | ||
|
||
# data = { | ||
# 'grant_type':'authorization_code', | ||
# 'client_id':client_id, | ||
# 'redirect_uri':redirect_uri, | ||
# 'code': code, | ||
# } | ||
|
||
# response = requests.post(url, data=data) | ||
# tokens = response.json() | ||
|
||
# #발행된 토큰 저장 | ||
# with open("token.json","w") as kakao: | ||
# json.dump(tokens, kakao) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.