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

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

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

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

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

David Trattnig's avatar
David Trattnig committed
18
Aura Dashboard 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
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"
David Trattnig's avatar
David Trattnig committed
35
LOGO_SIZE="100px"
36
37
API_URL="http://localhost:8008/api/v1/"
UNKNOWN_TITLE="Unknown Title"
38
39
NO_CURRENT_TIMESLOT="Right now, there's no show playing"
NO_NEXT_TIMESLOT="Nothing scheduled next"
40
41
42
43
44
45
46
47
48
49
50
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
David Trattnig's avatar
David Trattnig committed
51
    name="Orange o94"
52
    logo="https://o94.at/themes/custom/radio_orange/logo1.png"
David Trattnig's avatar
David Trattnig committed
53
    logosize="180px"
54
    api="http://localhost:8008/api/v1/"
David Trattnig's avatar
David Trattnig committed
55
    css="/css/o94.css"
56
    unknowntitle="Unbekannter Titel"
57
58
    nocurrenttimeslot="Derzeit keine Sendung"
    nonexttimeslot="Keine weiteren Sendungen"
59
60
61
62
    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
```

David Trattnig's avatar
David Trattnig committed
71
Copy the bundle files in `public/build/` to some web server accessible by your studio computers.
72

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

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

David Trattnig's avatar
David Trattnig committed
96
By default, the server will only respond to requests from localhost. To allow connections from other computers,
97
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

# About

David Trattnig's avatar
David Trattnig committed
101
Aura Dashboard 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
102
103
104
105
106
107
108
109
110

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)  |
|---|---|---|---|
David Trattnig's avatar
David Trattnig committed
111
| [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/>[Dashboard Clock](https://gitlab.servus.at/aura/dashboard-clock)  |