-
Notifications
You must be signed in to change notification settings - Fork 10
videos: add model and rules for digitized records #399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
zzacharo
merged 2 commits into
CERNDocumentServer:master
from
zubeydecivelek:digitized-metadata
Apr 2, 2026
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
68 changes: 68 additions & 0 deletions
68
cds_migrator_kit/videos/weblecture_migration/transform/models/digitized_video_lecture.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # -*- coding: utf-8 -*- | ||
| # | ||
| # This file is part of CERN Document Server. | ||
| # Copyright (C) 2026 CERN. | ||
| # | ||
| # Invenio is free software; you can redistribute it and/or | ||
| # modify it under the terms of the GNU General Public License as | ||
| # published by the Free Software Foundation; either version 2 of the | ||
| # License, or (at your option) any later version. | ||
|
|
||
|
|
||
| """CDS-Videos Digitized Video Lecture model.""" | ||
|
|
||
| from cds_migrator_kit.transform.overdo import CdsOverdo | ||
|
|
||
| from .video_lecture import model as video_lecture_model | ||
|
|
||
|
|
||
| class DigitizedVideoLecture(CdsOverdo): | ||
| """Translation Index for CERN Digitized Video Lectures.""" | ||
|
|
||
| __query__ = "8567_.x:'Absolute master path' 8567_.d:/mnt/master_share* -980__.C:MIGRATED -980__.c:DELETED 5831_.a:digitized" | ||
|
|
||
| __ignore_keys__ = { | ||
| "0248_a", # oai identifier | ||
| "0248_p", # oai identifier | ||
| "0248_q", # oai | ||
| "100__0", # Author id (eg: AUTHOR|(CDS)2067852) | ||
| "111__z", # End date (indico) | ||
| "250__a", # Edition | ||
| "337__a", # Checked values only `Video` | ||
| "511__0", # Author id (eg: AUTHOR|(CDS)2067852) | ||
| "5111_8", # Video id for performer, multi video records. | ||
| "518__l", # Lectures: length of speech | ||
| "518__h", # Lectures: Starting time | ||
| "700__0", # Author id (eg: AUTHOR|(CDS)2067852) | ||
| "518__e", # Speaker (1 record has contributor in 518, it's also in 5111) | ||
| "8564_8", # File: bibdoc id | ||
| "8564_s", # File: file size | ||
| "916__y", # Status week year | ||
| "960__a", # Base number | ||
| # CDS modification tag | ||
| "961__h", | ||
| "961__l", | ||
| } | ||
|
|
||
| _default_fields = { | ||
| "language": "", | ||
| "description": "", | ||
| "performer": "", | ||
| "url_files": [], | ||
| "curated_copyright": {}, | ||
| "lecture_infos": [], | ||
| "_curation": { | ||
| "preservation_values": [], | ||
| }, | ||
| "contributors": [], | ||
| "alternate_identifiers": [], | ||
| "additional_languages": [], | ||
| "collections": [], | ||
| "keywords": [], | ||
| } | ||
|
|
||
|
|
||
| model = DigitizedVideoLecture( | ||
| bases=(video_lecture_model,), | ||
| entry_point_group="cds_migrator_kit.videos.rules.digitized_video_lecture", | ||
| ) |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is the value of this dict used?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These values are checked to match with correct video and this is just logging them if any of them matched with video. And if any of these keys are in
curationthen we try to match valuesThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unmatched values are kept in curation