Skip to content

Commit f1eb3a4

Browse files
committed
Added more clarification & localized css & js.
1 parent ed99fdf commit f1eb3a4

File tree

6 files changed

+58
-5
lines changed

6 files changed

+58
-5
lines changed

README.MD

+36
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,20 @@
44

55
## Pre-Installation
66

7+
### With Docker
8+
79
1. You should have [Docker](https://docs.docker.com/engine/install/) installed.
810
2. You should have [tesseract-server](https://github.com/hertzg/tesseract-server) up and running.
911

12+
### Without Docker
13+
14+
1. You should have [php](https://www.php.net/) (tested with php 7.3, php 7.4, php 8.0 & php 8.1).
15+
2. You should have [tesseract-server](https://github.com/hertzg/tesseract-server) up and running.
16+
1017
## Installation
1118

19+
### Docker Method
20+
1221
1. Clone this repository:
1322

1423
```bash
@@ -68,3 +77,30 @@
6877
define('CFG', $config);
6978
?>
7079
```
80+
81+
### Non-Docker Method
82+
83+
1. Clone this repository:
84+
85+
```bash
86+
git clone https://github.com/m-primo/tesseract-server-ui.git
87+
```
88+
89+
2. Edit `config.php` to match the tesseract server host & port. The final `config.php` should like this:
90+
91+
```php
92+
<?php
93+
$config = [
94+
'url' => 'http://127.0.0.1:8884',
95+
'timeout' => 0, // 0 to disable
96+
];
97+
98+
define('CFG', $config);
99+
?>
100+
```
101+
102+
3. Run the web ui with the PHP built-in development server (replace `<host>` with destination host -usually 127.0.0.1 or 0.0.0.0-, and `<port>` with any port you want):
103+
104+
```bash
105+
php -S <host>:<port> -t ./app
106+
```

app/config/config.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
$config = [
3-
'url' => 'http://172.18.0.2:8884',
3+
'url' => 'http://172.18.0.2:8884', // tesseract server host & port
44
'timeout' => 0, // 0 to disable
55
];
66

app/index.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>tesseract-server-ui</title>
7-
<link href="https://cdn.jsdelivr.net/npm/[email protected]-alpha3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
7+
<link href="vendor/[email protected]" rel="stylesheet">
88
</head>
99
<body>
1010
<div class="container my-5" id="root">
11-
<h1>Tesseract Server User Interface (V1.1)</h1>
11+
<h1>Tesseract Server User Interface (V1.2)</h1>
1212

1313
<form enctype="multipart/form-data" @submit.prevent="submitForm">
1414
<div class="mb-3">
@@ -44,8 +44,8 @@ <h1>Tesseract Server User Interface (V1.1)</h1>
4444
<div class="alert mt-3 text-break" style="white-space: break-spaces" v-if="result.stderr" :class="[result.stderr.toLowerCase().includes('warning: ') ? 'alert-warning' : 'alert-danger']" v-html="result.stderr"></div>
4545
</div>
4646
</div>
47-
<script src="https://cdn.jsdelivr.net/npm/[email protected]-alpha3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" crossorigin="anonymous"></script>
48-
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.min.js"></script>
47+
<script src="vendor/[email protected]"></script>
48+
<script src="vendor/[email protected]"></script>
4949
<script>
5050
new Vue({
5151
el: '#root',

app/vendor/[email protected]

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/vendor/[email protected]

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/vendor/[email protected]

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)