add .pkgdata

This commit is contained in:
2026-09-12 04:17:58 +03:00
parent 1c3a598881
commit 59a145be93
22 changed files with 184 additions and 83 deletions

View File

@ -1,20 +1,41 @@
unitprint/backend-local
=
ssh://git@root-kit.ru:17458/UnitPrint/backend-local.git
``` env *** env ***
disable
```
cargo new backend-local
``` sh *** build ***
cargo build --release
mkdir ../bin
cp -l target/release/backend-local ../bin
```
``` cfg *** run deps ***
cups
cups-filters
foomatic-db
foomatic-db-engine
hplip
```
Для раздачи инета службу поднять/конфиг сделать под unitprint ей
``` sh *** setup ***
PRINTER_URI=$(lpinfo -v | awk '/^direct usb:\/\// {print $2; exit}')
MODEL=$(python3 -c "import urllib.parse,sys; print(urllib.parse.unquote('$PRINTER_URI'.split('/')[-1].split('?')[0]))")
PPD_PATH=$(lpinfo -m | grep -i "$MODEL" | grep -iv 'postscript' | grep -i 'hpcups' | head -n1 | awk '{print $1}')
if [[ -z "$PPD_PATH" ]]; then
PPD_PATH=$(lpinfo -m | grep -i "$MODEL" | grep -iv 'postscript' | head -n1 | awk '{print $1}')
fi
echo "URI: $PRINTER_URI"
echo "Model: $MODEL"
echo "PPD: $PPD_PATH"
lpadmin -p Auto_HP_P2015 -E -v "$PRINTER_URI" -m "$PPD_PATH"
lpadmin -d Auto_HP_P2015
echo "Default printer set:"
lpstat -d
lpoptions -p Auto_HP_P2015 -o PageSize=A4
```

View File

@ -0,0 +1,11 @@
unitprint/backend-local/s6
=
``` sh *** set ***
ln -sf $(pwd) /pkg/gnu/s6/etc/service/current/unitprint-backend-local
```
``` sh *** off ***
rm /pkg/gnu/s6/etc/service/current/unitprint-backend-local
```

View File

@ -0,0 +1 @@
../bin/backend-local

View File

@ -1,9 +1,11 @@
unitprint/backend/scan/DocRes
=
https://github.com/ZZZHANG-jx/DocRes.git
ssh://git@root-kit.ru:17458/UnitPrint/scan-DocRes.git
git remote set-url origin ssh://git@root-kit.ru:17458/UnitPrint/scan-DocScanner.git
``` sh *** build ***
mv * ..
cp -rfPl * ..
cp -rfPl .* ..
```
``` sh *** config ***
@ -17,44 +19,3 @@ mkdir -p data/weights
#rsync -avz ~/Downloads/mbd.pkl a:/pkg/gnu/unitprint/backend/scan/DocRes/data/weights
#rsync -avz ~/Downloads/docres.pkl a:/pkg/gnu/unitprint/backend/scan/DocRes/data/weights
```
mkdir -p ~/.config/miopen
export MIOPEN_USER_DB_PATH="/root/.config/miopen"
export MIOPEN_FIND_MODE=3
export HIP_VISIBLE_DEVICES=0
time ../../venv/bin/python inference.py \
--task deshadowing \
--im_path ./IMG_20260905_172410_rec.jpg \
--out_folder ./
time python inference.py \
--task appearance \
--im_path ./output_pipeline/IMG_20260905_172410_rec_deshadowing.png \
--out_folder ./output_pipeline
time python inference.py \
--task deblurring \
--im_path ./output_pipeline/IMG_20260905_172410_rec_deshadowing_appearance.png \
--out_folder ./output_pipeline
time python inference.py \
--task deblurring \
--im_path ../../DocScanner/src/rectified/IMG_20260905_172410_rec.png \
--out_folder ./output_pipeline
time python inference.py \
--task appearance \
--im_path ./output_pipeline/IMG_20260905_172410_rec_deblurring.png \
--out_folder ./output_pipeline
# 3. Appearance
time python inference.py \
--task appearance \
--im_path ./output_pipeline/IMG_20260905_172410_rec_deshadowing.png \
--out_folder ./output_pipeline
time python inference.py \
--task dewarping \
--im_path /pkg/gnu/unitprint/DocScanner/src/distorted/IMG_20260905_172410.jpg \
--out_folder ./output_pipeline

View File

@ -1,9 +1,10 @@
unitprint/backend/scan/DocScanner
=
https://root-kit.ru/UnitPrint/scan-DocScanner.git
ssh://git@root-kit.ru:17458/UnitPrint/scan-DocScanner.git
``` sh *** build ***
mv * ..
cp -rfPl * ..
cp -rfPl .* ..
```
``` sh *** config ***

View File

@ -7,7 +7,16 @@ save_source=true
```
``` sh *** build ***
ls
git pull
npm install
npm run build
rm -rf ../dist
cp -rPl dist ..
```
``` sh *** config ***
chmod o+x /pkg/gnu/unitprint
chown -R nginx:nginx /pkg/gnu/unitprint/web-app/dist
```
``` sh *** init ***
@ -16,5 +25,3 @@ npm create vite@latest . -- --template svelte --no-interactive --overwrite
npm install
```
chmod o+x /pkg/gnu/unitprint
chown -R nginx:nginx /pkg/gnu/unitprint/web-app/dist