fix lp on nix

This commit is contained in:
Connor Rhodes 2026-04-23 20:19:14 -05:00
parent b0c19d5642
commit 2d61260583
2 changed files with 7 additions and 2 deletions

View file

@ -68,7 +68,12 @@ def upload_and_print():
app.logger.info(
f"Sending '{filename}' ({page_count} pages) to printer '{PRINTER_NAME}'"
)
command = ["lp", "-d", PRINTER_NAME, filepath]
command = [
"lp",
"-d",
PRINTER_NAME,
filepath,
]
result = subprocess.run(
command, capture_output=True, text=True, check=True
)

View file

@ -38,7 +38,7 @@
{% endif %}
{% endwith %}
<form action="/" method="post" enctype="multipart/form-data">
<form action="{{ url_for('upload_and_print') }}" method="post" enctype="multipart/form-data">
<div class="border-2 border-dashed border-gray-300 rounded-lg p-8 text-center bg-gray-50 hover:border-blue-500 transition-colors duration-300">
<label for="file-upload" class="cursor-pointer">
<svg xmlns="http://www.w3.org/2000/svg" class="w-12 h-12 mx-auto text-gray-400" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1">