printnatura/README.md

104 lines
1.6 KiB
Markdown
Raw Normal View History

2022-11-07 10:33:26 +00:00
# PrintNatura (Print Server)
2022-11-04 13:41:36 +00:00
2022-11-07 10:33:26 +00:00
## Requeriments
* Git
* Docker
## Installaton
Clone the repository
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
git clone https://gitea.verdnatura.es/verdnatura/printnatura.git
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
Build
2022-11-04 13:41:36 +00:00
```
2022-11-07 12:45:33 +00:00
docker build -t printnatura .
2022-11-04 13:41:36 +00:00
```
2022-11-07 13:19:48 +00:00
Create file named "config.local.yml" and put your private configuration:
```
debug: true
db:
host: localhost
port: 3306
user: user
password: password
database: schema
salix:
url: http://localhost:3000
user: user
password: password
reconnectTimeout: 30
refreshRate: 1000
```
2022-11-07 10:33:26 +00:00
## How to use
2022-11-04 13:41:36 +00:00
2022-11-07 10:33:26 +00:00
Exec
2022-11-04 13:41:36 +00:00
```
2022-11-07 12:45:33 +00:00
docker run --name printnatura -it --rm -v $PWD/config.local.yml:/printnatura/config.local.yml:ro -p 80:631 printnatura
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
Bash
2022-11-04 13:41:36 +00:00
```
2022-11-07 12:45:33 +00:00
docker exec -i -t printnatura bash
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
Has a graphical web interface (cupsd.conf)
## Commands
### Install printer
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
lpadmin -p ${printername} -E -v socket://${ip-address} -m ${driver}
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
### Print document
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
lp ${file} ${printername}
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
### Search driver
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
lpinfo --make-and-model '${printer-model}' -m
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
### Show intalled printer
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
lpstat -p
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
### Delete installed printer
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
lpadmin -x ${printername}
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
### More [here](https://www.cups.org/doc/man-lp.html)
## Drivers:
### ZEBRA
Generic driver
_Example:_
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
drv:///sample.drv/zebra.ppd
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
### RICOH
Each printer has its own driver
_Example:_
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
gutenprint.5.3://ricoh-mp_c2011/expert
2022-11-04 13:41:36 +00:00
```
2022-11-07 10:33:26 +00:00
### GODEX
Installed by the Dockerfile (GoDEXdriver-1.1.6.tar.gz)
_Example:_
2022-11-04 13:41:36 +00:00
```
lsb/local/godex/godex-zx420i.ppd
2022-11-07 10:33:26 +00:00
```
## Build With
* [Git](https://git-scm.com/)
* [Nodejs](https://nodejs.org/)
* [NodeGit](https://www.nodegit.org/)
* [Docker](https://www.docker.com/)