Fix for windows
This commit is contained in:
parent
d59bf51416
commit
fc0b3f9e6e
@ -342,7 +342,7 @@ def collect_tasks(serial, bank, mid, device_tz, kopecks, prefix):
|
|||||||
print(f"date headers: {[h['date'] for h in headers]}")
|
print(f"date headers: {[h['date'] for h in headers]}")
|
||||||
print(f"visible rows: {len(baseline)}")
|
print(f"visible rows: {len(baseline)}")
|
||||||
for i, r in enumerate(baseline, 1):
|
for i, r in enumerate(baseline, 1):
|
||||||
print(f" {i}. ({r['cx']},{r['cy']}) {r['amount']:+d} ₽ date={r.get('date','-')} | {r['text'][:40]}")
|
print(f" {i}. ({r['cx']},{r['cy']}) {r['amount']:+.2f} ₽ date={r.get('date','-')} | {r['text'][:40]}")
|
||||||
|
|
||||||
task_num = 0
|
task_num = 0
|
||||||
processed_keys = set() # (amount, created_at) — финальная дедупликация
|
processed_keys = set() # (amount, created_at) — финальная дедупликация
|
||||||
@ -384,7 +384,7 @@ def collect_tasks(serial, bank, mid, device_tz, kopecks, prefix):
|
|||||||
for row in rows:
|
for row in rows:
|
||||||
date_from_header = row["date"]
|
date_from_header = row["date"]
|
||||||
|
|
||||||
print(f"\n [{date_from_header}] tap ({row['cx']},{row['cy']}) {row['amount']:+d}")
|
print(f"\n [{date_from_header}] tap ({row['cx']},{row['cy']}) {row['amount']:+.2f}")
|
||||||
tap(serial, row["cx"], row["cy"])
|
tap(serial, row["cx"], row["cy"])
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
|
|
||||||
@ -627,7 +627,7 @@ def main():
|
|||||||
print(f"\n{len(all_tasks)} tasks written to {POOL_DIR}/")
|
print(f"\n{len(all_tasks)} tasks written to {POOL_DIR}/")
|
||||||
for t in all_tasks:
|
for t in all_tasks:
|
||||||
b = t["body"]
|
b = t["body"]
|
||||||
print(f" {t['_tag']}: amount={b['amount']:+d} created_at={b['created_at']}")
|
print(f" {t['_tag']}: amount={b['amount']:+.2f} created_at={b['created_at']}")
|
||||||
|
|
||||||
# Inject into mock if running
|
# Inject into mock if running
|
||||||
try:
|
try:
|
||||||
|
|||||||
@ -35,9 +35,12 @@
|
|||||||
param(
|
param(
|
||||||
[int]$Port = 8888,
|
[int]$Port = 8888,
|
||||||
[int]$FtPerMaterial = 3,
|
[int]$FtPerMaterial = 3,
|
||||||
|
[string]$Banks = "",
|
||||||
|
[string]$Types = "",
|
||||||
[switch]$SkipInstall,
|
[switch]$SkipInstall,
|
||||||
[switch]$GenerateOnly,
|
[switch]$GenerateOnly,
|
||||||
[switch]$Clean
|
[switch]$Clean,
|
||||||
|
[switch]$Debug
|
||||||
)
|
)
|
||||||
|
|
||||||
$ErrorActionPreference = "Continue"
|
$ErrorActionPreference = "Continue"
|
||||||
@ -549,4 +552,16 @@ Remove-Item $dbHelperPy -ErrorAction SilentlyContinue
|
|||||||
Start-Process "http://127.0.0.1:${Port}/_admin/report/html"
|
Start-Process "http://127.0.0.1:${Port}/_admin/report/html"
|
||||||
|
|
||||||
# Launch server (blocks until Ctrl+C)
|
# Launch server (blocks until Ctrl+C)
|
||||||
& $pythonExe $mockScript --host 127.0.0.1 --port $Port --ft-per-material $FtPerMaterial
|
$serverArgs = @("--host", "127.0.0.1", "--port", $Port, "--ft-per-material", $FtPerMaterial)
|
||||||
|
if ($Banks) {
|
||||||
|
$serverArgs += "--banks"
|
||||||
|
$serverArgs += ($Banks -split '[,\s]+')
|
||||||
|
}
|
||||||
|
if ($Types) {
|
||||||
|
$serverArgs += "--types"
|
||||||
|
$serverArgs += ($Types -split '[,\s]+')
|
||||||
|
}
|
||||||
|
if ($Debug) {
|
||||||
|
$serverArgs += "--debug"
|
||||||
|
}
|
||||||
|
& $pythonExe $mockScript @serverArgs
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user