Skip to content

support for arbitrary URI schemes in clams source #162

Description

@keighrim

New Feature Summary

As a user, I would like to a convenient way to generate a "source" MMIF with document location URI with some arbitrary scheme other than file://, using clams source command.

Current clams source command is only able to generate documents with file:// locations, so this will be upgrading the feature so that it can generate any location value, with associated document type, but keeping the default behavior as using file:// schema. Here's an example of current behavior

$ clams source video:/data/video.mp4
{
"metadata": {
"mmif": "http://mmif.clams.ai/1.0.0"
},
"documents": [
{
"@type": "http://mmif.clams.ai/vocabulary/VideoDocument/v1",
"properties": {
"mime": "video",
"id": "d1",
"location": "file:///data/video.mp4"
}
}
],
"views": []

And I guess we can add one more CLI argument to make it work like this

$ clams source video:something.something.video --scheme baapb
{
"metadata": {
"mmif": "http://mmif.clams.ai/1.0.0"
},
"documents": [
{
"@type": "http://mmif.clams.ai/vocabulary/VideoDocument/v1",
"properties": {
"mime": "video",
"id": "d1",
"location": "baapb://something.something.video"
}
}
],
"views": []

The source code for the clams source cmd is at

https://github.com/clamsproject/clams-python/blob/a7ce71bae59d2e359cb6d2a14e558638778dd51f/clams/source/__init__.py

Related

clamsproject/mmif-python#222
also, https://github.com/clamsproject/mmif-docloc-baapb

Alternatives

No response

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✨NNew feature or request

    Type

    No type

    Projects

    • Status
      Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions