Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation overhaul #666

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,9 @@ app-server/data/preview/*.tif
**/config.local.js
var
debian

# Jekyll
.bundle
_site
.jekyll-metadata
Gemfile.lock
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ ARG UNAME=scanservjs
# config files need write access).
RUN groupadd -g $GID -o $UNAME \
&& useradd -o -u $UID -g $GID -m -s /bin/bash $UNAME \
&& chown -R $UID:$GID /entrypoint.sh /srv/scanservjs /etc/sane.d/net.conf /etc/sane.d/airscan.conf
&& chown -R $UID:$GID /entrypoint.sh /usr/share/scanservjs /etc/sane.d/net.conf /etc/sane.d/airscan.conf
USER $UNAME

# default build
Expand Down
7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

gem "github-pages", group: :jekyll_plugins
73 changes: 56 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

Copyright 2016-2023 [Sam Strachan](https://github.com/sbs20)

## Current version

* [v2.27.0](/sbs20/scanservjs/tree/v2.27.0)

## What people are saying

> I've decided to switch to using only this, I find using this in a browser is
Expand Down Expand Up @@ -54,7 +58,7 @@ complicated installation.
* Light and dark mode
* Responsive design
* Docker images for `amd64`, `arm64` and `armv7`
* Swagger API documentation
* OpenAPI documentation

It supports any
[SANE compatible devices](http://www.sane-project.org/sane-supported-devices.html).
Expand All @@ -63,18 +67,50 @@ It supports any

* SANE Scanner
* Linux host (or VM with necessary pass-through e.g. USB)
* Software sane-utils, ImageMagick, Tesseract (optional) and nodejs
* Software sane-utils, ImageMagick, Tesseract and nodejs

## Install

* Debian:
```sh
curl -s https://raw.githubusercontent.com/sbs20/scanservjs/master/bootstrap.sh | sudo bash -s -- -v latest
```
* Arch:
```sh
yay -S scanservjs
```
* Docker:
```sh
docker run -d \
-p 8080:8080 \
-v /var/run/dbus:/var/run/dbus \
--restart unless-stopped \
--name scanservjs-container \
--privileged sbs20/scanservjs:latest
```

## Documentation

* [Manual installation](docs/install.md)
* [Docker installation](docs/docker.md)
* [Scanner and SANE setup](docs/sane.md)
* [Proxy setup](docs/proxy.md)
* [Troubleshooting](docs/troubleshooting.md)
* [Development notes](docs/development.md)
* [Configuration and device override](docs/config.md)
* [Integration](docs/integration.md)
### Installation and setup

* [Standard install](docs/01-install.md)
* [Docker install](docs/02-docker.md)
* [SANE setup](docs/03-sane.md)
* [Troubleshooting](docs/04-troubleshooting.md)

### Configuration

* [Configuration](docs/10-configuration.md)
* [Integration](docs/11-integration.md)
* [Recipes](docs/12-recipes.md)
* [Using a proxy](docs/13-proxy.md)

### Developing

* [Development](docs/90-development.md)
* [Localisation](docs/91-localisation.md)
* [References](docs/92-references.md)
* [QNAP](docs/93-qnap.md)

## Running scanservjs

Expand All @@ -91,9 +127,9 @@ Once the scanner is detected then you have a number of pages.
This page gives access to the controls for your scanner. The app will generally
find the settings available automatically, although some scanners mis-report
their abilities. (If this is the case, then you can override what's detected,
see [Configuration and device override](docs/config.md) for more). If geometry
is available (selecting scan size and position) then you will have cropping
available to you.
see [Configuration and device override](docs/10-configuration.md) for more). If
geometry is available (selecting scan size and position) then you will have
cropping available to you.

There is also the ability to perform batch scanning. If you have a document
feeder, then just use the `Auto` option. If not then use `Manual` and the app
Expand All @@ -118,6 +154,9 @@ Furthermore, users in real life will want to store their scans with their own
names, directory structures and cloud services or NAS devices. The permutations
and possibilities are endless and are beyond the scope of the app.

scanservjs can integrate files either through pipeline automation or file
actions. See [integration documentation](docs/11-integration.md) for more.

### Settings

The settings page allows you to change the appearance and locale / language.
Expand All @@ -126,12 +165,12 @@ The settings page allows you to change the appearance and locale / language.

Copyright information and system info.

## Swagger API documentation
## OpenAPI documentation

There is built in swagger documentation with an API explorer. Access it direct
There is built in OpenAPI documentation with an API explorer. Access it direct
using `/api-docs` or navigate from the `About` page.

![swagger](https://github.com/sbs20/scanservjs/raw/master/docs/swagger.png)
![OpenAPI](https://github.com/sbs20/scanservjs/raw/master/docs/swagger.png)

## Why?

Expand All @@ -152,4 +191,4 @@ and it's been a labour of love ever since.

## More about SANE

* http://www.sane-project.org/
* <http://www.sane-project.org/>
37 changes: 37 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
domain: sbs20.github.io
url: https://sbs20.github.io
baseurl: /scanservjs
theme: jekyll-theme-minimal
exclude: [debian, var, node_modules, dist]
header_pages:
- about.md
- portfolio.md

description: |-
SANE scanner nodejs web ui

<h3><a href="/scanservjs/">Getting started</a></h3>

<h3>Installation and setup</h3>
<ol>
<li><a href="/scanservjs/docs/01-install.html">Standard install</a></li>
<li><a href="/scanservjs/docs/02-docker.html">Docker install</a></li>
<li><a href="/scanservjs/docs/03-sane.html">SANE setup install</a></li>
<li><a href="/scanservjs/docs/04-troubleshooting.html">Troubleshooting</a></li>
</ol>

<h3>Configuration</h3>
<ol>
<li><a href="/scanservjs/docs/10-configuration.html">Configuration</a></li>
<li><a href="/scanservjs/docs/11-integration.html">Integration</a></li>
<li><a href="/scanservjs/docs/12-recipes.html">Recipes</a></li>
<li><a href="/scanservjs/docs/13-proxy.html">Using a proxy</a></li>
</ol>

<h3>Developing</h3>
<ol>
<li><a href="/scanservjs/docs/90-development.html">Development</a></li>
<li><a href="/scanservjs/docs/91-localisation.html">Localisation</a></li>
<li><a href="/scanservjs/docs/92-references.html">References</a></li>
<li><a href="/scanservjs/docs/93-qnap.html">QNAP</a></li>
</ol>
7 changes: 6 additions & 1 deletion app-ui/src/components/About.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@
<div class="text-body-1 mb-4">
{{ $t('about.main') }}
</div>

<div class="text-body-1 mb-4">
<a target="_blank" href="https://sbs20.github.io/scanservjs/">https://sbs20.github.io/scanservjs/</a>
</div>

<div class="text-body-1 mb-4">
{{ $t('about.issue') }}
<a target="_blank" href="https://github.com/sbs20/scanservjs">https://github.com/sbs20/scanservjs</a>
</div>

<div class="text-body-1 mb-4">
{{ $t('about.api') }}
<a target="_blank" href="api-docs">Swagger /api-docs</a>
<a target="_blank" href="api-docs">/api-docs</a>
</div>

<v-btn @click="showSystemInfo">{{ $t('about.system-info') }}</v-btn>
Expand Down
2 changes: 1 addition & 1 deletion app-ui/src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"about": {
"main": "scanservjs is a simple web-based UI for your scanner. It allows you to share one or more scanners (using SANE) on a network without the need for drivers or complicated installation. It can save to TIF, JPG, PNG, PDF and TXT (with Tesseract OCR) with varying compression settings, all of which can be configured. It supports multipage scanning and all SANE compatible devices.",
"issue": "File an issue or view the source code:",
"api": "Swagger API documentation:",
"api": "OpenAPI documentation:",
"system-info": "System information"
},

Expand Down
2 changes: 1 addition & 1 deletion app-ui/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"about": {
"main": "scanservjs is a simple web-based UI for your scanner. It allows you to share one or more scanners (using SANE) on a network without the need for drivers or complicated installation. It can save to TIF, JPG, PNG, PDF and TXT (with Tesseract OCR) with varying compression settings, all of which can be configured. It supports multipage scanning and all SANE compatible devices.",
"issue": "File an issue or view the source code:",
"api": "Swagger API documentation:",
"api": "OpenAPI documentation:",
"system-info": "System information"
},

Expand Down
29 changes: 29 additions & 0 deletions assets/css/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
---

@import "{{ site.theme }}";

a:hover, a:focus {
font-weight: unset;
background-color: lightblue;
}

@media print, screen and (max-width: 960px) {
header {
padding-right: unset;
}
}

@media print, screen and (min-width: 960px) {
.wrapper {
max-width: 1152px;
min-width: 860px;
width: unset;
}

section {
float: none;
margin-left: 350px;
width: unset;
}
}
47 changes: 47 additions & 0 deletions docs/01-install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Installation

## Debian

If you're using a debian based distro then you can just use the installer
script:

```sh
curl -s https://raw.githubusercontent.com/sbs20/scanservjs/master/bootstrap.sh | sudo bash -s -- -v latest
```

If you wish to install a specific version then you can do so:

```sh
curl -s https://raw.githubusercontent.com/sbs20/scanservjs/master/bootstrap.sh | sudo bash -s -- -v v2.23.0
```

Since v3.0.0, the oneline install is actually just downloading a `.deb` file.
You can do this yourself from the releases and then install it:
`sudo apt-get install ./scanservjs_3.0.0-1.deb`

## Arch

If you're using Arch, then [@dadosch](https://github.com/dadosch) created a
PKGBUILD script in [Arch's AUR](https://aur.archlinux.org/packages/scanservjs)
which allows Arch-distro-based users to quickly install and update scanservjs
with any AUR helper, for example: `yay -S scanservjs`. See
[package](https://aur.archlinux.org/packages/scanservjs/) for more.

## Other distros

If you're using another distro, then for the time being you either need to
manually run the steps in the install script or use docker.

## Uninstall

```sh
# Debian
sudo apt-get remove scanservjs

# Arch
sudo yay -R scanservjs
```

Note: For Debian pre `v3.0.0` use the old installer with the `-u` switch:
`sudo /var/www/scanservjs/installer.sh -u`. If you have installed `v3.0.0` then
this *may* interfere.
Loading