rework icons, codechanges, bugfixes, typofixes
|
Before Width: | Height: | Size: 369 B After Width: | Height: | Size: 369 B |
|
Before Width: | Height: | Size: 507 B After Width: | Height: | Size: 507 B |
|
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 178 B |
|
Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 222 B |
|
Before Width: | Height: | Size: 329 B After Width: | Height: | Size: 329 B |
|
Before Width: | Height: | Size: 398 B After Width: | Height: | Size: 398 B |
|
Before Width: | Height: | Size: 537 B After Width: | Height: | Size: 537 B |
|
Before Width: | Height: | Size: 695 B After Width: | Height: | Size: 695 B |
@@ -1,24 +1,27 @@
|
||||
icon_path: icons/
|
||||
|
||||
locked: locked.svg
|
||||
logo: logo.ico
|
||||
show_password: visibility_off.svg
|
||||
hide_password: visibility_on.svg
|
||||
settings: settings.svg
|
||||
today: calendar_today.svg
|
||||
save: save.svg
|
||||
edit_note: edit_note.svg
|
||||
warning: warning.svg
|
||||
error: error.svg
|
||||
mail: mail.svg
|
||||
semester: semester.svg
|
||||
template_fail: test_fail.svg
|
||||
offAction: shutdown.svg
|
||||
info: info.svg
|
||||
help: help.svg
|
||||
close: close.svg
|
||||
notification: notification.svg
|
||||
valid_true: check_success.svg
|
||||
valid_false: check_fail.svg
|
||||
edit: edit.svg
|
||||
important_warn : red_warn.svg
|
||||
dark_color: '#75FB4C'
|
||||
light_color: '#EA3323'
|
||||
icons:
|
||||
locked: locked.svg
|
||||
logo: logo.ico
|
||||
show_password: visibility_off.svg
|
||||
hide_password: visibility_on.svg
|
||||
settings: settings.svg
|
||||
today: calendar_today.svg
|
||||
save: save.svg
|
||||
edit_note: edit_note.svg
|
||||
warning: warning.svg
|
||||
error: error.svg
|
||||
mail: mail.svg
|
||||
semester: semester.svg
|
||||
template_fail: test_fail.svg
|
||||
offAction: shutdown.svg
|
||||
info: info.svg
|
||||
help: help.svg
|
||||
close: close.svg
|
||||
notification: notification.svg
|
||||
valid_true: check_success.svg
|
||||
valid_false: check_fail.svg
|
||||
edit: edit.svg
|
||||
important_warn : red_warn.svg
|
||||
|
Before Width: | Height: | Size: 535 B After Width: | Height: | Size: 535 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 -960 960 960" width="20px" fill="#000000"><path d="M384.23-264Q344-264 316-291.77q-28-27.78-28-68Q288-400 315.77-428q27.78-28 68-28Q424-456 452-428.23q28 27.78 28 68Q480-320 452.23-292q-27.78 28-68 28ZM216-96q-29.7 0-50.85-21.5Q144-139 144-168v-528q0-29 21.15-50.5T216-768h72v-96h72v96h240v-96h72v96h72q29.7 0 50.85 21.5Q816-725 816-696v528q0 29-21.15 50.5T744-96H216Zm0-72h528v-360H216v360Zm0-432h528v-96H216v96Zm0 0v-96 96Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 499 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#EA3323"><path d="m336-280 144-144 144 144 56-56-144-144 144-144-56-56-144 144-144-144-56 56 144 144-144 144 56 56ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 507 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#75FB4C"><path d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 178 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#EA3323"><path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 222 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#000000"><path d="M200-200h57l391-391-57-57-391 391v57Zm-80 80v-170l528-527q12-11 26.5-17t30.5-6q16 0 31 6t26 18l55 56q12 11 17.5 26t5.5 30q0 16-5.5 30.5T817-647L290-120H120Zm640-584-56-56 56 56Zm-141 85-28-29 57 57-29-28Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 329 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 -960 960 960" width="20px" fill="#000000"><path d="M192-396v-72h288v72H192Zm0-150v-72h432v72H192Zm0-150v-72h432v72H192Zm336 504v-113l210-209q7.26-7.41 16.13-10.71Q763-528 771.76-528q9.55 0 18.31 3.5Q798.83-521 806-514l44 45q6.59 7.26 10.29 16.13Q864-444 864-435.24t-3.29 17.92q-3.3 9.15-10.71 16.32L641-192H528Zm288-243-45-45 45 45ZM576-240h45l115-115-22-23-22-22-116 115v45Zm138-138-22-22 44 45-22-23Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 476 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 -960 960 960" width="20px" fill="#000000"><path d="M479.79-288q15.21 0 25.71-10.29t10.5-25.5q0-15.21-10.29-25.71t-25.5-10.5q-15.21 0-25.71 10.29t-10.5 25.5q0 15.21 10.29 25.71t25.5 10.5ZM444-432h72v-240h-72v240Zm36.28 336Q401-96 331-126t-122.5-82.5Q156-261 126-330.96t-30-149.5Q96-560 126-629.5q30-69.5 82.5-122T330.96-834q69.96-30 149.5-30t149.04 30q69.5 30 122 82.5T834-629.28q30 69.73 30 149Q864-401 834-331t-82.5 122.5Q699-156 629.28-126q-69.73 30-149 30Zm-.28-72q130 0 221-91t91-221q0-130-91-221t-221-91q-130 0-221 91t-91 221q0 130 91 221t221 91Zm0-312Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 632 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#"><path d="M478-240q21 0 35.5-14.5T528-290q0-21-14.5-35.5T478-340q-21 0-35.5 14.5T428-290q0 21 14.5 35.5T478-240Zm-36-154h74q0-33 7.5-52t42.5-52q26-26 41-49.5t15-56.5q0-56-41-86t-97-30q-57 0-92.5 30T342-618l66 26q5-18 22.5-39t53.5-21q32 0 48 17.5t16 38.5q0 20-12 37.5T506-526q-44 39-54 59t-10 73Zm38 314q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 689 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#"><path d="M440-280h80v-240h-80v240Zm40-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 529 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path fill="#AAB8C2" d="M13 3C7.477 3 3 7.477 3 13v10h4V13c0-3.313 2.687-6 6-6s6 2.687 6 6v10h4V13c0-5.523-4.477-10-10-10z"/><path fill="#FFAC33" d="M26 32c0 2.209-1.791 4-4 4H4c-2.209 0-4-1.791-4-4V20c0-2.209 1.791-4 4-4h18c2.209 0 4 1.791 4 4v12z"/><path fill="#C1694F" d="M35 9c0-4.971-4.029-9-9-9s-9 4.029-9 9c0 3.917 2.507 7.24 6 8.477V33.5c0 1.381 1.119 2.5 2.5 2.5 1.213 0 2.223-.864 2.45-2.01.018.001.032.01.05.01.553 0 1-.447 1-1v-1c0-.553-.447-1-1-1v-1c.553 0 1-.447 1-1v-2c0-.553-.447-1-1-1v-2.277c.596-.347 1-.984 1-1.723v-4.523c3.493-1.236 6-4.559 6-8.477zm-9-7c1.104 0 2 .896 2 2s-.896 2-2 2-2-.896-2-2 .896-2 2-2z"/></svg>
|
||||
|
Before Width: | Height: | Size: 697 B |
|
Before Width: | Height: | Size: 264 KiB |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#"><path d="M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm320-280L160-640v400h640v-400L480-440Zm0-80 320-200H160l320 200ZM160-640v-80 480-400Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 322 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#000000"><path d="M160-200v-80h80v-280q0-83 50-147.5T420-792v-28q0-25 17.5-42.5T480-880q25 0 42.5 17.5T540-820v28q80 20 130 84.5T720-560v280h80v80H160Zm320-300Zm0 420q-33 0-56.5-23.5T400-160h160q0 33-23.5 56.5T480-80ZM320-280h320v-280q0-66-47-113t-113-47q-66 0-113 47t-47 113v280Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 387 B |
@@ -1 +0,0 @@
|
||||
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M21 3C21.5523 3 22 3.44772 22 4V18C22 18.5523 21.5523 19 21 19H6.455L2 22.5V4C2 3.44772 2.44772 3 3 3H21ZM20 5H4V18.385L5.76333 17H20V5ZM10.5153 7.4116L10.9616 8.1004C9.29402 9.0027 9.32317 10.4519 9.32317 10.7645C9.47827 10.7431 9.64107 10.7403 9.80236 10.7553C10.7045 10.8389 11.4156 11.5795 11.4156 12.5C11.4156 13.4665 10.6321 14.25 9.66558 14.25C9.12905 14.25 8.61598 14.0048 8.29171 13.6605C7.77658 13.1137 7.5 12.5 7.5 11.5052C7.5 9.75543 8.72825 8.18684 10.5153 7.4116ZM15.5153 7.4116L15.9616 8.1004C14.294 9.0027 14.3232 10.4519 14.3232 10.7645C14.4783 10.7431 14.6411 10.7403 14.8024 10.7553C15.7045 10.8389 16.4156 11.5795 16.4156 12.5C16.4156 13.4665 15.6321 14.25 14.6656 14.25C14.1291 14.25 13.616 14.0048 13.2917 13.6605C12.7766 13.1137 12.5 12.5 12.5 11.5052C12.5 9.75543 13.7283 8.18684 15.5153 7.4116Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 897 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#EA3323"><path d="m40-120 440-760 440 760H40Zm138-80h604L480-720 178-200Zm302-40q17 0 28.5-11.5T520-280q0-17-11.5-28.5T480-320q-17 0-28.5 11.5T440-280q0 17 11.5 28.5T480-240Zm-40-120h80v-200h-80v200Zm40-100Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 314 B |
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg fill="#000000" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="800px" height="800px" viewBox="0 0 407.096 407.096"
|
||||
xml:space="preserve">
|
||||
<g>
|
||||
<g>
|
||||
<path d="M402.115,84.008L323.088,4.981C319.899,1.792,315.574,0,311.063,0H17.005C7.613,0,0,7.614,0,17.005v373.086
|
||||
c0,9.392,7.613,17.005,17.005,17.005h373.086c9.392,0,17.005-7.613,17.005-17.005V96.032
|
||||
C407.096,91.523,405.305,87.197,402.115,84.008z M300.664,163.567H67.129V38.862h233.535V163.567z"/>
|
||||
<path d="M214.051,148.16h43.08c3.131,0,5.668-2.538,5.668-5.669V59.584c0-3.13-2.537-5.668-5.668-5.668h-43.08
|
||||
c-3.131,0-5.668,2.538-5.668,5.668v82.907C208.383,145.622,210.92,148.16,214.051,148.16z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 968 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#"><path d="M200-80q-33 0-56.5-23.5T120-160v-560q0-33 23.5-56.5T200-800h40v-80h80v80h320v-80h80v80h40q33 0 56.5 23.5T840-720v560q0 33-23.5 56.5T760-80H200Zm0-80h560v-400H200v400Zm0-480h560v-80H200v80Zm0 0v-80 80Zm280 240q-17 0-28.5-11.5T440-440q0-17 11.5-28.5T480-480q17 0 28.5 11.5T520-440q0 17-11.5 28.5T480-400Zm-160 0q-17 0-28.5-11.5T280-440q0-17 11.5-28.5T320-480q17 0 28.5 11.5T360-440q0 17-11.5 28.5T320-400Zm320 0q-17 0-28.5-11.5T600-440q0-17 11.5-28.5T640-480q17 0 28.5 11.5T680-440q0 17-11.5 28.5T640-400ZM480-240q-17 0-28.5-11.5T440-280q0-17 11.5-28.5T480-320q17 0 28.5 11.5T520-280q0 17-11.5 28.5T480-240Zm-160 0q-17 0-28.5-11.5T280-280q0-17 11.5-28.5T320-320q17 0 28.5 11.5T360-280q0 17-11.5 28.5T320-240Zm320 0q-17 0-28.5-11.5T600-280q0-17 11.5-28.5T640-320q17 0 28.5 11.5T680-280q0 17-11.5 28.5T640-240Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 925 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 -960 960 960" width="20px" fill="#000000"><path d="m403-96-22-114q-23-9-44.5-21T296-259l-110 37-77-133 87-76q-2-12-3-24t-1-25q0-13 1-25t3-24l-87-76 77-133 110 37q19-16 40.5-28t44.5-21l22-114h154l22 114q23 9 44.5 21t40.5 28l110-37 77 133-87 76q2 12 3 24t1 25q0 13-1 25t-3 24l87 76-77 133-110-37q-19 16-40.5 28T579-210L557-96H403Zm59-72h36l19-99q38-7 71-26t57-48l96 32 18-30-76-67q6-17 9.5-35.5T696-480q0-20-3.5-38.5T683-554l76-67-18-30-96 32q-24-29-57-48t-71-26l-19-99h-36l-19 99q-38 7-71 26t-57 48l-96-32-18 30 76 67q-6 17-9.5 35.5T264-480q0 20 3.5 38.5T277-406l-76 67 18 30 96-32q24 29 57 48t71 26l19 99Zm18-168q60 0 102-42t42-102q0-60-42-102t-102-42q-60 0-102 42t-42 102q0 60 42 102t102 42Zm0-144Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 773 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#"><path d="M440-440v-400h80v400h-80Zm40 320q-74 0-139.5-28.5T226-226q-49-49-77.5-114.5T120-480q0-80 33-151t93-123l56 56q-48 40-75 97t-27 121q0 116 82 198t198 82q117 0 198.5-82T760-480q0-64-26.5-121T658-698l56-56q60 52 93 123t33 151q0 74-28.5 139.5t-77 114.5q-48.5 49-114 77.5T480-120Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 392 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#EA3323"><path d="M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240ZM330-120 120-330v-300l210-210h300l210 210v300L630-120H330Zm34-80h232l164-164v-232L596-760H364L200-596v232l164 164Zm116-280Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 375 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 -960 960 960" width="20px" fill="#000000"><path d="m637-425-62-62q4-38-23-65.5T487-576l-62-62q13-5 27-7.5t28-2.5q70 0 119 49t49 119q0 14-2.5 28t-8.5 27Zm133 133-52-52q36-28 65.5-61.5T833-480q-49-101-144.5-158.5T480-696q-26 0-51 3t-49 10l-58-58q38-15 77.5-21t80.5-6q143 0 261.5 77.5T912-480q-22 57-58.5 103.5T770-292Zm-2 202L638-220q-38 14-77.5 21t-80.5 7q-143 0-261.5-77.5T48-480q22-57 58-104t84-85L90-769l51-51 678 679-51 51ZM241-617q-35 28-65 61.5T127-480q49 101 144.5 158.5T480-264q26 0 51-3.5t50-9.5l-45-45q-14 5-28 7.5t-28 2.5q-70 0-119-49t-49-119q0-14 3.5-28t6.5-28l-81-81Zm287 89Zm-96 96Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 669 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 -960 960 960" width="20px" fill="#000000"><path d="M480-312q70 0 119-49t49-119q0-70-49-119t-119-49q-70 0-119 49t-49 119q0 70 49 119t119 49Zm0-72q-40 0-68-28t-28-68q0-40 28-68t68-28q40 0 68 28t28 68q0 40-28 68t-68 28Zm0 192q-142.6 0-259.8-78.5Q103-349 48-480q55-131 172.2-209.5Q337.4-768 480-768q142.6 0 259.8 78.5Q857-611 912-480q-55 131-172.2 209.5Q622.6-192 480-192Zm0-288Zm0 216q112 0 207-58t146-158q-51-100-146-158t-207-58q-112 0-207 58T127-480q51 100 146 158t207 58Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 545 B |
|
Before Width: | Height: | Size: 697 B After Width: | Height: | Size: 697 B |
|
Before Width: | Height: | Size: 264 KiB After Width: | Height: | Size: 264 KiB |
|
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 328 B |
|
Before Width: | Height: | Size: 387 B After Width: | Height: | Size: 387 B |
|
Before Width: | Height: | Size: 897 B After Width: | Height: | Size: 897 B |
|
Before Width: | Height: | Size: 314 B After Width: | Height: | Size: 314 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 931 B After Width: | Height: | Size: 931 B |
|
Before Width: | Height: | Size: 771 B After Width: | Height: | Size: 771 B |
|
Before Width: | Height: | Size: 398 B After Width: | Height: | Size: 398 B |
|
Before Width: | Height: | Size: 375 B After Width: | Height: | Size: 375 B |
|
Before Width: | Height: | Size: 675 B After Width: | Height: | Size: 675 B |
|
Before Width: | Height: | Size: 554 B After Width: | Height: | Size: 554 B |
|
Before Width: | Height: | Size: 314 B After Width: | Height: | Size: 314 B |
@@ -188,7 +188,16 @@ class Database:
|
||||
"""
|
||||
conn = self.connect()
|
||||
cursor = conn.cursor()
|
||||
log_message = f"{self.get_caller_line()} Querying database with query {query}, args: {args}"
|
||||
logs_query = query
|
||||
logs_args = args
|
||||
if "fileblob" in query:
|
||||
#set fileblob arg in logger to "too long"
|
||||
logs_query = query
|
||||
fileblob_location = query.find("fileblob")
|
||||
#remove fileblob from query
|
||||
logs_query = query[:fileblob_location] + "fileblob = too long"
|
||||
|
||||
log_message = f"{self.get_caller_line()} Querying database with query {logs_query}, args: {logs_args}"
|
||||
# if "INSERT" in query:
|
||||
# log_message = f"Querying database with query {query}"
|
||||
|
||||
|
||||
@@ -56,4 +56,4 @@ if __name__ == "__main__":
|
||||
("SoSe 15", 1, 0),
|
||||
]
|
||||
|
||||
print(custom_sort(unsorted))
|
||||
# print(custom_sort(unsorted))
|
||||
|
||||
@@ -109,7 +109,7 @@ class Mailer(Ui_eMailPreview):
|
||||
self.buttonBox.accepted.connect(self.createAndSendMail)
|
||||
|
||||
def load_mail_templates(self):
|
||||
print("loading mail templates")
|
||||
# print("loading mail templates")
|
||||
mail_templates = os.listdir("mail_vorlagen")
|
||||
for template in mail_templates:
|
||||
self.comboBox.addItem(template)
|
||||
@@ -169,12 +169,12 @@ class Mailer(Ui_eMailPreview):
|
||||
# server.starttls()
|
||||
# server.auth(mechanism="PLAIN")
|
||||
if config["mail"]["use_user_name"] == 1:
|
||||
print(config["mail"]["user_name"])
|
||||
# print(config["mail"]["user_name"])
|
||||
server.login(config["mail"]["user_name"], password)
|
||||
else:
|
||||
server.login(sender_email, password)
|
||||
server.sendmail(sender_email, self.prof_mail, mail)
|
||||
print("Mail sent")
|
||||
# print("Mail sent")
|
||||
# end active process
|
||||
server.quit()
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ def tuple_to_dict(tlist: tuple, type: str) -> dict:
|
||||
ret = []
|
||||
for line in tlist:
|
||||
data = makeDict()
|
||||
if type == "Monographie":
|
||||
if type == "Monografien":
|
||||
data["type"] = type
|
||||
data["work_author"] = line[0]
|
||||
data["year"] = line[1]
|
||||
@@ -84,10 +84,10 @@ def tuple_to_dict(tlist: tuple, type: str) -> dict:
|
||||
|
||||
def elsa_word_to_csv(path):
|
||||
doc = Document(path)
|
||||
# print all lines in doc
|
||||
# # print all lines in doc
|
||||
doctype = [para.text for para in doc.paragraphs if para.text != ""][-1]
|
||||
tuples = {
|
||||
"Monographie": ("", "", "", "", "", "", "", "", ""),
|
||||
"Monografien": ("", "", "", "", "", "", "", "", ""),
|
||||
"Herausgeberwerke": ("", "", "", "", "", "", "", "", "", "", ""),
|
||||
"Zeitschriftenaufsätze": ("", "", "", "", "", "", "", "", "", ""),
|
||||
}
|
||||
@@ -113,10 +113,10 @@ def elsa_word_to_csv(path):
|
||||
data = [
|
||||
row for row in df.itertuples(index=False, name=None) if row != tuples[doctype]
|
||||
]
|
||||
print(data)
|
||||
# print(data)
|
||||
return tuple_to_dict(data, doctype), doctype
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
else_df = elsa_word_to_csv("c:/Users/aky547/Desktop/hrsgw_test.docx")
|
||||
print(else_df)
|
||||
else_df = elsa_word_to_csv("C:/Users/aky547/Desktop/Antrag ELSA Schweitzer.docx")
|
||||
# print(else_df)
|
||||
@@ -178,7 +178,7 @@ class ZoteroController:
|
||||
def __get_data(self, isbn):
|
||||
web = WebRequest()
|
||||
web.get_ppn(isbn)
|
||||
data = web.get_data()
|
||||
data = web.get_data_elsa()
|
||||
bib = BibTextTransformer("ARRAY")
|
||||
bib.get_data(data)
|
||||
book = bib.return_data()
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import pathlib
|
||||
|
||||
from .Ui_semesterapparat_ui import Ui_MainWindow as Ui_Semesterapparat
|
||||
|
||||
from .dialogs import (
|
||||
ApparatExtendDialog,
|
||||
Mail_Dialog,
|
||||
@@ -13,16 +15,18 @@ from .dialogs import (
|
||||
About,
|
||||
ElsaAddEntry,
|
||||
)
|
||||
from .Ui_semesterapparat_ui import Ui_MainWindow as Ui_Semesterapparat
|
||||
from .widgets import (
|
||||
DataGraph,
|
||||
FilePicker,
|
||||
StatusWidget,
|
||||
CalendarEntry,
|
||||
MessageCalendar,
|
||||
SearchStatisticPage, #
|
||||
DataGraph,
|
||||
ElsaDialog,
|
||||
UserCreate,
|
||||
EditUser,
|
||||
EditProf,
|
||||
)
|
||||
|
||||
path = pathlib.Path(__file__).parent.absolute()
|
||||
# from .mainwindow import Ui_MainWindow as Ui_MainWindow
|
||||
# from .sap import Ui_MainWindow as MainWindow_SAP
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="createApparat">
|
||||
<property name="sizePolicy">
|
||||
|
||||
@@ -59,7 +59,7 @@ class ElsaDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
data.btn_zs.click()
|
||||
elif mediatype == "Herausgeberwerke":
|
||||
data.btn_hg.click()
|
||||
elif mediatype == "Monographie":
|
||||
elif mediatype == "Monograpfien":
|
||||
data.btn_mono.click()
|
||||
|
||||
data.exec()
|
||||
@@ -70,7 +70,7 @@ class ElsaDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
self.dokument_list_elsa.setRowCount(0)
|
||||
profs = self.db.getProfs()
|
||||
for prof in profs:
|
||||
self.elsa_prof.addItem(f"{prof[3]}, {prof[2]}")
|
||||
self.elsa_prof.addItem(f"{prof.lastname}, {prof.firstname}")
|
||||
self.elsa_prof.setCurrentText("")
|
||||
self.elsa_date.setText("")
|
||||
self.elsa_semester.setText("")
|
||||
@@ -155,6 +155,7 @@ class ElsaDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
|
||||
def open_elsa(self):
|
||||
prof = self.elsa_table.item(self.elsa_table.currentRow(), 0).text()
|
||||
print(prof)
|
||||
date = self.elsa_table.item(self.elsa_table.currentRow(), 1).text()
|
||||
semester = self.elsa_table.item(self.elsa_table.currentRow(), 2).text()
|
||||
self.elsa_update.setEnabled(True)
|
||||
|
||||
@@ -84,6 +84,7 @@ class Ui_Dialog(object):
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.gridLayout_2.addWidget(self.label_2, 1, 0, 1, 1)
|
||||
self.elsa_prof = QtWidgets.QComboBox(parent=self.create_frame_elsa)
|
||||
self.elsa_prof.setEditable(True)
|
||||
self.elsa_prof.setObjectName("elsa_prof")
|
||||
self.gridLayout_2.addWidget(self.elsa_prof, 0, 1, 1, 1)
|
||||
self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
|
||||
@@ -101,7 +102,7 @@ class Ui_Dialog(object):
|
||||
self.dokument_list_elsa = QtWidgets.QTableWidget(parent=self.create_frame_elsa)
|
||||
self.dokument_list_elsa.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
|
||||
self.dokument_list_elsa.setObjectName("dokument_list_elsa")
|
||||
self.dokument_list_elsa.setColumnCount(3)
|
||||
self.dokument_list_elsa.setColumnCount(4)
|
||||
self.dokument_list_elsa.setRowCount(0)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.dokument_list_elsa.setHorizontalHeaderItem(0, item)
|
||||
@@ -109,6 +110,8 @@ class Ui_Dialog(object):
|
||||
self.dokument_list_elsa.setHorizontalHeaderItem(1, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.dokument_list_elsa.setHorizontalHeaderItem(2, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.dokument_list_elsa.setHorizontalHeaderItem(3, item)
|
||||
self.dokument_list_elsa.horizontalHeader().setDefaultSectionSize(116)
|
||||
self.dokument_list_elsa.horizontalHeader().setMinimumSectionSize(43)
|
||||
self.dokument_list_elsa.verticalHeader().setMinimumSectionSize(25)
|
||||
@@ -223,6 +226,8 @@ class Ui_Dialog(object):
|
||||
item.setText(_translate("Dialog", "Dateityp"))
|
||||
item = self.dokument_list_elsa.horizontalHeaderItem(2)
|
||||
item.setText(_translate("Dialog", "Neu?"))
|
||||
item = self.dokument_list_elsa.horizontalHeaderItem(3)
|
||||
item.setText(_translate("Dialog", "File"))
|
||||
self.btn_add_document_elsa.setText(_translate("Dialog", "Dokument hinzufügen"))
|
||||
self.btn_open_document_elsa.setText(_translate("Dialog", "Dokument öffnen"))
|
||||
self.check_file_elsa.setText(_translate("Dialog", "Medien aus Dokument\n"
|
||||
|
||||
@@ -174,7 +174,11 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="elsa_prof"/>
|
||||
<widget class="QComboBox" name="elsa_prof">
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
@@ -238,6 +242,11 @@
|
||||
<string>Neu?</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>File</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
@@ -1,31 +1,89 @@
|
||||
import darkdetect
|
||||
from omegaconf import OmegaConf
|
||||
from PyQt6 import QtGui
|
||||
|
||||
import re
|
||||
config = OmegaConf.load("config.yaml")
|
||||
config = OmegaConf.load(f"{config.icon_path}/icons.yaml")
|
||||
|
||||
path = config.icon_path
|
||||
dark = darkdetect.isDark()
|
||||
mode = "dark" if dark else "light"
|
||||
path = f"{path}/{mode}"
|
||||
class Icon:
|
||||
def __init__(self, icon_type, widget=None):
|
||||
|
||||
|
||||
class Icon:
|
||||
def __init__(self, icon_type, widget=None,recolor=False):
|
||||
dark = darkdetect.isDark()
|
||||
if dark:
|
||||
self.color = config.dark_color
|
||||
else:
|
||||
self.color = config.light_color
|
||||
self.icon = QtGui.QIcon()
|
||||
self.add_icon(icon_type)
|
||||
self.icon_path = path + config["icons"][icon_type]
|
||||
self.add_icon(self.icon_path,recolor)
|
||||
if widget is not None:
|
||||
widget.setIcon(self.icon)
|
||||
|
||||
def add_icon(self, icon_type):
|
||||
icon = config[icon_type]
|
||||
icon = f"{path}/{icon}"
|
||||
def add_icon(self, icon_path,recolor=False):
|
||||
icon = self.changeColor(icon_path,recolor)
|
||||
|
||||
# use icon bytes to create a pixmap
|
||||
pixmap = QtGui.QPixmap()
|
||||
pixmap.loadFromData(icon)
|
||||
|
||||
self.icon.addPixmap(
|
||||
QtGui.QPixmap(icon),
|
||||
pixmap,
|
||||
QtGui.QIcon.Mode.Normal,
|
||||
QtGui.QIcon.State.Off,
|
||||
)
|
||||
|
||||
def overwriteColor(self, color):
|
||||
# take the icon, read it as bytes and change the color in fill
|
||||
icon = self.changeColor(self.icon_path)
|
||||
cicon = str(icon)
|
||||
fill = re.search(r"fill=\"(.*?)\"", cicon).group(1)
|
||||
stroke = re.search(r"stroke=\"(.*?)\"", cicon)
|
||||
if stroke:
|
||||
stroke = stroke.group(1)
|
||||
|
||||
if fill and stroke:
|
||||
# replace stroke
|
||||
newicon = icon.replace(stroke.encode(), color.encode())
|
||||
else:
|
||||
newicon = icon.replace(fill.encode(), color.encode())
|
||||
|
||||
pixmap = QtGui.QPixmap()
|
||||
pixmap.loadFromData(newicon)
|
||||
|
||||
self.icon.addPixmap(
|
||||
pixmap,
|
||||
QtGui.QIcon.Mode.Normal,
|
||||
QtGui.QIcon.State.Off,
|
||||
)
|
||||
return self.icon
|
||||
|
||||
|
||||
def changeColor(self,icon_path,recolor) -> bytes:
|
||||
"""change the color of the svg icon to the color set in the config file
|
||||
|
||||
Args:
|
||||
icon_path (str): the path to the icon, usually icons/[name].svg
|
||||
|
||||
Returns:
|
||||
icon: a byte representation of the icon with the new color
|
||||
"""
|
||||
color = self.color
|
||||
with open(icon_path, "rb") as file:
|
||||
icon = file.read()
|
||||
if recolor:
|
||||
cicon = str(icon)
|
||||
|
||||
try:
|
||||
fill = re.search(r"fill=\"(.*?)\"", cicon).group(1)
|
||||
except AttributeError:
|
||||
fill = None
|
||||
if fill:
|
||||
icon = icon.replace(fill.encode(), color.encode())
|
||||
return icon
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("This is a module and can not be executed directly.")
|
||||
|
||||