forked from Rock-Candy-Tea/hexo-circle-of-friends
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.py
101 lines (80 loc) · 1.97 KB
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
"""
全局设置
所有变量名必须大写,否则不读取
使用方法:
在需要使用设置变量的py文件引入settings处理器即可
示例(/handlers/exsample.py):
from handlers.coreSettings import config
# settings.py变量的使用
print(config.BASE_PATH)
# 载入的yml文件的使用,数据结构与原来一致
print(config.yml)
"""
import os
"""
综合 设置
"""
# 项目ROOT地址
BASE_PATH = os.path.abspath(os.path.dirname(__file__))
# debug模式
DEBUG = True
# debug leancloud验证
LC_APPID = "nSyYINNelN3OJdAbblDVNWM1-MdYXbMMI"
LC_APPKEY = "yxmDsLg0reOEa0DXfW8cfnee"
# debug 测试用的博客地址
# FRIENPAGE_LINK = "https://nekodeng.gitee.io/friends/"
FRIENPAGE_LINK = "https://zhangyazhuang.gitee.io/link/"
# FRIENPAGE_LINK = "https://blog.raxianch.moe/link"
"""
处理器 设置
"""
# 网页请求器
# TODO 未实装
# 超时(单位:秒)
TIMEOUT = 10
SSL = False
RETRY_MAX = 5
"""
功能 设置
"""
# github友链配置
GITHUB_FRIENDS_LINKS = {
"enable": True, # True 开启gitee issue兼容
"type": "normal", # volantis用户请在这里填写 volantis
"owner": "YDTRINLEY", # 填写你的github用户名
"repo": "hexo-circle-of-friends", # 填写你的github仓库名
"state": "open" # 填写抓取的issue状态(open/closed)
}
# gitee友链配置
GITEE_FRIENDS_LINKS = {
"enable": False, # True 开启gitee issue兼容
"type": "normal", # volantis用户请在这里填写 volantis
"owner": "Zfour", # 填写你的github用户名
"repo": "zfour-friends", # 填写你的github仓库名
"state": "open" # 填写抓取的issue状态(open/closed)
}
# 屏蔽站点
BLOCK_SITE = [
"https://example.com/",
]
# 屏蔽sitemap链接关键词
BLOCK_WORD = [
"index",
"json",
"tags",
"categories",
"record",
"sort",
]
# 屏蔽sitemap获取标题的分割字符
BLOCK_CHARS = [
"|",
"::",
"-",
"·",
]
"""
其他设置
"""
# TODAY = datetime.datetime.today()
# TIME_limit = 60