zebra-day 0.0.37__py3-none-any.whl → 1.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. zebra_day/__init__.py +35 -0
  2. zebra_day/bin/__init__.py +0 -0
  3. zebra_day/bin/fetch_zebra_config.py +15 -0
  4. zebra_day/bin/generate_coord_grid_zpl.py +50 -0
  5. zebra_day/bin/print_zpl_from_file.py +21 -0
  6. zebra_day/bin/probe_new_label_dimensions.py +75 -0
  7. zebra_day/bin/scan_for_networed_zebra_printers_arp_scan.sh +1 -0
  8. zebra_day/bin/scan_for_networed_zebra_printers_curl.sh +30 -0
  9. zebra_day/bin/zserve.py +701 -259
  10. zebra_day/cli/__init__.py +240 -0
  11. zebra_day/cli/cognito.py +121 -0
  12. zebra_day/cli/gui.py +255 -0
  13. zebra_day/cli/printer.py +168 -0
  14. zebra_day/cli/template.py +176 -0
  15. zebra_day/cmd_mgr.py +35 -0
  16. zebra_day/etc/Monoid-Regular-HalfTight-Dollar-0-1-l.ttf +0 -0
  17. zebra_day/etc/label_styles/blank.zpl +0 -0
  18. zebra_day/etc/label_styles/cornersStripOf4Squares_1inX1in.zpl +55 -0
  19. zebra_day/etc/label_styles/corners_1inX2in.zpl +28 -0
  20. zebra_day/etc/label_styles/corners_20cmX30cm.zpl +6 -0
  21. zebra_day/etc/label_styles/corners_smallTube.zpl +7 -0
  22. zebra_day/etc/label_styles/corners_unspecifiedDimensions.zpl +15 -0
  23. zebra_day/etc/label_styles/generic_2inX1in.zpl +21 -0
  24. zebra_day/etc/label_styles/plate_1inX0.25in.zpl +9 -0
  25. zebra_day/etc/label_styles/plate_1inX0.25inHD.zpl +9 -0
  26. zebra_day/etc/label_styles/smallTubeWdotHD_prod.zpl +8 -0
  27. zebra_day/etc/label_styles/smallTubeWdot_corners.zpl +7 -0
  28. zebra_day/etc/label_styles/smallTubeWdot_prod.zpl +8 -0
  29. zebra_day/etc/label_styles/smallTubeWdot_prodAlt1.zpl +6 -0
  30. zebra_day/etc/label_styles/smallTubeWdot_prodAlt1b.zpl +3 -0
  31. zebra_day/etc/label_styles/smallTubeWdot_prodV2.zpl +8 -0
  32. zebra_day/etc/label_styles/smallTubeWdot_reagent.zpl +29 -0
  33. zebra_day/etc/label_styles/stripOf4Squares_1inX1in.zpl +32 -0
  34. zebra_day/etc/label_styles/test_800dX800dCoordinateArray.zpl +1 -0
  35. zebra_day/etc/label_styles/tmps/.hold +0 -0
  36. zebra_day/etc/label_styles/tmps/tmp_zpl_templates.here +0 -0
  37. zebra_day/etc/label_styles/tube_20mmX30mmA.zpl +7 -0
  38. zebra_day/etc/label_styles/tube_2inX0.3in.zpl +15 -0
  39. zebra_day/etc/label_styles/tube_2inX0.5in.zpl +15 -0
  40. zebra_day/etc/label_styles/tube_2inX0.5inHD.zpl +15 -0
  41. zebra_day/etc/label_styles/tube_2inX1in.zpl +25 -0
  42. zebra_day/etc/label_styles/tube_2inX1inHD.zpl +22 -0
  43. zebra_day/etc/label_styles/tube_2inX1inHDv3.zpl +21 -0
  44. zebra_day/etc/old_printer_config/.hold +0 -0
  45. zebra_day/etc/old_printer_config/2026-02-01_01:50:25.022846_printer_config.json +1 -0
  46. zebra_day/etc/old_printer_config/2026-02-01_01:50:25.033657_printer_config.json +1 -0
  47. zebra_day/etc/old_printer_config/2026-02-01_01:50:25.039597_printer_config.json +3 -0
  48. zebra_day/etc/old_printer_config/2026-02-01_01:50:25.047295_printer_config.json +1 -0
  49. zebra_day/etc/old_printer_config/2026-02-01_01:50:25.055804_printer_config.json +1 -0
  50. zebra_day/etc/old_printer_config/2026-02-01_01:50:25.061337_printer_config.json +3 -0
  51. zebra_day/etc/old_printer_config/2026-02-01_01:51:24.073326_printer_config.json +1 -0
  52. zebra_day/etc/old_printer_config/2026-02-01_01:51:24.081950_printer_config.json +1 -0
  53. zebra_day/etc/old_printer_config/2026-02-01_01:51:24.088251_printer_config.json +3 -0
  54. zebra_day/etc/old_printer_config/2026-02-01_01:51:24.096501_printer_config.json +1 -0
  55. zebra_day/etc/old_printer_config/2026-02-01_01:51:24.104767_printer_config.json +1 -0
  56. zebra_day/etc/old_printer_config/2026-02-01_01:51:24.110364_printer_config.json +3 -0
  57. zebra_day/etc/old_printer_config/2026-02-01_01:51:24.118239_printer_config.json +1 -0
  58. zebra_day/etc/old_printer_config/2026-02-01_01:51:24.125950_printer_config.json +1 -0
  59. zebra_day/etc/old_printer_config/2026-02-01_01:51:24.349866_printer_config.json +1 -0
  60. zebra_day/etc/old_printer_config/2026-02-01_01:51:24.361085_printer_config.json +3 -0
  61. zebra_day/etc/old_printer_config/2026-02-01_01:51:24.558323_printer_config.json +1 -0
  62. zebra_day/etc/old_printer_config/2026-02-01_01:51:24.565756_printer_config.json +3 -0
  63. zebra_day/etc/old_printer_config/2026-02-01_01:51:29.739070_printer_config.json +16 -0
  64. zebra_day/etc/old_printer_config/2026-02-01_01:51:29.753796_printer_config.json +1 -0
  65. zebra_day/etc/old_printer_config/2026-02-01_01:51:29.760201_printer_config.json +3 -0
  66. zebra_day/etc/old_printer_config/2026-02-01_01:51:29.768747_printer_config.json +1 -0
  67. zebra_day/etc/old_printer_config/2026-02-01_01:51:29.775312_printer_config.json +3 -0
  68. zebra_day/etc/old_printer_config/2026-02-01_01:51:29.782533_printer_config.json +1 -0
  69. zebra_day/etc/old_printer_config/2026-02-01_01:51:29.789287_printer_config.json +1 -0
  70. zebra_day/etc/old_printer_config/2026-02-01_01:51:29.794230_printer_config.json +3 -0
  71. zebra_day/etc/old_printer_config/2026-02-01_01:51:29.800021_printer_config.json +5 -0
  72. zebra_day/etc/printer_config.json +16 -0
  73. zebra_day/etc/printer_config.template.json +16 -0
  74. zebra_day/etc/tmp_printers0.json +5 -0
  75. zebra_day/etc/tmp_printers374.json +5 -0
  76. zebra_day/etc/tmp_printers383.json +5 -0
  77. zebra_day/etc/tmp_printers450.json +5 -0
  78. zebra_day/etc/tmp_printers504.json +5 -0
  79. zebra_day/etc/tmp_printers608.json +5 -0
  80. zebra_day/etc/tmp_printers657.json +5 -0
  81. zebra_day/etc/tmp_printers838.json +5 -0
  82. zebra_day/etc/tmp_printers839.json +5 -0
  83. zebra_day/etc/tmp_printers933.json +5 -0
  84. zebra_day/etc/tmp_printers957.json +5 -0
  85. zebra_day/exceptions.py +88 -0
  86. zebra_day/files/.hold +0 -0
  87. zebra_day/files/hold +0 -0
  88. zebra_day/files/test_png_17696.png +0 -0
  89. zebra_day/files/test_png_23477.png +0 -0
  90. zebra_day/files/test_png_28157.png +0 -0
  91. zebra_day/files/test_png_35832.png +0 -0
  92. zebra_day/files/test_png_36400.png +0 -0
  93. zebra_day/files/test_png_40816.png +0 -0
  94. zebra_day/files/test_png_49564.png +0 -0
  95. zebra_day/files/test_png_53848.png +0 -0
  96. zebra_day/files/test_png_62542.png +0 -0
  97. zebra_day/files/test_png_91597.png +0 -0
  98. zebra_day/files/test_png_93633.png +0 -0
  99. zebra_day/files/tmpbjo3k7q1.png +0 -0
  100. zebra_day/files/tmpigtr4pwy.png +0 -0
  101. zebra_day/files/zpl_label_tube_2inX1in_2026-02-01_01:51:24.370964.png +0 -0
  102. zebra_day/logging_config.py +74 -0
  103. zebra_day/logs/.hold +0 -0
  104. zebra_day/logs/print_requests.log +2 -0
  105. zebra_day/paths.py +143 -0
  106. zebra_day/print_mgr.py +487 -103
  107. zebra_day/static/datschund.css +140 -0
  108. zebra_day/static/datschund.png +0 -0
  109. zebra_day/static/daylily.png +0 -0
  110. zebra_day/static/favicon.svg +20 -0
  111. zebra_day/static/general.css +99 -0
  112. zebra_day/static/js/zebra_modern.js +172 -0
  113. zebra_day/static/lsmc.css +354 -0
  114. zebra_day/static/moon.jpeg +0 -0
  115. zebra_day/static/oakland.css +197 -0
  116. zebra_day/static/petrichor.css +150 -0
  117. zebra_day/static/popday_daylily.css +140 -0
  118. zebra_day/static/style.css +183 -0
  119. zebra_day/static/triangles.css +122 -0
  120. zebra_day/static/tron.css +277 -0
  121. zebra_day/static/zebra_modern.css +771 -0
  122. zebra_day/static/zebras.css +176 -0
  123. zebra_day/templates/base.html +36 -0
  124. zebra_day/templates/bpr.html +72 -0
  125. zebra_day/templates/build_new_config.html +36 -0
  126. zebra_day/templates/build_print_request.html +32 -0
  127. zebra_day/templates/chg_ui_style.html +19 -0
  128. zebra_day/templates/edit_template.html +128 -0
  129. zebra_day/templates/edit_zpl.html +37 -0
  130. zebra_day/templates/index.html +82 -0
  131. zebra_day/templates/legacy/base.html +37 -0
  132. zebra_day/templates/legacy/bpr.html +72 -0
  133. zebra_day/templates/legacy/build_new_config.html +36 -0
  134. zebra_day/templates/legacy/build_print_request.html +32 -0
  135. zebra_day/templates/legacy/chg_ui_style.html +19 -0
  136. zebra_day/templates/legacy/edit_template.html +128 -0
  137. zebra_day/templates/legacy/edit_zpl.html +37 -0
  138. zebra_day/templates/legacy/index.html +82 -0
  139. zebra_day/templates/legacy/list_prior_configs.html +24 -0
  140. zebra_day/templates/legacy/print_result.html +30 -0
  141. zebra_day/templates/legacy/printer_details.html +25 -0
  142. zebra_day/templates/legacy/printer_status.html +70 -0
  143. zebra_day/templates/legacy/save_result.html +17 -0
  144. zebra_day/templates/legacy/send_print_request.html +34 -0
  145. zebra_day/templates/legacy/simple_print.html +94 -0
  146. zebra_day/templates/legacy/view_pstation_json.html +29 -0
  147. zebra_day/templates/list_prior_configs.html +24 -0
  148. zebra_day/templates/modern/base.html +98 -0
  149. zebra_day/templates/modern/config.html +141 -0
  150. zebra_day/templates/modern/dashboard.html +160 -0
  151. zebra_day/templates/modern/print_request.html +141 -0
  152. zebra_day/templates/modern/print_result.html +88 -0
  153. zebra_day/templates/modern/printer_detail.html +117 -0
  154. zebra_day/templates/modern/printers.html +133 -0
  155. zebra_day/templates/modern/save_result.html +46 -0
  156. zebra_day/templates/modern/template_editor.html +172 -0
  157. zebra_day/templates/modern/templates.html +122 -0
  158. zebra_day/templates/print_result.html +30 -0
  159. zebra_day/templates/printer_details.html +25 -0
  160. zebra_day/templates/printer_status.html +70 -0
  161. zebra_day/templates/save_result.html +17 -0
  162. zebra_day/templates/send_print_request.html +34 -0
  163. zebra_day/templates/simple_print.html +94 -0
  164. zebra_day/templates/view_pstation_json.html +29 -0
  165. zebra_day/web/__init__.py +9 -0
  166. zebra_day/web/app.py +171 -0
  167. zebra_day/web/auth.py +172 -0
  168. zebra_day/web/middleware.py +159 -0
  169. zebra_day/web/routers/__init__.py +2 -0
  170. zebra_day/web/routers/api.py +163 -0
  171. zebra_day/web/routers/ui.py +1051 -0
  172. zebra_day/zpl_renderer.py +273 -0
  173. zebra_day-1.0.2.dist-info/METADATA +786 -0
  174. zebra_day-1.0.2.dist-info/RECORD +179 -0
  175. {zebra_day-0.0.37.dist-info → zebra_day-1.0.2.dist-info}/WHEEL +1 -1
  176. zebra_day-1.0.2.dist-info/entry_points.txt +4 -0
  177. zebra_day/bin/te.py +0 -905
  178. zebra_day-0.0.37.dist-info/METADATA +0 -1177
  179. zebra_day-0.0.37.dist-info/RECORD +0 -10
  180. {zebra_day-0.0.37.dist-info → zebra_day-1.0.2.dist-info/licenses}/LICENSE +0 -0
  181. {zebra_day-0.0.37.dist-info → zebra_day-1.0.2.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,72 @@
1
+ {% extends "legacy/base.html" %}
2
+
3
+ {% block title %}{{ title }}{% endblock %}
4
+
5
+ {% block content %}
6
+ <h1>Formulate Print Request, Step 1</h1>
7
+ <small><a href="/legacy">home</a></small>
8
+
9
+ <h2>Select Lab + Printer + ZPL Template</h2>
10
+ <hr>
11
+ <p align="center">You will be prompted for the data to print on the next page</p>
12
+
13
+ <form name="bpr_form" action="/legacy/build_print_request" align="center">
14
+ <ul>
15
+ <li>
16
+ <label>Select a lab:</label>
17
+ <select id="labsDropdown" name="lab" onchange="populatePrinters()">
18
+ <option value="">Select Lab</option>
19
+ {% for lab in labs %}
20
+ <option value="{{ lab }}">{{ lab }}</option>
21
+ {% endfor %}
22
+ </select>
23
+ </li>
24
+ <li>
25
+ <label>Select a printer:</label>
26
+ <select id="printersDropdown" name="printer">
27
+ <option value="">Select Printer</option>
28
+ </select>
29
+ </li>
30
+ <li>
31
+ <label>Select a template:</label>
32
+ <select name="label_zpl_style">
33
+ <option value="">Select one</option>
34
+ <optgroup label="Stable Templates">
35
+ {% for template in stable_templates %}
36
+ <option value="{{ template }}">{{ template }}</option>
37
+ {% endfor %}
38
+ </optgroup>
39
+ <optgroup label="Draft Templates">
40
+ {% for template in draft_templates %}
41
+ <option value="{{ template }}">{{ template }}</option>
42
+ {% endfor %}
43
+ </optgroup>
44
+ </select>
45
+ </li>
46
+ </ul>
47
+ <br>
48
+ <input type="submit" value="Continue">
49
+ </form>
50
+ {% endblock %}
51
+
52
+ {% block extra_scripts %}
53
+ <script>
54
+ var labs = {{ labs_dict | safe }};
55
+
56
+ function populatePrinters() {
57
+ var lab = document.getElementById("labsDropdown").value;
58
+ var printersDropdown = document.getElementById("printersDropdown");
59
+ printersDropdown.innerHTML = '<option value="">Select Printer</option>';
60
+
61
+ if (lab && labs[lab]) {
62
+ for (var printer in labs[lab]) {
63
+ var option = document.createElement("option");
64
+ option.text = printer;
65
+ option.value = printer;
66
+ printersDropdown.add(option);
67
+ }
68
+ }
69
+ }
70
+ </script>
71
+ {% endblock %}
72
+
@@ -0,0 +1,36 @@
1
+ {% extends "legacy/base.html" %}
2
+
3
+ {% block title %}{{ title }}{% endblock %}
4
+
5
+ {% block content %}
6
+ <h1>Scan Network For Zebra Printers</h1>
7
+ <small><a href="/legacy">home</a></small>
8
+ <hr>
9
+
10
+ <p>This will probe for printers, and with all discovered printers will create a new printers JSON
11
+ and over-write the current fleet data for this lab.</p>
12
+
13
+ <form id="myForm" action="/legacy/probe_zebra_printers_add_to_printers_json">
14
+ <ul>
15
+ <li>
16
+ <label>Choose Existing, Or Enter New Lab Code:</label><br>
17
+ <input type="text" name="lab" list="lab_names" value="scan-results">
18
+ <datalist id="lab_names">
19
+ {% for lab in labs %}
20
+ <option value="{{ lab }}">{{ lab }}</option>
21
+ {% endfor %}
22
+ </datalist>
23
+ </li>
24
+ <li>
25
+ <label>Enter IP Root To Scan:</label><br>
26
+ <input type="text" value="{{ ip_root }}" name="ip_stub">
27
+ </li>
28
+ </ul>
29
+ <br>
30
+ <input type="submit" value="Scan Network">
31
+ </form>
32
+
33
+ <br>
34
+ <small><a href="/legacy/list_prior_printer_config_files">The current printers JSON will be backed up and can be found here.</a></small>
35
+ {% endblock %}
36
+
@@ -0,0 +1,32 @@
1
+ {% extends "legacy/base.html" %}
2
+
3
+ {% block title %}{{ title }}{% endblock %}
4
+
5
+ {% block content %}
6
+ <h1>Send Label Print Request</h1>
7
+ <small><a href="/legacy">home</a></small>
8
+ <hr>
9
+
10
+ <h3>{{ lab }} .. {{ printer }} .. {{ printer_ip }} .. {{ label_zpl_style }}</h3>
11
+ <hr>
12
+
13
+ <form id="myForm" action="/legacy/_print_label">
14
+ <ul>
15
+ <li><label>UID for Barcode:</label> <input type="text" name="uid_barcode"></li>
16
+ <li><label>ALT-A:</label> <input type="text" name="alt_a"></li>
17
+ <li><label>ALT-B:</label> <input type="text" name="alt_b"></li>
18
+ <li><label>ALT-C:</label> <input type="text" name="alt_c"></li>
19
+ <li><label>ALT-D:</label> <input type="text" name="alt_d"></li>
20
+ <li><label>ALT-E:</label> <input type="text" name="alt_e"></li>
21
+ <li><label>ALT-F:</label> <input type="text" name="alt_f"></li>
22
+ </ul>
23
+ <br>
24
+ <label>Override Lab:</label> <input type="text" name="lab" value="{{ lab }}"><br>
25
+ <label>Override Printer:</label> <input type="text" name="printer" value="{{ printer }}"><br>
26
+ <label>Override IP:</label> <input type="text" name="printer_ip" value="{{ printer_ip }}"><br>
27
+ <label>Override label_style_zpl:</label> <input type="text" name="label_zpl_style" value="{{ label_zpl_style }}"><br>
28
+ <br>
29
+ <input type="submit" value="Print Label">
30
+ </form>
31
+ {% endblock %}
32
+
@@ -0,0 +1,19 @@
1
+ {% extends "legacy/base.html" %}
2
+
3
+ {% block title %}{{ title }}{% endblock %}
4
+
5
+ {% block content %}
6
+ <h1>Change The Zebra Day UI Style</h1>
7
+ <ul>
8
+ <small><a href="/legacy">home</a></small>
9
+ <hr>
10
+
11
+ <h2>Available Style CSS Files:</h2>
12
+ <ul>
13
+ {% for css_file in css_files %}
14
+ <li><a href="/legacy/chg_ui_style?css_file={{ css_file }}">{{ css_file }}</a></li>
15
+ {% endfor %}
16
+ </ul>
17
+ </ul>
18
+ {% endblock %}
19
+
@@ -0,0 +1,128 @@
1
+ {% extends "legacy/base.html" %}
2
+
3
+ {% block title %}{{ title }}{% endblock %}
4
+
5
+ {% block content %}
6
+ <h2>Editing: {{ filename }}</h2>
7
+ <small>
8
+ <a href="/legacy">home</a> ///
9
+ <a href="/legacy/edit_zpl">back to label list</a> ///
10
+ <a href="https://labelary.com/zpl.html" target="_blank">ZPL intro</a>
11
+ </small>
12
+ <hr>
13
+
14
+ <table border="1" width="100%">
15
+ <tr>
16
+ <td style="vertical-align: top; width: 40%;">
17
+ <form method="post" action="/legacy/save" id="textForm">
18
+ <textarea name="content" rows="26" cols="45">{{ content }}</textarea>
19
+ <br>
20
+ <input type="hidden" name="filename" value="{{ filename }}">
21
+ <br>
22
+ <label>TMP File Tag:</label>
23
+ <input style="width: 100px;" type="text" name="ftag" value="na">
24
+ <br><br>
25
+ <input type="submit" value="Save Draft">
26
+ <input type="button" value="Render PNG" onclick="submitToPNGrenderer();">
27
+
28
+ <hr>
29
+ <h3>Print IRL:</h3>
30
+ <select id="labsDropdown" name="lab" onchange="populatePrinters()">
31
+ <option value="">Select Lab</option>
32
+ {% for lab in labs %}
33
+ <option value="{{ lab }}">{{ lab }}</option>
34
+ {% endfor %}
35
+ </select>
36
+ <select id="printersDropdown" name="printer">
37
+ <option value="">Select Printer</option>
38
+ </select>
39
+ <br><br>
40
+ <input type="button" value="Print with format keys" onclick="submitToRealPrint();">
41
+ <input type="button" value="Print with data" onclick="submitToLocPrint();">
42
+ </form>
43
+ </td>
44
+ <td style="vertical-align: top; width: 60%;">
45
+ <div id="pngContainer" style="text-align: center;">
46
+ <p><em>Click "Render PNG" to preview label</em></p>
47
+ </div>
48
+ <hr>
49
+ <h3>Format Keys</h3>
50
+ <p>Use these placeholders in your ZPL template:</p>
51
+ <ul>
52
+ <li><code>{uid_barcode}</code> - UID for barcode</li>
53
+ <li><code>{alt_a}</code> through <code>{alt_f}</code> - Additional fields</li>
54
+ </ul>
55
+ </td>
56
+ </tr>
57
+ </table>
58
+ {% endblock %}
59
+
60
+ {% block extra_scripts %}
61
+ <script>
62
+ var labs = {{ labs_dict | safe }};
63
+
64
+ function populatePrinters() {
65
+ var lab = document.getElementById("labsDropdown").value;
66
+ var printersDropdown = document.getElementById("printersDropdown");
67
+ printersDropdown.innerHTML = '<option value="">Select Printer</option>';
68
+
69
+ if (lab && labs[lab]) {
70
+ for (var printer in labs[lab]) {
71
+ var option = document.createElement("option");
72
+ option.text = printer;
73
+ option.value = printer;
74
+ printersDropdown.add(option);
75
+ }
76
+ }
77
+ }
78
+
79
+ function submitToLocPrint() {
80
+ var form = document.getElementById('textForm');
81
+ form.action = '/legacy/build_print_request';
82
+ form.submit();
83
+ }
84
+
85
+ function submitToRealPrint() {
86
+ var form = document.getElementById('textForm');
87
+ var formData = new FormData(form);
88
+
89
+ fetch('/legacy/build_and_send_raw_print_request', {
90
+ method: 'POST',
91
+ body: formData
92
+ })
93
+ .then(response => response.json())
94
+ .then(data => {
95
+ console.log('Print request sent:', data);
96
+ alert('Print request sent!');
97
+ })
98
+ .catch(error => {
99
+ console.error('Error:', error);
100
+ });
101
+ }
102
+
103
+ function submitToPNGrenderer() {
104
+ var form = document.getElementById('textForm');
105
+ var formData = new FormData(form);
106
+
107
+ fetch('/legacy/png_renderer', {
108
+ method: 'POST',
109
+ body: formData
110
+ })
111
+ .then(response => response.text())
112
+ .then(pngPath => {
113
+ const pngImage = document.createElement('img');
114
+ pngImage.src = pngPath;
115
+ pngImage.style.maxWidth = '100%';
116
+ const container = document.getElementById('pngContainer');
117
+ container.innerHTML = '';
118
+ container.appendChild(pngImage);
119
+ })
120
+ .catch(error => {
121
+ console.error('Error:', error);
122
+ });
123
+
124
+ event.preventDefault();
125
+ }
126
+ </script>
127
+ {% endblock %}
128
+
@@ -0,0 +1,37 @@
1
+ {% extends "legacy/base.html" %}
2
+
3
+ {% block title %}{{ title }}{% endblock %}
4
+
5
+ {% block content %}
6
+ <h1>Edit ZPL Templates</h1>
7
+ <ul>
8
+ <small><a href="/legacy">home</a></small>
9
+ <hr>
10
+
11
+ <p>To specify a template to use (via the programmatic API or the GUI), use the file name string (not including the path prefix) and remove the trailing '.zpl'.</p>
12
+ <p>Example: <b>tube_2inX1in</b></p>
13
+
14
+ <hr>
15
+
16
+ <h2>Stable ZPL Templates</h2>
17
+ <ul>
18
+ {% for template in stable_templates %}
19
+ <li><a href="/legacy/edit?filename={{ template }}">{{ template }}</a></li>
20
+ {% else %}
21
+ <li>No stable templates found</li>
22
+ {% endfor %}
23
+ </ul>
24
+
25
+ <hr>
26
+
27
+ <h2>Draft ZPL Templates</h2>
28
+ <ul>
29
+ {% for template in draft_templates %}
30
+ <li><a href="/legacy/edit?dtype=tmps&filename={{ template }}">{{ template }}</a></li>
31
+ {% else %}
32
+ <li>No draft templates found</li>
33
+ {% endfor %}
34
+ </ul>
35
+ </ul>
36
+ {% endblock %}
37
+
@@ -0,0 +1,82 @@
1
+ {% extends "legacy/base.html" %}
2
+
3
+ {% block title %}{{ title }}{% endblock %}
4
+
5
+ {% block content %}
6
+ <h1>Daylily Zebra Printer And Print Request Manager (Legacy)</h1>
7
+ <ul>
8
+ <small>IP address detected: {{ local_ip }}</small>
9
+ <hr>
10
+
11
+ <h2>Zebra Printer Fleet Status, By Site</h2>
12
+ <ul>
13
+ <p>Detected sites:</p>
14
+ <ul>
15
+ {% for lab in labs %}
16
+ <li><a href="/legacy/printer_status?lab={{ lab }}">{{ lab }} Zebra Printer Status</a></li>
17
+ {% else %}
18
+ <li>No labs found. Try scanning and resetting printers.json</li>
19
+ {% endfor %}
20
+ </ul>
21
+ </ul>
22
+ <hr>
23
+
24
+ <h2>Print Labels Manually</h2>
25
+ <ul>
26
+ <p>This tool is meant for infrequent use. The intention of zebra_day is to be used to create more fully featured tools/systems.</p>
27
+ <ul>
28
+ <li><a href="/legacy/simple_print_request">Print labels manually</a></li>
29
+ </ul>
30
+ </ul>
31
+ <hr>
32
+
33
+ <h2>Zebra Printer JSON Config</h2>
34
+ <ul>
35
+ <p>This JSON file defines the zebra printers available to the package.</p>
36
+ <ul>
37
+ <li><a href="/legacy/view_pstation_json">View and edit JSON</a></li>
38
+ <li><a href="/legacy/list_prior_printer_config_files">View backed up config files</a></li>
39
+ <li><a href="/legacy/build_new_printers_config_json">Build a new printers config JSON</a></li>
40
+ </ul>
41
+ </ul>
42
+ <hr>
43
+
44
+ <h2>Send Print Requests</h2>
45
+ <ul>
46
+ <p>To accessible zebra printers:</p>
47
+ <ul>
48
+ <li><a href="/legacy/bpr">Select lab + printer + label style</a></li>
49
+ <li><a href="/legacy/send_print_request">Same as above, but only stable label templates</a></li>
50
+ </ul>
51
+ </ul>
52
+ <hr>
53
+
54
+ <h2>Edit Label Templates</h2>
55
+ <ul>
56
+ <p>Modify existing templates, create new templates, preview changes & test print new designs.</p>
57
+ <ul>
58
+ <li><a href="/legacy/edit_zpl">Edit ZPL files</a></li>
59
+ </ul>
60
+ </ul>
61
+ <hr>
62
+
63
+ <h2>API Documentation</h2>
64
+ <ul>
65
+ <ul>
66
+ <li><a href="/docs">OpenAPI Documentation (Swagger UI)</a></li>
67
+ <li><a href="/redoc">ReDoc Documentation</a></li>
68
+ </ul>
69
+ </ul>
70
+ <hr>
71
+
72
+ <h2>GitHub Docs</h2>
73
+ <ul>
74
+ <small>
75
+ <li><a href="https://github.com/Daylily-Informatics/zebra_day">zebra_day</a></li>
76
+ <li><a href="https://github.com/Daylily-Informatics/fedex_tracking_day">fedex_tracking_day</a></li>
77
+ <li><a href="https://github.com/Daylily-Informatics/yaml_config_day">yaml_config_day</a></li>
78
+ </small>
79
+ </ul>
80
+ </ul>
81
+ {% endblock %}
82
+
@@ -0,0 +1,24 @@
1
+ {% extends "legacy/base.html" %}
2
+
3
+ {% block title %}{{ title }}{% endblock %}
4
+
5
+ {% block content %}
6
+ <h1>Saved Printer Config JSON Files</h1>
7
+ <small><a href="/legacy">home</a></small>
8
+ <hr>
9
+
10
+ <p>If you wish to restore from one of these files, download the one you'd like, open in a text editor,
11
+ then copy the contents of the file into <a href="/legacy/view_pstation_json">the printers json editing form</a>
12
+ and save a new json file.</p>
13
+ <small><i>Note: the existing file will have a backup created and accessible here</i></small>
14
+
15
+ <hr>
16
+ <ul>
17
+ {% for file in backup_files %}
18
+ <li><a href="/etc/old_printer_config/{{ file }}">{{ file }}</a></li>
19
+ {% else %}
20
+ <li>No backup files found</li>
21
+ {% endfor %}
22
+ </ul>
23
+ {% endblock %}
24
+
@@ -0,0 +1,30 @@
1
+ {% extends "legacy/base.html" %}
2
+
3
+ {% block title %}{{ title }}{% endblock %}
4
+
5
+ {% block content %}
6
+ <h1>Label Print Request Sent</h1>
7
+ <small><a href="/legacy">home</a></small>
8
+ <hr>
9
+
10
+ {% if success %}
11
+ {% if png_url %}
12
+ <h2>Successfully Created PNG</h2>
13
+ <img src="{{ png_url }}" alt="Label Preview">
14
+ <br><br>
15
+ <a href="{{ png_url }}" download>Download PNG</a>
16
+ {% else %}
17
+ <h2>Success - Label Printed</h2>
18
+ {% endif %}
19
+ {% else %}
20
+ <h2 style="color: red;">Error Printing Label</h2>
21
+ {% endif %}
22
+
23
+ <hr>
24
+ <p><small>The URL for this print request (which you can edit and use in curl) is:</small></p>
25
+ <code>{{ full_url }}</code>
26
+
27
+ <br><br>
28
+ <a href="/legacy">Home</a>
29
+ {% endblock %}
30
+
@@ -0,0 +1,25 @@
1
+ {% extends "legacy/base.html" %}
2
+
3
+ {% block title %}{{ title }}{% endblock %}
4
+
5
+ {% block content %}
6
+ <h1>Printer Information For {{ printer_name }} In Lab {{ lab }}</h1>
7
+ <ul>
8
+ <small><a href="/legacy">HOME</a> ... <a href="/legacy/printer_status?lab={{ lab }}">printer status report</a></small>
9
+ <hr>
10
+
11
+ <h2>JSON Stored Data</h2>
12
+ <ul>
13
+ {% for key, value in printer_info.items() %}
14
+ <li><strong>{{ key }}</strong>: {{ value }}</li>
15
+ {% endfor %}
16
+ </ul>
17
+
18
+ <br>
19
+ <h2>Configuration Retrieved From The Zebra Printer</h2>
20
+ <ul>
21
+ <pre>{{ printer_config }}</pre>
22
+ </ul>
23
+ </ul>
24
+ {% endblock %}
25
+
@@ -0,0 +1,70 @@
1
+ {% extends "legacy/base.html" %}
2
+
3
+ {% block title %}{{ title }}{% endblock %}
4
+
5
+ {% block content %}
6
+ <h1>Printer Status Summary For {{ lab }}</h1>
7
+ <small><a href="/legacy">BACK HOME</a></small>
8
+ <ul>
9
+ <hr>
10
+ <br>
11
+ <table border="1">
12
+ <tr>
13
+ <th>Printer Name</th>
14
+ <th>Printer IP</th>
15
+ <th>Label Styles Available</th>
16
+ <th>Status on Network</th>
17
+ </tr>
18
+ {% for printer in printers %}
19
+ <tr>
20
+ <td>
21
+ {{ printer.name }}<br>
22
+ <small>{{ printer.model }}<br>{{ printer.serial }}</small>
23
+ </td>
24
+ <td>
25
+ {% if printer.ip_address != 'dl_png' %}
26
+ <a href="http://{{ printer.ip_address }}" target="_blank">{{ printer.ip_address }}</a>
27
+ {% else %}
28
+ {{ printer.ip_address }}
29
+ {% endif %}
30
+ <br><small>{{ printer.arp_data }}</small>
31
+ </td>
32
+ <td>
33
+ {% for style in printer.label_zpl_styles %}
34
+ <small>
35
+ <a href="/legacy/edit_zpl">{{ style }}</a>
36
+ (<a href="/legacy/_print_label?lab={{ lab }}&printer={{ printer.name }}&label_zpl_style={{ style }}&uid_barcode={{ printer.ip_address }}&alt_a={{ printer.model }}&alt_b={{ printer.serial }}&alt_c={{ lab }}&alt_d={{ lab }}" target="_blank">test</a>)
37
+ </small><br>
38
+ {% endfor %}
39
+ </td>
40
+ <td>
41
+ {{ printer.status }}
42
+ <br><small><a href="/legacy/printer_details?printer_name={{ printer.name }}&lab={{ lab }}" target="_blank">...printer details</a></small>
43
+ </td>
44
+ </tr>
45
+ {% endfor %}
46
+ </table>
47
+ </ul>
48
+
49
+ <br><hr>
50
+ <h2>Build New Printers Config JSON // Scan Network</h2>
51
+ <ul>
52
+ <p>This will probe for printers, and with all discovered printers will create a new printers JSON and overwrite the current fleet data for this lab.</p>
53
+ <form id="myForm" action="/legacy/probe_zebra_printers_add_to_printers_json">
54
+ <label>Enter IP Root To Scan:</label>
55
+ <input type="text" value="{{ ip_root }}" name="ip_stub">
56
+ <br>
57
+ <label>Select (or enter new) lab:</label>
58
+ <input type="text" name="lab" list="lab_names" value="{{ lab }}">
59
+ <datalist id="lab_names">
60
+ {% for lab_name in labs %}
61
+ <option value="{{ lab_name }}">{{ lab_name }}</option>
62
+ {% endfor %}
63
+ </datalist>
64
+ <br>
65
+ <input type="submit" value="Scan Network">
66
+ </form>
67
+ <small><a href="/legacy/list_prior_printer_config_files">The current printers JSON will be backed up and can be found here.</a></small>
68
+ </ul>
69
+ {% endblock %}
70
+
@@ -0,0 +1,17 @@
1
+ {% extends "legacy/base.html" %}
2
+
3
+ {% block title %}{{ title }}{% endblock %}
4
+
5
+ {% block content %}
6
+ <h1>Template Saved</h1>
7
+ <small><a href="/legacy">home</a></small>
8
+ <hr>
9
+
10
+ <p>Changes saved to temp file: <strong>{{ new_filename }}</strong></p>
11
+
12
+ <ul>
13
+ <li><a href="/legacy/edit_zpl">Go back to the ZPL file list</a></li>
14
+ <li><a href="/legacy">Go home</a></li>
15
+ </ul>
16
+ {% endblock %}
17
+
@@ -0,0 +1,34 @@
1
+ {% extends "legacy/base.html" %}
2
+
3
+ {% block title %}{{ title }}{% endblock %}
4
+
5
+ {% block content %}
6
+ <h1>Send Print Request</h1>
7
+ <small><a href="/legacy">home</a></small>
8
+ <hr>
9
+
10
+ {% for lab_name, printers in labs.items() %}
11
+ <h2>Lab: {{ lab_name }}</h2>
12
+ <table border="1" width="90%">
13
+ <tr>
14
+ <th>Printer</th>
15
+ <th>Available Label Styles</th>
16
+ </tr>
17
+ {% for printer_name, printer_info in printers.items() %}
18
+ <tr>
19
+ <td>
20
+ <strong>{{ printer_name }}</strong><br>
21
+ <small>{{ printer_info.ip_address }}</small>
22
+ </td>
23
+ <td>
24
+ {% for style in printer_info.label_zpl_styles %}
25
+ <a href="/legacy/build_print_request?lab={{ lab_name }}&printer={{ printer_name }}&printer_ip={{ printer_info.ip_address }}&label_zpl_style={{ style }}">{{ style }}</a><br>
26
+ {% endfor %}
27
+ </td>
28
+ </tr>
29
+ {% endfor %}
30
+ </table>
31
+ <br>
32
+ {% endfor %}
33
+ {% endblock %}
34
+