add files yay :3

This commit is contained in:
matu6968 2024-10-31 21:03:43 +01:00
parent 73eaf395c7
commit 8b3f1933a5
2 changed files with 22 additions and 15 deletions

View File

@ -1,6 +1,6 @@
# S3 Client Web # HP ePrint like service clone (web edition)
This is a WebGUI for [s3-client](https://git.fluffy.pw/leafus/s3-client) 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
## Prerequisites ## Prerequisites
@ -10,17 +10,17 @@ This is a WebGUI for [s3-client](https://git.fluffy.pw/leafus/s3-client)
1. Clone the repository: 1. Clone the repository:
``` ```
git clone https://git.fluffy.pw/leafus/s3-client-web git clone https://git.fluffy.pw/matu6968/web-hp-eprint-clone
``` ```
2. Go to the project directory: 2. Go to the project directory:
``` ```
cd s3-client-web cd web-hp-eprint-clone
``` ```
3. Build the binary: 3. Build the binary:
``` ```
go build -o s3-client-web go build -o web-hp-eprint
``` ```
## Configuration ## Configuration
@ -29,10 +29,25 @@ In the .env file this is the only thing you can set
``` ```
PORT=8080 PORT=8080
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
``` ```
### For this to even work ### For this to even work
You need to download a latest linux binary release of [s3-client](https://git.fluffy.pw/leafus/s3-client) from the "Releases" tab for your architecture Setup a printer on your host by connecting it over USB or WiFi and then adding the printer in your OS
and put the eprintcloned script (ePrint clone daemon aka it handles the printing) 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
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
```
and put the binary in the "bin" folder !IMPORTANT! you need to rename the file to just s3-client and create s3config.toml file, the configuration of that is in the [s3-client](https://git.fluffy.pw/leafus/s3-client) repository

View File

@ -30,10 +30,6 @@ func main() {
port = "8080" port = "8080"
} }
sendntfynotification := os.Getenv("SENDNTFYMAIL")
if sendntfynotification == "" {
sendntfynotification = "true"
}
http.HandleFunc("/", handleIndex) http.HandleFunc("/", handleIndex)
http.HandleFunc("/upload", handleUpload) http.HandleFunc("/upload", handleUpload)
http.HandleFunc("/delete", handleDelete) http.HandleFunc("/delete", handleDelete)
@ -97,10 +93,6 @@ func handleUpload(w http.ResponseWriter, r *http.Request) {
return return
} }
sendntfynotification := os.Getenv("SENDNTFYMAIL")
if sendntfynotification == "false" {
targetmail = ""
}
printingcmdPath := filepath.Join("/", "usr", "bin", "eprintcloned") printingcmdPath := filepath.Join("/", "usr", "bin", "eprintcloned")
filelog := os.Getenv("LOG") filelog := os.Getenv("LOG")