-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
65 lines (41 loc) · 1.58 KB
/
README
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
# UBICAST IMPORT FOR ARISTOTE
# REQUIREMENTS
python
## Install python dependencies
```
pip install -r requirements.txt
```
For local development, create a virtual environment and activate it :
```
python3 -m venv env
source env/bin/activate
```
## Copy environments file into local ones
```
cp -f .env.dist .env
```
Change environment variables if necessary, particularly fill AristoteAPI credentials (the API Client) and the end-user-identifier to distingues the enrichment requests coming from this project.
## Copy the Ubicast config file
```
cp -f config.dist.json config.json
```
Fill in API_KEY and CLIENT_ID
# Start server (proxy and webhook)
```
python3 ubicast.py
```
# Start importing videos from a Ubicast channel
```
python3 import_videos --channel <channel_oid> --update <all | stuck | quiz> --debug
```
or you can use a CSV file :
```
python3 import_videos --csv <path/to/csv> --update <all | stuck | quiz>
```
An example CSV file is provided : sample.csv
For the update parameter :
* all : For all videos of the channel(s) provided, request a new enrichment
* stuck : For all videos of the channel(s) provided that are in a stuck state (PENDING, TRANSCRIBED, FAILURE), check status on Aristote :
- if the enrichment is successful : get subtitles and submit them to the Ubicast platform
- if the enrichment has failed or uploading the media is taking too long : request a new enrichment
* quiz : For all videos of the channel(s) provided for which an enrichment has already been requested but have no generated quiz, request a new version on the same enrichment but with quiz