README.md 4.26 KB
Newer Older
David Trattnig's avatar
David Trattnig committed
1

2
# Engine Clock
David Trattnig's avatar
David Trattnig committed
3

4
<!-- TOC -->
David Trattnig's avatar
David Trattnig committed
5

6
7
- [Engine Clock](#engine-clock)
    - [Customization](#customization)
8
9
        - [Configure using a `dotenv` file](#configure-using-a-dotenv-file)
        - [Configure the Web Component](#configure-the-web-component)
10
11
12
13
14
    - [Build and deploy for production](#build-and-deploy-for-production)
    - [Development](#development)
        - [Requirements](#requirements)
        - [Getting started](#getting-started)
- [About](#about)
David Trattnig's avatar
David Trattnig committed
15

16
<!-- /TOC -->
David Trattnig's avatar
David Trattnig committed
17

18
Aura Engine Clock is a web application for displaying the studio clock of the [Aura Radio Software Suite](https://gitlab.servus.at/aura/meta).
David Trattnig's avatar
David Trattnig committed
19

20
## Customization
David Trattnig's avatar
David Trattnig committed
21

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
The project allows to be configured in two ways:

- During build-time using `.env` configuration
- During run-time by modifying the attributes of the Web Component.

### Configure using a `dotenv` file

Copy `config/default-sample.env` to `.env` in the project root and modify the given properties.
In order to apply these configuration changes a build is required.

```ini
NAME="Studio Clock"
LOGO="https://gitlab.servus.at/aura/meta/-/raw/master/images/aura-logo.png"
LOGO_SIZE="100px" 
API_URL="http://localhost:8008/api/v1/"
UNKNOWN_TITLE="Unknown Title"
NO_CURRENT_SCHEDULE="Right now, there's no show playing"
NO_NEXT_SCHEDULE="Nothing scheduled next"
PLAY_OFFSET=3
CSS=""
```

### Configure the Web Component

Modify the `index.html` created by the build process (see next step). Using this approach you are
able to override any configurations already performed during the build.

```html
<aura-clock
    name="Orange O94"
    logo="https://o94.at/themes/custom/radio_orange/logo1.png"
    logosize="180px" 
    api="http://localhost:8008/api/v1/"
    css="/sample/o94.css"
    unknowntitle="Unbekannter Titel"
    nocurrentschedule="Derzeit keine Sendung"
    nonextschedule="Keine weiteren Sendungen"
    playoffset=3>
</aura-clock>
```

63
## Build and deploy for production
David Trattnig's avatar
David Trattnig committed
64

65
Build the bundle for deployment
David Trattnig's avatar
David Trattnig committed
66
67

```bash
68
./run.sh build
David Trattnig's avatar
David Trattnig committed
69
70
```

71
72
Copy the bundle files in `public/build/` to some web server.

73
## Development
David Trattnig's avatar
David Trattnig committed
74

75
### Requirements
David Trattnig's avatar
David Trattnig committed
76

77
* [Node.js](https://nodejs.org)
David Trattnig's avatar
David Trattnig committed
78

79
### Getting started
David Trattnig's avatar
David Trattnig committed
80

81
Install the NPM requirements
David Trattnig's avatar
David Trattnig committed
82
83

```bash
84
npm install
David Trattnig's avatar
David Trattnig committed
85
86
```

87
Then start the development server using [Rollup](https://rollupjs.org)
David Trattnig's avatar
David Trattnig committed
88
89

```bash
90
./run.sh
David Trattnig's avatar
David Trattnig committed
91
```
David Trattnig's avatar
David Trattnig committed
92

93
94
Navigate to [localhost:5000](http://localhost:5000). You should see your app running. Edit a component file in `src`, 
save it, and reload the page to see your changes.
David Trattnig's avatar
David Trattnig committed
95

96
97
By default, the server will only respond to requests from localhost. To allow connections from other computers, 
edit the `sirv` commands in package.json to include the option `--host 0.0.0.0`.
David Trattnig's avatar
David Trattnig committed
98
99
100
101
102
103
104
105
106
107
108
109
110
111

# About

Aura Engine Clock is a web application for displaying the studio clock of the [Aura Radio Software Suite](https://gitlab.servus.at/aura/meta).

This project is based on [Svelte](https://svelte.dev/).

[<img src="https://gitlab.servus.at/autoradio/meta/-/raw/master/images/aura-logo.png" width="150" />](https://gitlab.servus.at/aura/meta)

AURA stands for Automated Radio and is a swiss army knife for community radio stations. Beside the Engine it provides Steering (Admin Interface for the radio station), Dashboard (Collaborative scheduling and programme coordination), Tank (Audio uploading, pre-processing and delivery). Read more in the [Aura Meta](https://gitlab.servus.at/aura/meta) repository or on the specific project pages.

| [<img src="https://gitlab.servus.at/aura/meta/-/raw/master/images/aura-steering.png" width="150" align="left" />](https://gitlab.servus.at/aura/steering)  |  [<img src="https://gitlab.servus.at/aura/meta/-/raw/master/images/aura-dashboard.png" width="150" align="left" />](https://gitlab.servus.at/aura/dashboard)  |  [<img src="https://gitlab.servus.at/aura/meta/-/raw/master/images/aura-tank.png" width="150" align="left" />](https://gitlab.servus.at/aura/tank) | [<img src="https://gitlab.servus.at/aura/meta/-/raw/master/images/aura-engine.png" width="150" align="left" />](https://gitlab.servus.at/aura/engine)  |
|---|---|---|---|
| [Steering](https://gitlab.servus.at/aura/steering)  | [Dashboard](https://gitlab.servus.at/aura/dashboard)  | [Tank](https://gitlab.servus.at/aura/tank)  | [Engine](https://gitlab.servus.at/aura/engine)<br/>[Engine API](https://gitlab.servus.at/aura/engine-api)<br/>[Engine Clock](https://gitlab.servus.at/aura/engine-clock)  |