2021-10-01 10:29:16 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# -------------------------------------------------------------------------
|
|
|
|
# This is a sample controller
|
|
|
|
# this file is released under public domain and you can use without limitations
|
|
|
|
# -------------------------------------------------------------------------
|
|
|
|
|
2021-10-08 15:18:30 +02:00
|
|
|
#from transcription_tools import create_vtt
|
|
|
|
transcription_tools = local_import('transcription_tools', reload=True)
|
|
|
|
|
2021-10-01 10:29:16 +02:00
|
|
|
# ---- example index page ----
|
|
|
|
def index():
|
2021-10-08 15:18:30 +02:00
|
|
|
media_files = db().select(db.media_file.ALL, orderby=db.media_file.title)
|
|
|
|
return dict(media_files=media_files)
|
2021-10-08 09:44:50 +02:00
|
|
|
|
2021-10-08 15:18:30 +02:00
|
|
|
@auth.requires_membership('manager')
|
|
|
|
def manage():
|
|
|
|
grid = SQLFORM.smartgrid(db.media_file, linked_tables=['post'])
|
2021-10-08 09:44:50 +02:00
|
|
|
return dict(grid=grid)
|
2021-10-01 10:29:16 +02:00
|
|
|
|
2021-10-08 15:18:30 +02:00
|
|
|
def vtt():
|
2021-10-08 15:39:51 +02:00
|
|
|
video_path = '/home/mschmidt/Videos/100-Meinungen-Video-erstellen.mp4'
|
|
|
|
model_path = 'applications/transcription/private/model'
|
|
|
|
return dict(message=transcription_tools.create_vtt(model_path, video_path))
|
|
|
|
|
2021-10-01 10:29:16 +02:00
|
|
|
|
|
|
|
def user():
|
2021-10-08 15:18:30 +02:00
|
|
|
return dict(form=auth())
|