Skip to content

Small application that reads data from a google spreadsheet periodically and updates all text sources matching a given name scheme.

Notifications You must be signed in to change notification settings

DaBenjamins/obs-google-sheet-importer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OBS Google Sheet Importer v1.4.4

This tool allows you to dynamically update content, color and visibility of text sources in OBS through a google sheet.

Prerequisites

Installation

  • Download the source
  • Download and Install Node.js
  • Run install.bat

Usage

Spreadsheet

The source spreadsheet needs to be set to allow anyone with the link to view, otherwise the API connection doesn't work.

OBS Setup

Make sure the Websocket is enabled (Tools -> WebSocket Server Settings -> Enable WebSocket Server), take not of the settings (Port and Password)

Configuration

Open config-dist.json and set the following values:

  • sheetId: The ID of the google sheet (you can copy this from the sheets link, e.g. https://docs.google.com/spreadsheets/d/this-bit-here-is-the-sheet-id/edit#gid=0)
  • tabname: The tab name where you need data from
  • range: The range of Rows you need data from, must be column C through D (in A1 notation, e.g. C2:D)
  • apikey: Your Google Sheets API Key
  • obsaddress: The address of your OBS Websocket, default is ws://localhost:4455 for local OBS instance
  • obsauth: The password configured in your OBS Websocket, leave empty for no authentication
  • polling: The frequency of updates in ms, defaults to 2000 (the google API maxes out at 1 request per second)
  • dimension: controls the major dimension in the API query, don't touch unless you know what you are doing

Save the file as config.json

OBS Setup

To enable an OBS source to be controlled via the sheet, name the source in this format: [Arbitrary Source Name] |sheet [Row #] For example, Text Source 1 |sheet 5 would be controlled by the contents of Row 5.

Controlling Text Sources

Setting Text

Any text in a cell is set as the text in the source.

Hiding/Showing a Text Source

Change the cell text to begin with ?hide;Any text here or ?show;Any text here to disable/enable the text source (with the last text that was set)

Changing Text Color

Change the cell text to ?color=000000;Any text here to set the text color in OBS with hex colors.

Controlling Image Sources

Any image URL in a cell is set as the image in the source.

Hiding/Showing a Image Source

Change the cell text to begin with ?hide;Image here or ?show;Image here to disable/enable the text source (with the last text that was set). Their is a 1500ms delay after disabling, and a 750ms delay before enabling.

Controlling Color Sources

Any #hexcode in a cell is set as the color in the source.

Controlling Browser Sources

Any URL in a cell is set as the webpage in the source.

Controlling Visibility Only

Any "hide"/"show" in a cell is set as the sources visability.

About

Small application that reads data from a google spreadsheet periodically and updates all text sources matching a given name scheme.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.6%
  • Batchfile 0.4%