sys_default.py 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. from .args import p_args
  2. from .conf import conf_args
  3. class ConfigSecretRelease:
  4. """ 加密相关配置 """
  5. passwd_salt = p_args['app_secret']
  6. wtf_secret = p_args['app_secret']
  7. class ConfUserRelease:
  8. """ 用户信息相关配置 """
  9. default_score = int(conf_args.get("default_score", 10))
  10. default_reputation = int(conf_args.get("default_reputation", 300))
  11. max_rubbish_week = int(conf_args.get("max_rubbish_week", 34))
  12. limit_rubbish_week = int(conf_args.get("limit_rubbish_week", 50))
  13. max_score = int(conf_args.get("max_score", 500))
  14. class ConfigSystemRelease:
  15. """ 系统信息相关配置 """
  16. base_location = conf_args.get("base_location", "KZ")
  17. search_reset_time = int(conf_args.get("search_reset_time", 10)) # 搜索间隔的时间
  18. show_uid_len = int(conf_args.get("show_uid_len", 12)) # 展示uid的长度
  19. show_gid_len = int(conf_args.get("show_gid_len", 12)) # 展示gid的长度
  20. about_info = f'''
  21. HGSSystem is Garbage Sorting System
  22. HGSSystem 版权归属 SuperHuan
  23. 作者: SongZihuan[SuperHuan]
  24. 项目托关于 Github 平台
  25. '''.strip()
  26. class ConfigSystemTest(ConfigSystemRelease):
  27. """ 系统信息相关配置 """
  28. search_reset_time = 1 # 搜索间隔的时间
  29. about_info = f'''
  30. HGSSystem is Garbage Sorting System
  31. HGSSystem 版权归属 SuperHuan
  32. 作者: SongZihuan[SuperHuan]
  33. 开发者模式
  34. 项目托关于 Github 平台
  35. '''.strip()
  36. class ConfigTkinterRelease:
  37. """ tkinter 相关配置 """
  38. tk_refresh_delay = int(conf_args.get("tk_refresh_delay", 50)) # 延时任务的时间
  39. tk_zoom = int(conf_args.get("tk_zoom", 1)) # 文字缩放
  40. tk_second_win_bg = "#fffffb" # tkinter 第二窗口 标准颜色
  41. tk_win_bg = "#F0FFF0" # tkinter 一般窗口 标准颜色 蜜瓜绿
  42. tk_btn_bg = "#dcdcdc" # tkinter 按钮 标准颜色
  43. ConfigTkinter = ConfigTkinterRelease
  44. ConfigSystem = ConfigSystemTest if p_args['run'] == 'test' else ConfigSystemRelease
  45. ConfUser = ConfUserRelease
  46. ConfigSecret = ConfigSecretRelease