Skip to content

Commit

Permalink
Added airscan-discover(1) man page
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpevzner committed May 8, 2020
1 parent 72161bf commit e9a63b3
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 10 deletions.
23 changes: 16 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ LIBDIR := $(shell $(PKG_CONFIG) --variable=libdir sane-backends)
BACKEND = libsane-airscan.so.1
DISCOVER = airscan-discover
LIBAIRSCAN = $(OBJDIR)/libairscan.a
MANPAGE = sane-airscan.5
MANTITLE = "AirScan (eSCL) SANE backend"
MAN_DISCOVER = $(DISCOVER).1
MAN_DISCOVER_TITLE = "SANE Scanner Access Now Easy"
MAN_BACKEND = sane-airscan.5
MAN_BACKEND_TITLE = "AirScan (eSCL) and WSD SANE backend"
DEPENDS := avahi-client avahi-glib libjpeg libsoup-2.4 libxml-2.0
DEPENDS += libpng

Expand Down Expand Up @@ -67,7 +69,7 @@ $(OBJDIR)%.o: %.c Makefile airscan.h
mkdir -p $(OBJDIR)
$(CC) -c -o $@ $< $(CPPFLAGS) $(airscan_CFLAGS)

.PHONY: all clean install
.PHONY: all clean install man

all: tags $(BACKEND) $(DISCOVER) test test-decode

Expand All @@ -92,15 +94,22 @@ install: all
cp -n dll.conf $(DESTDIR)$(PREFIX)$(CONFDIR)/dll.d/airscan
install -s -D -t $(DESTDIR)$(PREFIX)$(LIBDIR)/sane $(BACKEND)
mkdir -p $(DESTDIR)$(PREFIX)/$(MANDIR)/man5
install -m 644 -D -t $(DESTDIR)$(PREFIX)$(MANDIR)/man5 $(MANPAGE)
[ "$(COMPRESS)" = "" ] || $(COMPRESS) -f $(DESTDIR)$(PREFIX)$(MANDIR)/man5/$(MANPAGE)
install -m 644 -D -t $(DESTDIR)$(PREFIX)$(MANDIR)/man1 $(MAN_DISCOVER)
install -m 644 -D -t $(DESTDIR)$(PREFIX)$(MANDIR)/man5 $(MAN_BACKEND)
[ "$(COMPRESS)" = "" ] || $(COMPRESS) -f $(DESTDIR)$(PREFIX)$(MANDIR)/man1/$(MAN_DISCOVER)
[ "$(COMPRESS)" = "" ] || $(COMPRESS) -f $(DESTDIR)$(PREFIX)$(MANDIR)/man5/$(MAN_BACKEND)

clean:
rm -f test $(BACKEND) tags
rm -rf $(OBJDIR)

$(MANPAGE): $(MANPAGE).md
ronn --roff --manual=$(MANTITLE) $(MANPAGE).md
man: $(MAN_DISCOVER) $(MAN_BACKEND)

$(MAN_DISCOVER): $(MAN_DISCOVER).md
ronn --roff --manual=$(MAN_DISCOVER_TITLE) $(MAN_DISCOVER).md

$(MAN_BACKEND): $(MAN_BACKEND).md
ronn --roff --manual=$(MAN_BACKEND_TITLE) $(MAN_BACKEND).md

test: $(BACKEND) test.c
$(CC) -o test test.c $(BACKEND) -Wl,-rpath . ${airscan_CFLAGS}
Expand Down
49 changes: 49 additions & 0 deletions airscan-discover.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "AIRSCAN\-DISCOVER" "1" "May 2020" "" "SANE Scanner Access Now Easy"
.
.SH "NAME"
\fBairscan\-discover\fR \- Discover sane\-airscan compatible scanners
.
.SH "SYNOPSIS"
\fBairscan\-discover [\-h] [\-d] [\-t]\fR
.
.SH "DESCRIPTION"
\fBairscan\-discover\fR is a command\-line tool to find eSCL and WSD scanners on a local network
.
.P
It uses Avahi to discover DNS\-SD devices and its own implementation of WS\-Discovery to discover WSD devices\.
.
.P
On success, it outputs a fragment of sane\-airscan configuration file, that can be directly added to \fB/etc/sane\.d/airscan\.conf\fR
.
.SH "OPTIONS"
.
.TP
\fB\-h\fR
Print help screen
.
.TP
\fB\-d\fR
Print debug messages to console
.
.TP
\fB\-t\fR
Write a very detailed protocol trace to \fBairscan\-discover\-zeroconf\.log\fR and \fBairscan\-discover\-zeroconf\.tar\fR
.
.SH "FILES"
.
.TP
\fBairscan\-discover\-zeroconf\.log\fR
Protocol trace
.
.TP
\fBairscan\-discover\-zeroconf\.tar\fR
Non\-textual messages, if any, saved here\. Textual (i\.e\., XML) messages included directly into the \.log file
.
.SH "SEE ALSO"
sane(7), sane\-airscan(5)
.
.SH "AUTHOR"
Alexander Pevzner <pzz@apevzner\.com>
48 changes: 48 additions & 0 deletions airscan-discover.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
airscan-discover -- Discover sane-airscan compatible scanners
===================================================================

## SYNOPSIS

`airscan-discover [-h] [-d] [-t]`

## DESCRIPTION

`airscan-discover` is a command-line tool to find eSCL and WSD
scanners on a local network

It uses Avahi to discover DNS-SD devices and its own implementation
of WS-Discovery to discover WSD devices.

On success, it outputs a fragment of sane-airscan configuration
file, that can be directly added to `/etc/sane.d/airscan.conf`

## OPTIONS

* `-h`:
Print help screen

* `-d`:
Print debug messages to console

* `-t`:
Write a very detailed protocol trace to `airscan-discover-zeroconf.log`
and `airscan-discover-zeroconf.tar`

## FILES

* `airscan-discover-zeroconf.log`:
Protocol trace

* `airscan-discover-zeroconf.tar`:
Non-textual messages, if any, saved here. Textual (i.e., XML)
messages included directly into the .log file

## SEE ALSO

sane(7), sane-airscan(5)

## AUTHOR
Alexander Pevzner <[email protected]\>

# vim:ts=8:sw=4:et

4 changes: 2 additions & 2 deletions sane-airscan.5
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "SANE\-AIRSCAN" "5" "December 2019" "" "AirScan (eSCL) SANE backend"
.TH "SANE\-AIRSCAN" "5" "May 2020" "" "AirScan (eSCL) and WSD SANE backend"
.
.SH "NAME"
\fBsane\-airscan\fR \- SANE backend for AirScan (eSCL) scanners and MFP
Expand Down Expand Up @@ -158,7 +158,7 @@ This variable alters the search path for configuration files\. This is a colon\-
If you have found a bug, please file a GitHub issue on a GitHub project page: \fBhttps://github\.com/alexpevzner/sane\-airscan\fR
.
.SH "SEE ALSO"
sane(7), scanimage(1), xscane(1)
sane(7), scanimage(1), xscane(1), airscan\-discover(1)
.
.SH "AUTHOR"
Alexander Pevzner <pzz@apevzner\.com>
2 changes: 1 addition & 1 deletion sane-airscan.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ project page: **https://github.com/alexpevzner/sane-airscan**

## SEE ALSO

sane(7), scanimage(1), xscane(1)
sane(7), scanimage(1), xscane(1), airscan-discover(1)

## AUTHOR
Alexander Pevzner <[email protected]\>
Expand Down

0 comments on commit e9a63b3

Please sign in to comment.