Please use our GitHub Issues page for all new support inquiries. If you need to contact us directly, please e-mail [email protected]

I am trying to develop a script that will generate a column of 30-second intervals (called "interval") based on the start time of a cell in another column. In the column "session" I have a cell which indicates the onset and offset of the section of the video that I want the intervals created in. This script creates 30-second intervals, but they do not start at the beginning of the cell in the column "session" as I would like them to.

alt text

asked 06 Mar, 17:53

katethorson's gravatar image

katethorson
26448
accept rate: 0%

edited 06 Mar, 17:55


Hi, you need to move the line that creates the column outside of the loop (otherwise it creates a new column at each iteration and overwrites the previous column. So, I would move the line that says interval = createNewColumn("interval", "interval") to the line right before the for loop.

Additionally, check out the script repository for a similar template script that does this: Insert Intervals

You would need to modify the parameters section with appropriate values (e.g., column_code_map with the name of your column and the codes in it, reference_column_name to 'session', and the interval size to 30s).

permanent link

answered 06 Mar, 21:04

Shohan%20Hasan's gravatar image

Shohan Hasan ♦♦
531126
accept rate: 14%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×4

question asked: 06 Mar, 17:53

question was seen: 722 times

last updated: 06 Mar, 21:04

powered by OSQA