Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
digibib
kohaprinter
Commits
808a0536
Commit
808a0536
authored
Feb 06, 2018
by
Benjamin Rokseth
Browse files
Fix naming to conform to cups autodiscovery
parent
0448d775
Changes
1
Hide whitespace changes
Inline
Side-by-side
kohaprinter.go
View file @
808a0536
...
...
@@ -28,11 +28,11 @@ var (
* wkhtmltopdf binary MUST be downloaded to /usr/bin
* this file needs to be chown root and chmod 755 executable in /usr/lib/cups/backend/
* job needs two extra options passed: koha-printer-type and koha-origin-ip
* kohaprint.json mapping must exist beside this file
* kohaprint
er_mapping
.json mapping must exist beside this file
*/
func
main
()
{
lfile
,
err
:=
os
.
Create
(
"/tmp/kohaprint.log"
)
lfile
,
err
:=
os
.
Create
(
"/tmp/kohaprint
er
.log"
)
if
err
!=
nil
{
fail
(
err
)
}
...
...
@@ -50,10 +50,10 @@ func main() {
Log
.
Printf
(
"[INFO ] MAPPING: %v"
,
mapping
)
// No args? Return status line as cups expects this to discover backend
if
len
(
os
.
Args
)
==
1
{
fmt
.
Println
(
"network kohaprint
\"
Unknown
\"
\"
Print any job to queue specified in device-URI
\"
"
)
fmt
.
Println
(
"network kohaprint
er
\"
Unknown
\"
\"
Print any job to queue specified in device-URI
\"
"
)
os
.
Exit
(
0
)
}
else
if
len
(
os
.
Args
)
<
6
{
fmt
.
Println
(
"Usage: kohaprint job-id user title copies options [file]"
)
fmt
.
Println
(
"Usage: kohaprint
er
job-id user title copies options [file]"
)
os
.
Exit
(
0
)
}
...
...
@@ -96,7 +96,7 @@ func main() {
fail
(
err
)
}
tmpf
,
err
:=
ioutil
.
TempFile
(
""
,
"kohaprintpdf"
)
tmpf
,
err
:=
ioutil
.
TempFile
(
""
,
"kohaprint
er_
pdf"
)
if
err
!=
nil
{
fail
(
err
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment