diff --git a/README.md b/README.md index 6bacff1..a7a7ee8 100644 --- a/README.md +++ b/README.md @@ -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 @@ -10,17 +10,17 @@ This is a WebGUI for [s3-client](https://git.fluffy.pw/leafus/s3-client) 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: ``` - cd s3-client-web + cd web-hp-eprint-clone ``` 3. Build the binary: ``` - go build -o s3-client-web + go build -o web-hp-eprint ``` ## Configuration @@ -29,10 +29,25 @@ In the .env file this is the only thing you can set ``` 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 -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 \ No newline at end of file diff --git a/main.go b/main.go index 1ecbd69..609deb5 100644 --- a/main.go +++ b/main.go @@ -30,10 +30,6 @@ func main() { port = "8080" } - sendntfynotification := os.Getenv("SENDNTFYMAIL") - if sendntfynotification == "" { - sendntfynotification = "true" - } http.HandleFunc("/", handleIndex) http.HandleFunc("/upload", handleUpload) http.HandleFunc("/delete", handleDelete) @@ -97,10 +93,6 @@ func handleUpload(w http.ResponseWriter, r *http.Request) { return } - sendntfynotification := os.Getenv("SENDNTFYMAIL") - if sendntfynotification == "false" { - targetmail = "" - } printingcmdPath := filepath.Join("/", "usr", "bin", "eprintcloned") filelog := os.Getenv("LOG")