blob: d7683555593de46c8808c36d50be81c9e8090f91 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
# Animism
Align a text to an audio file.
## Installation
First, install miniconda and node.
```
conda create env -f environment.yml
npm install
```
## Generating waveform peaks
Make sure your source sound is encoded as a 192 kbps CBR MP3 (for accurate time sync), then generate the peaks:
```
ffmpeg -i original.wav -ar 44100 -b:a 192k ../data_store/peaks/episode_99.mp3
./cli.py peaks parse -i original.wav
```
## Running the site
Before running the commands, enter the client directory, load the Conda environment, and make sure the database is current:
```
cd cli
conda activate animism
./cli.py db upgrade head
```
Then build the frontend and run the Flask server:
```
npm run build
./cli.py flask run
```
The server will be running on http://0.0.0.0:5000/
## Development
Monitor the Javascript for changes (run in another window):
```
npm run watch
```
Generate a new migration if you've modified the database:
```
./cli.py db revision --autogenerate -m 'describe the changes'
./cli.py db upgrade head
```
## Export
For production, export a static version of the episode. This will make an exported folder in `data_store/exports/` which you can zip and upload somewhere.
```
./cli.py site export -o animism
./cli.py viewer run
```
* The viewer will be running on e.g. http://0.0.0.0:5000/episode1/index.html
* Currently no `index.html` resolution is performed.
* For now, the site structure entails:
```
/index.html # redirects to first episode
/episode1/index.html # episode player
/episode1/media/... # all episode media copied here
/static/ # non-site-media, fonts, etc
```
Watch the production JS:
```
NODE_ENV=production node ./node_modules/webpack-cli/bin/cli.js --config ./webpack.config.site.js -o /Users/user/work/animism/animism-align/data_store/exports/animism/episode1/bundle.js --watch
```
## History
- 2020.05 - Received designs from Other Means
- 2020.06 - Development begins
- 2020.10 - Audio re-recorded
- 2020.11 - Site launches with Episode 1
|