Advertisement
TorroesPrime

settings

Apr 24th, 2023 (edited)
875
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 8.86 KB | None | 1 0
  1. """settings.py
  2. assorted settings and pre-defined values for use in the ace handout
  3. programs.
  4. """
  5. import os
  6. """debug settings"""
  7. DEBUG = True
  8. DEBUG_EMAIL = False
  9. RESIZE = False
  10. if DEBUG:
  11.     RESIZE = True
  12. """program settings"""
  13. CUR_DIR = os.path.dirname(os.path.abspath(__file__))
  14. SRC_FILE = os.path.join(CUR_DIR,"handouts_1.gad")
  15. LCL_FILE = os.path.join(CUR_DIR,"tutor_info.ini")
  16. ICON = os.path.join(CUR_DIR,"icon.ico")
  17. IMG_MESSAGE_PROMPT = os.path.join(CUR_DIR,"email_prompt.png")
  18. IMG_MESSAGE_PROMPT_ACT= os.path.join(CUR_DIR,"email_prompt_active.png")
  19. IMG_HANDOUT = os.path.join(CUR_DIR,"handouts.png")
  20. IMG_HANDOUT_ACT = os.path.join(CUR_DIR,"handouts_active.png")
  21. IMG_HANDOUT_SEARCH = os.path.join(CUR_DIR,"search.png")
  22. IMG_HANDOUT_SEARCH_ACT= os.path.join(CUR_DIR,"search_active.png")
  23. MM_BUTTON_SIZE = 128
  24. """GUI settings"""
  25. DFT_FONT_NAME = "Ariel"
  26. FNT_LARGE_TITLE = (DFT_FONT_NAME, 16,"bold")
  27. FNT_SECTION_TITLE = (DFT_FONT_NAME, 14,"bold")
  28. FNT_SUB_SECTION_TITLE = (DFT_FONT_NAME, 12, "bold")
  29. FNT_SUB_SECTION_ENTRY = (DFT_FONT_NAME, 12)
  30. FNT_NORMAL = (DFT_FONT_NAME, 10)
  31. BG_COLOR = "#CBCBCB"
  32. FG_COLOR = "#000000"
  33. BTN_BG_COLOR = "#BFBFBF"
  34. BTN_FG_COLOR = "#000000"
  35. BTN_HL_COLOR = "#9F9F9F"
  36. BTN_ACTIVE_BG = "#AACAD4"
  37. WHITE_ = "#ffffff"
  38. LARGE_SPACE = 10
  39. MED_SPACE = 6
  40. SMALL_SPACE = 2
  41. BORDER_SIZE = 2
  42. BORDER_STYLE = "raised"
  43. TITLE_MM = "Germanna ACE Handouts"
  44. TITLE_1 = "Germanna ACE Handout datafile updater"
  45. TITLE_2 = "Germanna ACE Handout Email Prompt Creator"
  46. WIDTH_ = 1085
  47. HEIGHT_ = 670
  48. """Default values"""
  49. DEF_CLASS_LIST = ['ACC-211', 'ACC-212', 'ASL-101', 'ASL-102', 'ASL-201',\
  50. 'ASL-202', 'BIO-101', 'BIO-102', 'BIO-141/142', 'BIO-150', 'CHM-101/102',\
  51. 'CHM-111/112', 'CHM-241', 'CHM-242', 'CSC-201', 'CSC-202', 'CSC-205',\
  52. 'CSC-208', 'ECO-201', 'ECO-202', 'EDE-10/11', 'EGR-110', 'EGR-121', 'EGR-122',\
  53. 'EGR-126', 'ENG-111', 'ENG-112', 'ENG-140', 'ENG-200', 'ENG-200s', 'ENV-121',\
  54. 'ENV-122', 'GOL-105', 'GOL-106', 'HIS-111', 'HIS-112', 'HIS-121', 'HIS-122',\
  55. 'HIS-200s', 'HUM', 'ITD-110', 'ITD-210', 'ITE-100', 'ITE-115', 'ITE-152',\
  56. 'ITN-154', 'ITN-171', 'ITP-100', 'ITP-120', 'MDE-10', 'MDE-54', 'MDE-55',\
  57. 'MDE-60', 'MDE-61', 'MTH-154', 'MTH-155', 'MTH-161', 'MTH-162', 'MTH-167',\
  58. 'MTH-245', 'MTH-261', 'MTH-263', 'MTH-264', 'MTH-265', 'MTH-266', 'MTH-267',\
  59. "NSG-100's", "NSG-200's", 'NUR-135', 'PHY-201', 'PHY-202', 'PHY-241',\
  60. 'PHY-242', 'PLS-135', 'PSY-200', 'PSY-230', 'PSY-235', 'SOC', 'SPA-101',\
  61. 'SPA-102', 'SPA-201', 'SPA-202',"General Study"]
  62. TAG_LIST = ["[student]","[issues]","[class]","[handout_title]","[handout_description]",\
  63.             "[Today's_date]","[handout_url]","[my_name]"]
  64. DEF_EMAIL_START = "[student];\n During your tutoring appointment you indicated that \
  65. you were having trouble with [issues] in your [class] Class. Germanna ACE has \
  66. produced a series of handouts and supplemental materials intended to help address \
  67. these topics. I wanted to ensure that you were aware of these resources and that \
  68. you knew you had access to them. Here is a list of hand outs that may be useful to \
  69. you.\n"
  70. DEF_EMAIL_HANDOUT = "[handout_title] - [handout_description]\n"
  71. LBL_EMAIL_PROMT_TEXT="From this window you can change the specific wording used in the \
  72. email prompt to personalize it. This does not include the individual descriptions of the \
  73. handouts. You can include place holder markers for specific pieces of information such as \
  74. your name, the student's name or what to display for each handout."
  75. LBL_PLACE_HOLDER_INSERT = "Insert Place Holder for:"
  76. LBL_EMAIL_PREVIEW = "Email Opening:"
  77. LBL_EMAIL_HANDOUT_PREVIEW = "Handout formatting:"
  78. formatting = {"tag": {"font":{"family":"Courier",
  79.         "size":12},
  80.         "foreground":"blue",
  81.         "underline":False,
  82.         "bold":True,
  83.         "italic":False},
  84.         "text": {"font":{"family":"Helvetica",
  85.         "size":12},
  86.         "foreground":"black",
  87.         "underline":False,
  88.         "bold":False,
  89.         "italic":False}}
  90. """stored strings for program use"""
  91. TITLE_HANDOUT_UPDATER = "Handout datafile updater"
  92. TITLE_EMAIL_PROMPT = "Handout Email Prompt"
  93. TITLE_HANDOUT_SEARCH = "Handout Catalog Search"
  94. EMAIL_DESC = "Just select the class, and the issues, and the program will generate a messaghe that includes links to handouts to address those issues for you. Real time saver."
  95. HANDOUT_DESC = "Whenever we create a new handout, we need to update the data file that is used to generate the email prompt. This program makes the process simple and streamlined."
  96. HANDOUT_SEARCH = "Allows you to search the handouts currently in the data file. Want to check to see what hand outs are availible for a particular class? Or want to see if the hand is listed as dealing with a particular issue or topic? Here's a quick way to check."
  97. SEARCH_ISSUES_DIRECTS = "Begin typing an issue in the search box. It will automatically prompt you with the closest match currently in the data file. Press the enter key or click “add issue” to add the issue to the search."
  98. """key records"""
  99. SEARCH_NO_RESULTS = "No handouts were found that match your search criteria."
  100. SEARCH_HEADER = "If you wish to view the handout, simply click on the “view” button next to the listing and a browser window will open showing the handout on the Germanna website.\n\
  101. If you wish to copy the URL to the handout, click the “link”  button next to the listing and you will be able to paste the URL where you like it."
  102. SEARCH_RESULTS_HEADER = "The following handouts were found that match your search criteria."
  103. keyboard_keys = [
  104.     "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o",
  105.     "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
  106.     "0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
  107.     "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12",
  108.     "Esc", "Tab", "Caps_Lock", "Shift_L", "Shift_R", "Control_L", "Control_R", "Alt_L", "Alt_R",
  109.     "Super_L", "Super_R", "Menu", "Print", "Scroll_Lock", "Pause", "Insert", "Home", "Page_Up",
  110.     "Delete", "End", "Page_Down", "Up", "Down", "Left", "Right",
  111.     "Num_Lock", "KP_Divide", "KP_Multiply", "KP_Subtract", "KP_Add", "KP_Enter", "KP_Decimal",
  112.     "KP_0", "KP_1", "KP_2", "KP_3", "KP_4", "KP_5", "KP_6", "KP_7", "KP_8", "KP_9",
  113.     "braceleft", "braceright", "bracketleft", "bracketright", "comma", "equal", "period", "minus", "plus",
  114.     "semicolon", "apostrophe", "slash", "backslash", "backquote", "quotedbl", "grave", "less", "greater",
  115.     "underscore", "question", "at", "colon", "dollar", "eurosign", "numbersign", "percent", "asciicircum",
  116.     "ampersand", "asterisk", "parenleft", "parenright", "bar", "exclam", "quotedbl", "at", "numbersign",
  117.     "dollar"
  118. ]
  119.  
  120. keyboard_dict = {key: False for key in keyboard_keys}
  121.  
  122. """Test data and materials for debugging"""
  123. TEST_DATA = [
  124.     {"title": "Accounting Financial Statements",
  125.     "url": "https://germanna.edu/sites/default/files/2022-05/Accounting%20Financial%20Statements.pdf",
  126.     "classes": ["ACC-211", "ACC-212"],
  127.     "description": "Various accounting tips, trips and info.",
  128.     "issues": ["ACC issue 1", "accounting issue 2", "accounting issue 3"]},
  129.     {"title": "Helpful resources for ASL Students",
  130.      "url": "https://germanna.edu/sites/default/files/2022-03/helpful_resources_for_asl_students.pdf",
  131.      "classes": ["ASL-101", "ASL-102", "ASL-201", "ASL-202"],
  132.      "description": "General collection of resources for the american sign language classes. This is just a description being entered for testing purposes.",
  133.      "issues": ["ASL issue 1", "ASL issue 2", "ASL Issue 3"]},
  134.      {"title": "Biomolecules",
  135.       "url": "https://germanna.edu/sites/default/files/2022-03/Biomolecules.pdf",
  136.       "classes": ["BIO-101", "BIO-102", "BIO-150", "CHM-101/102"],
  137.       "description": "General Bio handout about molecules.",
  138.       "issues": ["Bio issue 1", "BIO issue 2", "Bio issue 3"]},
  139.       {"title": "Hardy-Weinberg Equillibrium",
  140.        "url": "https://germanna.edu/sites/default/files/2022-03/Hardy%20Weinberg%20Equilibrium.pdf",
  141.        "classes": ["BIO-101", "BIO-102", "CHM-101/102", "CHM-111/112", "CHM-241", "CHM-242"],
  142.        "description": "Hand out on the Hard-Weinberg equillibrium including exercises, explinaitons and examples.",
  143.        "issues": ["Chem issue 1", "Chem issue 2", "Chem issue 3", "Chem issue 4"]},
  144.       {"title": "VSEPR Theory",
  145.        "url": "https://germanna.edu/sites/default/files/2022-03/VSEPR%20Theory.pdf",
  146.        "classes": ["CHM-111/112", "CHM-101/102"],
  147.        "description": "Hand out on the VSEPR theory included explianitons, examples and guided exercises.",
  148.        "issues": ["VSEPR Theory"]},
  149.        {"title": "Annotated Bibliography",
  150.         "url": "https://germanna.edu/sites/default/files/2022-03/Annotated%20Bibliography.pdf",
  151.         "classes": ["ENG-111", "ENG-112", "ENG-140"],
  152.         "description": "Hand out talking about bibliographies.",
  153.         "issues": ["Bibliographis"]}
  154.         ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement