170 lines
11 KiB
HTML
170 lines
11 KiB
HTML
|
<!DOCTYPE html>
|
|||
|
<html lang="en">
|
|||
|
<head>
|
|||
|
<title>{% block title %}rsnaps{% endblock %}</title>
|
|||
|
<meta name="generator" content="aiohttp" />
|
|||
|
<meta name="title" content="rsnaps" />
|
|||
|
<meta name="description" content="Capture tool for scans and photos." />
|
|||
|
<meta name="revisit-after" content="3600" />
|
|||
|
<meta name="language" content="EN" />
|
|||
|
<meta name="robots" content="noindex" />
|
|||
|
<meta http-equiv="x-dns-prefetch-control" content="off" />
|
|||
|
<link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
|
|||
|
<link href="/static/css/base.css" rel="stylesheet" type="text/css" />
|
|||
|
{% block stylesheets %}{% endblock %}
|
|||
|
{% block head %}{% endblock %}
|
|||
|
</head>
|
|||
|
<body class="d-flex bg-white body">
|
|||
|
{% block page %}
|
|||
|
<div id="page" class="d-flex flex-row page">
|
|||
|
<div class="d-flex flex-column justify-content-start bg-light border-right border-dark">
|
|||
|
<a href="/">
|
|||
|
<header class="d-flex flex-row bg-dark p-2">
|
|||
|
<span class="text-white "><h1 class="text-info fw-bold">rsnaps</h1></span>
|
|||
|
</header>
|
|||
|
</a>
|
|||
|
<div class="d-flex flex-row">
|
|||
|
<form id="settings" method="POST" action="/detect">
|
|||
|
<div class="p-2 pe-0">
|
|||
|
<button class="btn btn-sm btn-secondary" type="submit"><strong>Detect devices</strong></button>
|
|||
|
</div>
|
|||
|
</form>
|
|||
|
<form id="device" method="POST" action="/device">
|
|||
|
<div class="p-2">
|
|||
|
<select id="device" name="device_id" class="form-select form-select-sm w-auto" aria-label="Choose device" onchange="submit()">
|
|||
|
<option value="">–Device–</option>
|
|||
|
{% for device in devices %}
|
|||
|
<option value="{{ device[0] }}"{% if device[0] == device_id %} selected{% endif %}>{{ device[2] }}</option>
|
|||
|
{% endfor %}
|
|||
|
</select>
|
|||
|
</div>
|
|||
|
</form>
|
|||
|
</div>
|
|||
|
<form id="collection_choice" method="POST" action="/collection">
|
|||
|
<div class="d-flex flex-row p-2 pt-0">
|
|||
|
<select id="collection_choice" name="collection_choice" class="form-select form-select-sm" aria-label="Choose collection" onchange="submit()">
|
|||
|
{% for coll in collection_choices %}
|
|||
|
<option value="{{ coll }}"{% if collection_choice == coll %} selected{% endif %}>{{ coll }}</option>
|
|||
|
{% endfor %}
|
|||
|
</select>
|
|||
|
</div>
|
|||
|
</form>
|
|||
|
<form id="collection_delete" method="POST" action="/collection/delete">
|
|||
|
<div class="d-flex flex-row p-2 pt-0">
|
|||
|
<input type="hidden" name="collection_choice" value="{{ collection_choice }}">
|
|||
|
<button class="btn btn-sm btn-danger" type="submit"><strong>DELETE</strong></button>
|
|||
|
</div>
|
|||
|
</form>
|
|||
|
{% if device_id %}
|
|||
|
<form id="snap" method="POST" action="/snap">
|
|||
|
<input type="hidden" name="device_id" value="{{ device_id }}">
|
|||
|
<div class="ms-2 me-2 mb-2">
|
|||
|
<span><strong>Settings</strong> for next snaps ⓘ</span>
|
|||
|
<div class="card">
|
|||
|
<div class="card-body p-2 pe-2">
|
|||
|
<div class="mt-0">
|
|||
|
<span data-bs-toggle="tooltip" data-bs-placement="right" title="Name of collection"><strong>Start new collection</strong> ⓘ</span><br>
|
|||
|
<input class="form-control w-100" id="collection_new" name="collection_new" type="text" value="{{ collection_new }}" placeholder="Path/to/Coll A/part 1">
|
|||
|
</div>
|
|||
|
<!-- <div class="mt-2">
|
|||
|
<span data-bs-toggle="tooltip" data-bs-placement="right" title="Free annotation text (optional, short)"><strong>Collection description</strong> ⓘ</span><br>
|
|||
|
<input class="form-control w-auto" id="collection_description" name="collection_description" type="text" value="{{ collection_description }}" placeholder="short description of collection">
|
|||
|
</div>
|
|||
|
-->
|
|||
|
<div class="d-flex flex-row p-2 ps-0 pe-0">
|
|||
|
<select id="paper_size" name="paper_size" class="form-select form-select-sm w-100" aria-label="Paper size">
|
|||
|
{% for p_s in paper_sizes %}
|
|||
|
<option value="{{ p_s }}"{% if p_s == paper_size %} selected{% endif %}>{{ p_s }}</option>
|
|||
|
{% endfor %}
|
|||
|
</select>
|
|||
|
</div>
|
|||
|
<div class="d-flex flex-row">
|
|||
|
<div>
|
|||
|
<span data-bs-toggle="tooltip" data-bs-placement="right" title="For colored originals use Color"><strong>Mode</strong> ⓘ</span><br>
|
|||
|
{% for mode_ in modes %}
|
|||
|
<input class="form-check-input" type="radio" name="mode" id="mode_{{ mode_ }}" value="{{ mode_ }}"{% if mode == mode_ %} checked{% endif %}>
|
|||
|
<label class="form-check-label" for="mode_{{ mode_ }}">{{ mode_ }}</label><br>
|
|||
|
{% endfor %}
|
|||
|
</div>
|
|||
|
<div class="ps-4">
|
|||
|
<span data-bs-toggle="tooltip" data-bs-placement="right" title="Image resolution in dpi"><strong>Resolution</strong> ⓘ</span><br>
|
|||
|
{% for resolution_ in resolutions %}
|
|||
|
<input class="form-check-input" type="radio" name="resolution" id="resolution_{{ resolution_ }}" value="{{ resolution_ }}"{% if resolution == resolution_ %} checked{% endif %}>
|
|||
|
<label class="form-check-label" for="resolution_{{ resolution_ }}">{{ resolution_ }}</label><br>
|
|||
|
{% endfor %}
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="mt-2">
|
|||
|
<span data-bs-toggle="tooltip" data-bs-placement="right" title="Use this page number for the next snap (e.g. 32 for page 0032x.png)"><strong>Next (duplex) page number</strong> ⓘ</span><br>
|
|||
|
<input class="form-control w-auto" id="dpage_number" name="dpage_number" type="text" value="{{ dpage_number }}" placeholder="use next" size="4">
|
|||
|
</div>
|
|||
|
<div class="mt-2">
|
|||
|
<span data-bs-toggle="tooltip" data-bs-placement="right" title="File name target"><strong>Target</strong> (if not duplex) ⓘ</span><br>
|
|||
|
<input class="form-check-input" type="radio" name="target" id="target_a" value="a"{% if target == 'a' %} checked{% endif %}>
|
|||
|
<label class="form-check-label" for="target_a"><strong>a</strong> (front pages)<br>increase page number by 1</label><br>
|
|||
|
<input class="form-check-input" type="radio" name="target" id="target_b" value="b"{% if target == 'b' %} checked{% endif %}>
|
|||
|
<label class="form-check-label" for="target_b"><strong>b</strong> (back pages)<br>decrease page number by 1</label>
|
|||
|
</div>
|
|||
|
<div>Existing images will be overwritten!</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</form>
|
|||
|
{% endif %}
|
|||
|
</div>
|
|||
|
<div class="d-flex flex-grow-1 flex-column">
|
|||
|
<div class="d-flex flex-column flex-wrap p-2 bg-white">
|
|||
|
<div class="snaps overflow-auto">
|
|||
|
<div class="d-flex flex-wrap">
|
|||
|
{% for name in images %}
|
|||
|
<div class"snap-img">
|
|||
|
<a href="/image/{{ name }}"><img class="snap-img m-2 mb-0" src="/image-small/{{ name }}"></a>
|
|||
|
<div class="d-flex ps-2 pe-2"><small><strong>{{ name }}</strong>
|
|||
|
{% if mode == 'Color' %}<span class="bg-danger"> </span> <span class="bg-success"> </span> <span class="bg-primary"> </span>{% else %}<span class="bg-dark"> </span> <span class="bg-secondary"> </span> <span class="bg-white"> </span>{% endif %}
|
|||
|
<strong>{{ resolution }}</strong>dpi</small><div class="ms-auto"><form id="image_delete_{{ name }}" method="POST" action="/image-delete/{{ name }}"><button type="submit" class="form-control btn btn-sm p-0 m-0">❌</button></form></div></div>
|
|||
|
</div>
|
|||
|
{% endfor %}
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="d-flex flex-row justify-content-between bg-light h-100 border-top border-dark">
|
|||
|
{% if device_id %}
|
|||
|
{% for source_ in sources %}
|
|||
|
<button form="snap" class="btn btn-success me-1 rounded-0" type="submit" name="snap" value="{{ source_ }}"><span class="fs-2 fw-bold p-0 m-0">{% if source_ == 'Automatic Document Feeder' %}ADF{% else %}{{ source_ }}{% endif %}</span></button>
|
|||
|
{% endfor %}
|
|||
|
<div id="page-ops" class="d-flex flex-row">
|
|||
|
<div class="d-flex flex-column justify-content-center">
|
|||
|
<div id="page-ops-input" class="d-flex flex-row justify-content-between">
|
|||
|
<input form="pages" class="form-control w-auto h-auto" type="text" name="pages" placeholder="pages, e.g. 5a-10a,12,14-16">
|
|||
|
<div class="align-self-center ps-2 pe-2">
|
|||
|
<input form="pages" class="form-check-input" type="checkbox" id="lossy" name="lossy" value="lossy">
|
|||
|
<label class="form-check-label" for="lossy"> Lossy</label>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div id="page-ops-buttons" class="d-flex flex-row justify-content-between">
|
|||
|
<button form="pages" class="btn btn-secondary btn-sm" type="submit" name="operation" value="rotate180"><big><strong>Rotate pages 180°</strong></big></button>
|
|||
|
<button form="pages" class="btn btn-danger btn-sm ms-1" type="submit" name="operation" value="delete"><big><strong>Delete pages</strong></big></button>
|
|||
|
<button form="pages" class="btn btn-secondary btn-sm ms-1" type="submit" name="operation" value="pdf"><big><strong>Create PDF</strong></big></button>
|
|||
|
<button form="pages" class="btn btn-secondary btn-sm ms-1" type="submit" name="operation" value="pdf_ocr"><big><strong>PDF+OCR</strong></big></button>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
{% endif %}
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
{% endblock %}
|
|||
|
<form id="pages" method="POST" action="/pages-operation"></form>
|
|||
|
<script src="/static/jquery/jquery.min.js"></script>
|
|||
|
<script src="/static/popper/popper.min.js"></script>
|
|||
|
<script src="/static/bootstrap/js/bootstrap.min.js"></script>
|
|||
|
<script>
|
|||
|
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
|
|||
|
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
|
|||
|
return new bootstrap.Tooltip(tooltipTriggerEl)
|
|||
|
});
|
|||
|
</script>
|
|||
|
{% block scripts %}{% endblock %}
|
|||
|
</body>
|
|||
|
</html>
|