Copy JSON Data from CueDB (for automation)
JSON (JavaScript Object Notation) is a simple text string format for storing and exchanging data that's easy for both humans and computers to read. It organizes information into key-value pairs (like "cue_number": "1m01"), allowing for the management of various data types such as numbers, words, or even nested lists in a straightforward and accessible way.
Copying Cue Data as JSON
CueDB simplifies the process of copying cue data in JSON format, enabling you to automate workflows, analyze data, or integrate with other applications seamlessly. Here's how you can leverage this feature:
Cue Overview
- Click on any plain text cue cell in the Cue Overview (for example a Cue # cell) or select multiple cues by using the checkboxes.
- Press
Control + Shift + J
on your keyboard. This action copies the cue and current version data into your clipboard in JSON format.
Cue Details
- Open a cue version in the Cue Details view.
- Press
Control + Shift + J
on your keyboard. This action copies the cue and currently viewed version data into your clipboard in JSON format.
When attempting to copy data to the clipboard through a key command, browser restrictions might block the automatic operation, especially if you leave the browser and return (Firefox) or attempt to copy multiple cues simultaneously (Safari), and the API request takes longer. These restrictions ensure that clipboard modifications are short running and directly initiated by user actions, enhancing security and user control.
If such a restriction prevents the automatic copy action, CueDB will display a popup window as a workaround. This window includes a Copy button. You can click this button or press Enter on your keyboard to manually perform the copy operation.
Utilizing the Copied Data
Once you have the JSON data, the possibilities are vast. For instance, you can create variables in Keyboard Maestro for enhanced automation capabilities. To jumpstart your automation projects, we've created a free-to-download Keyboard Maestro macro. Execute the macro from within any of your macros and you will get instant access to the cue data as variables. A simple demo macro to try it out is also available for download.
Examples of macros that you can build:
- Create and locate files and folders on your computer based on production and cue number
- Prep files for writing, orchestration, recording or mixing
- Conform files based on picture changes
- Export masters and stems and name them accordingly
- Navigate to a specific timecode or set selections in your DAW
JSON Data Structure
Below is a comprehensive example of the JSON data structure you can expect:
[ { "sequence_number": 1, "cue_count": 1, "cue_number": "1m01", "title": "Crumbling Convictions", "cue_number_and_title": "1m01 Crumbling Convictions", "cue_number_and_title_with_cue_version": "1m01 Crumbling Convictions (v2.0)", "cue_number_with_production_number": "BH101 1m01", "cue_number_and_title_with_production_number": "BH101 1m01 Crumbling Convictions", "cue_number_and_title_with_cue_version_and_production_number": "BH101 1m01 Crumbling Convictions (v2.0)", "cue_version": "v2.0", "cue_version_without_v_prefix": "2.0", "in": "01:00:00:00", "out": "01:03:00:00", "duration": "3:00", "duration_seconds": 180, "sequencer_start": "", "version_in": "01:00:00:00", "version_out": "01:03:00:00", "version_duration": "3:00", "version_duration_seconds": 180, "version_sequencer_start": "", "start_offset": "00:00:00", "duration_difference": "00:00:00", "status": "Composed", "current_picture": "LOCK", "current_picture_name": "", "current_picture_version": "LOCK", "current_picture_in": "01:00:00:00", "current_picture_out": "01:55:00:00", "current_picture_cue_start_offset": "00:00:00:00", "current_picture_cue_version_start_offset": "00:00:00:00", "written_to_picture": "LOCK", "written_to_picture_name": "", "written_to_picture_version": "LOCK", "written_to_picture_in": "01:00:00:00", "written_to_picture_out": "01:55:00:00", "written_to_picture_cue_start_offset": "00:00:00:00", "written_to_picture_cue_version_start_offset": "00:00:00:00", "frame_rate": "24", "series_title": "Broken Halo", "series_production_number": "BH", "production_number": "BH101", "project_title": "Broken Halo 101", "project_sub_title": "Pilot", "project_title_with_sub_title": "Broken Halo 101 ยท Pilot", "season": "1", "episode_number": "101", "season_and_episode_number": "101", "custom": { "my_field": "My Value" } } ]
Included Fields and Custom Fields
The JSON data structure comprises a predefined set of standard fields, with potential expansion based on future requirements and user feedback. For added flexibility, custom fields can be incorporated into the JSON data by selecting the Include in JSON Data option within the custom field settings.
These custom fields are organized under a dedicated nested JSON level labeled custom, allowing for easy retrieval. For instance, in Keyboard Maestro, access a custom field by prefixing custom. to the field name, such as custom.my_field
Please note that the custom field type tags is not available for inclusion.