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:31:19 +02:00
|
|
|
return dict(message=transcription_tools.create_vtt(
|
|
|
|
'/home/mschmidt/Videos/100-Meinungen-Video-erstellen.mp4'))
|
2021-10-01 10:29:16 +02:00
|
|
|
|
|
|
|
def user():
|
2021-10-08 15:18:30 +02:00
|
|
|
return dict(form=auth())
|