Compare commits
4 Commits
2
...
80bf539484
| Author | SHA1 | Date | |
|---|---|---|---|
| 80bf539484 | |||
| 13bba33c26 | |||
| ecd98c72ce | |||
| 344229b77b |
@@ -1,4 +1,4 @@
|
||||
# SekiPOS v1.2 🍫🥤
|
||||
# SekiPOS v1.4 🍫🥤
|
||||
|
||||
A reactive POS inventory system for software engineers with a snack addiction. Features real-time UI updates, automatic product discovery via Open Food Facts, and local image caching.
|
||||
|
||||
|
||||
BIN
ScannerPython/output/scannerV2.exe
Normal file
BIN
ScannerPython/output/scannerV2.exe
Normal file
Binary file not shown.
36
ScannerPython/scannerV2.py
Normal file
36
ScannerPython/scannerV2.py
Normal file
@@ -0,0 +1,36 @@
|
||||
import serial
|
||||
import requests
|
||||
import time
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
def run_bridge():
|
||||
parser = argparse.ArgumentParser(description="Scanner Bridge for the technically impaired")
|
||||
parser.add_argument('--port', default='COM5', help='Serial port (default: COM5)')
|
||||
parser.add_argument('--baud', type=int, default=115200, help='Baud rate (default: 115200)')
|
||||
parser.add_argument('--url', default='https://scanner.sekidesu.xyz/scan', help='Server URL')
|
||||
args = parser.parse_args()
|
||||
|
||||
try:
|
||||
ser = serial.Serial(args.port, args.baud, timeout=0.1)
|
||||
print(f"Connected to {args.port} at {args.baud} bauds.")
|
||||
|
||||
while True:
|
||||
if ser.in_waiting > 0:
|
||||
barcode = ser.readline().decode('utf-8', errors='ignore').strip()
|
||||
if barcode:
|
||||
print(f"Scanned: {barcode}")
|
||||
try:
|
||||
resp = requests.get(args.url, params={'content': barcode}, timeout=5)
|
||||
print(f"Server responded: {resp.status_code}")
|
||||
except Exception as e:
|
||||
print(f"Failed to send to server: {e}")
|
||||
time.sleep(0.01)
|
||||
|
||||
except serial.SerialException as e:
|
||||
print(f"Error opening {args.port}: {e}")
|
||||
except KeyboardInterrupt:
|
||||
print("\nBridge stopped. Finally.")
|
||||
|
||||
if __name__ == "__main__":
|
||||
run_bridge()
|
||||
@@ -13,7 +13,7 @@
|
||||
<body>
|
||||
|
||||
<div class="header-bar">
|
||||
<h2 style="margin:0;">SekiPOS v1.2</h2>
|
||||
<h2 style="margin:0;">SekiPOS v1.4</h2>
|
||||
<div style="display: flex; align-items: center; gap: 15px;">
|
||||
<button onclick="toggleTheme()" class="theme-toggle-btn" id="theme-text" style="margin: 0;">Modo
|
||||
Oscuro</button>
|
||||
@@ -168,7 +168,7 @@
|
||||
setTimeout(() => { formCard.style.border = "none"; }, 500);
|
||||
|
||||
// Focus price because it's usually the only thing missing
|
||||
document.getElementById('form-price').focus();
|
||||
//document.getElementById('form-price').focus();
|
||||
}
|
||||
|
||||
function dismissPrompt() {
|
||||
|
||||
Reference in New Issue
Block a user