web-hp-eprint-clone/README.md

59 lines
1.9 KiB
Markdown
Raw Normal View History

2024-10-31 21:03:43 +01:00
# HP ePrint like service clone (web edition)
2024-09-29 19:31:24 +02:00
2024-10-31 21:03:43 +01:00
This is a HP ePrint clone that has similar functions to normal HP ePrint but its on the web and it is not HP printer specific
2024-09-29 19:31:24 +02:00
## Prerequisites
- Go (1.23.1 or later)
## Installation
1. Clone the repository:
```
2024-10-31 21:03:43 +01:00
git clone https://git.fluffy.pw/matu6968/web-hp-eprint-clone
2024-09-29 19:31:24 +02:00
```
2. Go to the project directory:
```
2024-10-31 21:03:43 +01:00
cd web-hp-eprint-clone
2024-09-29 19:31:24 +02:00
```
3. Build the binary:
```
2024-10-31 21:03:43 +01:00
go build -o web-hp-eprint
2024-09-29 19:31:24 +02:00
```
## Configuration
In the .env file this is the only thing you can set
```
PORT=8080
2024-10-31 21:03:43 +01:00
LOG=log # enables file logging (aka copies file to user home directory under the folder imagelog so make a folder first in the home root if you wish to enable it), to disable it replace it with nolog
2024-09-29 19:31:24 +02:00
```
### For this to even work
2024-11-01 11:41:04 +01:00
You need a linux distro which has the modern equifelent of the lpr program. To check if you have the newer version, type `man lpr` and look at the program description, if it says `lpr - print files` (present on recent Ubuntu versions and rolling release distros like Arch Linux) then you are good to go otherwaise it it says `lpr - off line print` (present on Debian and older Ubuntu versions) then this won't work as the commands for the older version are different and this targets the newer version of the program.
2024-09-29 19:31:24 +02:00
2024-10-31 21:03:43 +01:00
2024-11-01 11:41:04 +01:00
Then setup a printer on your host by connecting it over USB or WiFi and then adding the printer in your distro
and put the eprintcloned script (ePrint clone daemon aka it handles the printing commands) in the "/usr/bin" folder
# !IMPORTANT!
You need to modify the script to include your printer name (it is at the top and is called printer and not the one used in the included configuration in the repository
2024-10-31 21:03:43 +01:00
for example change it from
```
#!/bin/bash
printer=examplename # replace this with your actual printer name before putting it into /usr/bin
```
to
```
#!/bin/bash
printer=Deskjet-2600 # replace this with your actual printer name before putting it into /usr/bin
```
2024-09-29 19:31:24 +02:00