Skip to content

Commit

Permalink
Added more clarification & localized css & js.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-primo committed Jun 13, 2023
1 parent ed99fdf commit f1eb3a4
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 5 deletions.
36 changes: 36 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,20 @@

## Pre-Installation

### With Docker

1. You should have [Docker](https://docs.docker.com/engine/install/) installed.
2. You should have [tesseract-server](https://github.com/hertzg/tesseract-server) up and running.

### Without Docker

1. You should have [php](https://www.php.net/) (tested with php 7.3, php 7.4, php 8.0 & php 8.1).
2. You should have [tesseract-server](https://github.com/hertzg/tesseract-server) up and running.

## Installation

### Docker Method

1. Clone this repository:

```bash
Expand Down Expand Up @@ -68,3 +77,30 @@
define('CFG', $config);
?>
```

### Non-Docker Method

1. Clone this repository:

```bash
git clone https://github.com/m-primo/tesseract-server-ui.git
```

2. Edit `config.php` to match the tesseract server host & port. The final `config.php` should like this:

```php
<?php
$config = [
'url' => 'http://127.0.0.1:8884',
'timeout' => 0, // 0 to disable
];
define('CFG', $config);
?>
```

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):

```bash
php -S <host>:<port> -t ./app
```
2 changes: 1 addition & 1 deletion app/config/config.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
$config = [
'url' => 'http://172.18.0.2:8884',
'url' => 'http://172.18.0.2:8884', // tesseract server host & port
'timeout' => 0, // 0 to disable
];

Expand Down
8 changes: 4 additions & 4 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>tesseract-server-ui</title>
<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">
<link href="vendor/[email protected]" rel="stylesheet">
</head>
<body>
<div class="container my-5" id="root">
<h1>Tesseract Server User Interface (V1.1)</h1>
<h1>Tesseract Server User Interface (V1.2)</h1>

<form enctype="multipart/form-data" @submit.prevent="submitForm">
<div class="mb-3">
Expand Down Expand Up @@ -44,8 +44,8 @@ <h1>Tesseract Server User Interface (V1.1)</h1>
<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>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]-alpha3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.min.js"></script>
<script src="vendor/[email protected]"></script>
<script src="vendor/[email protected]"></script>
<script>
new Vue({
el: '#root',
Expand Down
6 changes: 6 additions & 0 deletions app/vendor/[email protected]

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions app/vendor/[email protected]

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions app/vendor/[email protected]

Large diffs are not rendered by default.

0 comments on commit f1eb3a4

Please sign in to comment.