This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from invenio_db import db | |
from invenio_files_rest.models import as_object_version | |
from cds.modules.records.api import CDSRecord, CDSVideosFilesIterator | |
from cds.modules.deposit.api import CDSDeposit | |
from invenio_records.models import RecordMetadata | |
def _rename_subtitles(record): | |
"""Rename subtitles.""" | |
# Pattern to extract subtitle's filename and iso language |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import reduce | |
from invenio_db import db | |
from invenio_pidstore.models import PersistentIdentifier | |
from invenio_search import current_search | |
from invenio_search.utils import schema_to_index | |
from cds.modules.records.api import CDSRecord | |
from cds.modules.deposit.api import Project, Video | |
from cds.modules.fixtures.cli import _load_json_source | |
from cds.modules.deposit.resolver import get_video_pid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from invenio_db import db | |
from invenio_workflows import workflow_object_class | |
from invenio_workflows.models import ObjectStatus | |
from flask import current_app | |
from flask_sqlalchemy import SQLAlchemy | |
def update_workflow(): | |
query_ses = SQLAlchemy(current_app).session |