Advanced Topics - cartograforce/tim GitHub Wiki

Settings

The default Settings for TIM are shown in the figure below. All selections pertain to a particular browser application (e.g., Chrome, Firefox, etc.) and persist and between different sessions and tabs in that browser.

Settings screen shot
The default setting on the Settings menu panel in TIM

"Add timecode when copying transcript to Notes"

When this setting is checked, text copied from the transcript panel that is pasted to the TIM Editor “Notes” area will include the starting timecode associated with the text and appear as a general timecode. When the box is unchecked, only the text will be pasted. Note: Text must be in acceptable transcript formats such as WebVTT or SRT with timecodes included.

"Export Notes as Partial Transcript in OHMS XML"

Any text between segment break timecodes (displayed in black, larger bold font) that is not marked down will appear in TIM’s Preview tab in a field labeled "Notes." When this setting is checked and when exporting to OHMS.xml, Notes field contents will be assigned to the corresponding "Partial Transcript" field in OHMS.xml. When unchecked, no data will appear in OHMS.xml Partial Transcript fields. Whether checked or unchecked, Notes field contents will appear in a column/field called “Notes” when exported to a CSV file.

"Add sub-second timecodes"

When this setting is checked, using the timecode shortcut keystroke will generate and display timecodes to the nearest milliseconds [hh:mm:ss.sss]. Note: This feature is untested and under certain conditions does not reflect millisecond precision but rather rounds down to the nearest second.

"Skip forward and back increments (seconds)"

The number entered will be the interval (in seconds) by which the media file will jump forward or backward when using the ctrl + [ and ctrl + ]keystrokes for navigation along the playbar/timeline.

"Interval between timecodes upon multi-timecode insertion (seconds)"

The number entered will be the interval (in seconds) between timecodes when using the multi-timecode feature, i.e., generating 4 nearby timecodes by pressing ctrl + shift + j.

TIM via command line

Local Installation

You can clone a copy of TIM and install and run it locally on a PC or mac using the following tools and instructions through the command line. (PC: run > cmd; Mac: via Terminal app)

Install the following on your computer.

In your command line terminal, navigate to a preferred directory for the local installation of the TIM repository. Use the following commands to install ($ = command line in the current directory, # = comments):

# Clone the TIM repository
$ git clone https://github.com/cartograforce/tim.git 
# Go into the repository (i.e., into the new “tim” folder) 
$ cd tim 
# Install dependencies 
$ npm install--->

Running the application

After following the installation steps above, use the following command to run TIM application locally:

# Within the tim directory, start the application 
$ npm start

This will run the application locally on your computer. Visit http://localhost:3000/ to view it in the browser.

Structure of TIM’s JSON file

The code snippet below displays the structure of the TIM Project JSON, as exported from TIM for the “Interview with Steve Zahn” project. (For reference, the same indexed interview can be seen in OHMS, here.)

{
  "id": "f3e74d2e-7b17-4a0d-b318-9469b32d0e53",# Unqiue ID generated by Tim
  "title": "Interview with Steve Zahn", # The name that the project is saved as
  "url": "https://www.youtube.com/watch?v=gyJk1UfWrRs", # Video URL

# The notes array contains a dictionary for each line used in TIM Notes. Per dictionary, there is a field named 'children' and within that there is a field named 'text'. The contents of the corresponding TIM notes line is then mapped to the 'text' field.
  "notes": [
    {
      "children": [
        {
          "text": "[00:03:24]"
        }
      ]
    },
    {
      "children": [
        {
          "text": "# Moving to Kentucky"
        }
      ]
    },
    {
      "children": [
        {
          "text": ">Talks about meeting his wife Robyn Peterman and moving their family to Kentucky and his interest in Kentucky history."
        }
      ]
    },
    {
      "children": [
        {
          "text": ""
        }
      ]
    },
    {
      "children": [
        {
          "text": "**Historical markers** **Kentucky history**"
        }
      ]
    }
  ],


# The metadata array contains a dictionary for each index created in TIM Notes
  "metadata": [
    {
      "index": 0, # Index number
      "timecode": "00:03:24", # The timestamp of the index
      "time": 204, # Timestamp converted to the number of seconds

# List of all the lines used for this specific index. Each line gets stored in dictionary
      "lines": [
        {
          "index": 1, # Line index number
          "line": "# Moving to Kentucky", # Contents of the line
          "empty": false, # States whether the line is empty or not
          "timecodes": [], # Collects any timecodes recognized within the line
          "times": [],
          "matches": [],
          "keywords": [] # Collects any keywords recognized within the line
        },
        {
          "index": 2,
          "line": ">Talks about meeting his wife Robyn Peterman and moving their family to Kentucky and his interest in Kentucky history.",
          "empty": false,
          "timecodes": [],
          "times": [],
          "matches": [],
          "keywords": []
        },
        {
          "index": 3,
          "line": "",
          "empty": true,
          "timecodes": [],
          "times": [],
          "matches": [],
          "keywords": []
        },
        {
          "index": 4,
          "line": "**Historical markers** **Kentucky history**",
          "empty": false,
          "timecodes": [],
          "times": [],
          "matches": [],
          "keywords": [
            [
              "**Historical markers**",
              "",
              "**"
            ],
            [
              " **Kentucky history**",
              " ",
              "**"
            ]
          ]
        },
        {
          "index": 5,
          "line": "",
          "empty": true,
          "timecodes": [],
          "times": [],
          "matches": [],
          "keywords": []
        }
      ],
      "timecodes": [], # List of timecodes recognized within the index
      "title": "Moving to Kentucky", # Title field for this this specific index
      "synopsis": "Talks about meeting his wife Robyn Peterman and moving their family to Kentucky and his interest in Kentucky history.", # Synopsis field for this specific index
      "notes": "", # Any text within this specific index that is not using markup is stored as notes
      "keywords": "Historical markers, Kentucky history" # Keywords field for this specific index
    }
  ],
  "created": 1673560438173,
  "updated": 1673579715996
}