Skip to main content
screenjson convert can write its output to a database or object store in the same invocation that produces the ScreenJSON document.

Databases

Selectable via --db

TypeNotes
mongodbDocument store. Uses the ScreenJSON id as _id.
elasticsearchIndexed per --db-collection.
cassandraTable per --db-collection.
dynamodbRegion from --blob-region or SCREENJSON_BLOB_REGION. Item-size limit applies.
redisKey-value store. Document stored as a serialised string.

Shared flags

FlagEnvironmentDescription
--db <type>SCREENJSON_DB_TYPEBackend selector.
--db-host <host>SCREENJSON_DB_HOSTHost / connection string.
--db-port <port>SCREENJSON_DB_PORTPort.
--db-user <user>SCREENJSON_DB_USERUsername.
--db-pass <pass>SCREENJSON_DB_PASSPassword.
--db-collection <name>SCREENJSON_DB_COLLECTIONCollection / index / table.
SCREENJSON_DB_AUTH_TYPEbasic · apikey · token.
SCREENJSON_DB_APIKEYAPI key.
SCREENJSON_DB_INDEXElasticsearch index name.
SCREENJSON_DB_REGIONDynamoDB region.

Example

screenjson convert -i script.fdx \
  --db mongodb \
  --db-host mongodb://localhost:27017 \
  --db-collection screenplays

Blob storage

Selectable via --blob

TypeNotes
s3AWS Simple Storage Service.
azureAzure Blob Storage.
minioSelf-hosted, S3-compatible. Requires --blob-endpoint.

Shared flags

FlagEnvironmentDescription
--blob <type>SCREENJSON_BLOB_TYPEBackend selector.
--blob-bucket <name>SCREENJSON_BLOB_BUCKETBucket name.
--blob-key <path>SCREENJSON_BLOB_KEYObject key. Defaults to <document-id>.<json|yaml>.
--blob-region <region>SCREENJSON_BLOB_REGIONAWS region.
--blob-endpoint <url>SCREENJSON_BLOB_ENDPOINTCustom endpoint (MinIO, localstack).
SCREENJSON_AWS_ACCESS_KEYAWS access key ID.
SCREENJSON_AWS_SECRET_KEYAWS secret access key.

Examples

# S3 bucket
screenjson convert -i script.fdx \
  --blob s3 \
  --blob-bucket my-bucket \
  --blob-region us-west-2

# MinIO
screenjson convert -i script.fdx \
  --blob minio \
  --blob-bucket screenplays \
  --blob-endpoint http://minio:9000

# Azure
screenjson convert -i script.fdx \
  --blob azure \
  --blob-bucket screenplays

Combining outputs

convert can emit to a file, a database, and a blob in the same invocation. All three run after conversion succeeds:
screenjson convert -i script.fdx -o script.json \
  --db mongodb --db-host mongodb://... --db-collection screenplays \
  --blob s3 --blob-bucket archive --blob-region us-west-2