XML Data Bridge

XML Data Bridge 0.6

discorny

New Member
discorny submitted a new resource:

Sportzcast LiveXML Text - Changes text to relevant data in text sources with names that match XML tags from Sportzcast LiveXML

Modified from Jim's url-text.py
I am not a programmer, so use at your own risk. I hacked this together one day because I needed to get data from a Sportzcast Scorebot into OBS. This uses the XML file created by Sportzcast's LiveXML software and looks for text sources with names that match XML tags in the XML file.

E.g, To get <clock> data, create a new text source named %clock%

View attachment 77557

It does spit out an error every once in a while that I think is related to...

Read more about this resource...
 

Summers331

New Member
Could you explain this a little more in depth to a non-programmer, just an athletic's guy. I just bought a Scorelink and I'm trying to avoid using VMix and would like to stay in OBS as I've built and run my sports livestreams through this over the past year. Any help would be appreciated.
 

jeremydmeyer76

New Member
I am needing a script that does something similar to this.

I have an xml file that I'm trying to get sensor data from to add as an overlay on my feed.

I know next to nothing about writing code or programming.

I used your existing script and tried modifying it to look for the <probe> tag instead of <clock>. When I added %probe% as a text source it doesn't seem to populate.

I want to be able to make this work without learning to have to write a script from scratch but so far I'm not having any luck.
 

discorny

New Member
Could you explain this a little more in depth to a non-programmer, just an athletic's guy. I just bought a Scorelink and I'm trying to avoid using VMix and would like to stay in OBS as I've built and run my sports livestreams through this over the past year. Any help would be appreciated.
I'm very sorry, I did not know that this upload was approved by the mods, let alone that people had asked me questions.
Basically you need to install python 3.6 (windows), in OBS select Tools > Scripts > Python Settings and select the python install location, for me this is C:/Users/**my username**/AppData/Local/Programs/Python/Python36. Then switch back to the Scripts tab in the OBS Scripts window, click + and choose the file you downloaded here. Then just follow the instructions in the description to import your scoredata.
I have not used it on a mac but i figure it should work the same. I also haven't used a scorelink, I use a scorebot and I'm not sure how different they are.
 

discorny

New Member
I am needing a script that does something similar to this.

I have an xml file that I'm trying to get sensor data from to add as an overlay on my feed.

I know next to nothing about writing code or programming.

I used your existing script and tried modifying it to look for the <probe> tag instead of <clock>. When I added %probe% as a text source it doesn't seem to populate.

I want to be able to make this work without learning to have to write a script from scratch but so far I'm not having any luck.
I'm not sure how your xml file is set up. This plugin looks specifically for the root element in the xml and then lets you choose which child element to pull data from. in this case it sees that <info> is the root element:
Code:
<?xml version="1.0" encoding="utf-8"?>
<info>
  <site>*Internal Test BOT</site>
  <sport>Football</sport>
  <clock>13:07</clock>
  <clockmin>13</clockmin>
  <clocksec>07</clocksec>
  <playclock>21</playclock>
  <Hscore>13</Hscore>
  <Vscore>12</Vscore>
</info>

I could probably modify it to make it more flexible, but that might take me a while since I'm not much of a programmer myself. You could modify it yourself and change the line looking for the root element to look for your specific "parent" element.
 

dunnand0

New Member
I need to use the parent of scoreboard_data and can't get this to work. I can't figure out how to change the code.
 

dunnand0

New Member
I do have the search whole xml checked

Actually on second look, the root file isn't just scoreboard_data it also shows <SCOREBOARD_DATA xmlns="RXNevcoScore">

I Was wrong as the root saying just <scoreboard_data> works.

So it's the extra xmlns.... In the root. Any ideas
 

discorny

New Member
I do have the search whole xml checked

Actually on second look, the root file isn't just scoreboard_data it also shows <SCOREBOARD_DATA xmlns="RXNevcoScore">

I Was wrong as the root saying just <scoreboard_data> works.

So it's the extra xmlns.... In the root. Any ideas
would you be able to attach your xml file here with any sensitive data removed from it?
 

dunnand0

New Member
OBS wouldn't allow XML upload but this is the entire .xml


<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<SCOREBOARD_DATA xmlns="RXNevcoScore">
<HUNDREDTHS_SECONDS />
<MAIN_TIME> 0.0</MAIN_TIME>
<AUX_TIME>76:30</AUX_TIME>
<PITCH_CLOCK_SECONDS>25</PITCH_CLOCK_SECONDS>
<HOME_SCORE />
<HOME_SHOTS />
<HOME_SHOTS_ON_GOAL />
<HOME_SAVES>10</HOME_SAVES>
<HOME_CORNER_KICK />
<HOME_PENALTY />
<HOME_PENALTY_KICK_INDICATOR>0</HOME_PENALTY_KICK_INDICATOR>
<HOME_TOP_PENALTY_PLAYER />
<HOME_BOTTOM_PENALTY_PLAYER />
<HOME_THIRD_PENALTY_PLAYER>0</HOME_THIRD_PENALTY_PLAYER>
<HOME_POSSESSION_INDICATOR>0</HOME_POSSESSION_INDICATOR>
<HOME_INNING_ONE_SCORE />
<HOME_INNING_TWO_SCORE />
<HOME_INNING_THREE_SCORE />
<HOME_INNING_FOUR_SCORE>8</HOME_INNING_FOUR_SCORE>
<HOME_INNING_FIVE_SCORE />
<HOME_INNING_SIX_SCORE />
<HOME_INNING_SEVEN_SCORE>0</HOME_INNING_SEVEN_SCORE>
<HOME_INNING_EIGHT_SCORE>0</HOME_INNING_EIGHT_SCORE>
<HOME_INNING_NINE_SCORE>0</HOME_INNING_NINE_SCORE>
<HOME_INNING_TEN_SCORE>0</HOME_INNING_TEN_SCORE>
<HOME_TOTAL_ERRORS />
<HOME_TOTAL_HITS />
<HOME_PITCH_COUNT />
<HOME_TIMEOUTS_LEFT />
<HOME_LACROSSE_TIMEOUTS_LEFT>8</HOME_LACROSSE_TIMEOUTS_LEFT>
<GUEST_SCORE />
<GUEST_SHOTS>1</GUEST_SHOTS>
<GUEST_SHOTS_ON_GOAL>1</GUEST_SHOTS_ON_GOAL>
<GUEST_SAVES>45</GUEST_SAVES>
<GUEST_CORNER_KICK />
<GUEST_PENALTY />
<GUEST_PENALTY_KICK_INDICATOR>0</GUEST_PENALTY_KICK_INDICATOR>
<GUEST_TOP_PENALTY_PLAYER />
<GUEST_BOTTOM_PENALTY_PLAYER />
<GUEST_THIRD_PENALTY_PLAYER>0</GUEST_THIRD_PENALTY_PLAYER>
<GUEST_INNING_ONE_SCORE />
<GUEST_INNING_TWO_SCORE />
<GUEST_INNING_THREE_SCORE />
<GUEST_INNING_FOUR_SCORE>8</GUEST_INNING_FOUR_SCORE>
<GUEST_INNING_FIVE_SCORE />
<GUEST_INNING_SIX_SCORE />
<GUEST_INNING_SEVEN_SCORE>0</GUEST_INNING_SEVEN_SCORE>
<GUEST_INNING_EIGHT_SCORE>0</GUEST_INNING_EIGHT_SCORE>
<GUEST_INNING_NINE_SCORE>0</GUEST_INNING_NINE_SCORE>
<GUEST_INNING_TEN_SCORE>0</GUEST_INNING_TEN_SCORE>
<GUEST_TOTAL_ERRORS />
<GUEST_TOTAL_HITS />
<GUEST_PITCH_COUNT />
<GUEST_POSSESSION_INDICATOR>0</GUEST_POSSESSION_INDICATOR>
<GUEST_TIMEOUTS_LEFT />
<GUEST_LACROSSE_TIMEOUTS_LEFT>8</GUEST_LACROSSE_TIMEOUTS_LEFT>
<GLOBAL_DATA_INNING>1</GLOBAL_DATA_INNING>
<GLOBAL_DATA_BALLS>10</GLOBAL_DATA_BALLS>
<GLOBAL_DATA_STRIKES>45</GLOBAL_DATA_STRIKES>
<GLOBAL_DATA_OUTS>1</GLOBAL_DATA_OUTS>
<GLOBAL_DATA_PLAYER_AT_BAT />
<GLOBAL_DATA_HIT_INDICATOR>0</GLOBAL_DATA_HIT_INDICATOR>
<GLOBAL_DATA_ERROR_INDICATOR>0</GLOBAL_DATA_ERROR_INDICATOR>
<GLOBAL_DATA_GAME_PERIOD_FOOTBALL>1</GLOBAL_DATA_GAME_PERIOD_FOOTBALL>
<GLOBAL_DATA_YARDS_TO_GO>10</GLOBAL_DATA_YARDS_TO_GO>
<GLOBAL_DATA_DOWN />
<GLOBAL_DATA_BALL_ON>45</GLOBAL_DATA_BALL_ON>
<GLOBAL_DATA_END_OF_PERIOD>0</GLOBAL_DATA_END_OF_PERIOD>
<GLOBAL_DATA_GAME_PERIOD>1</GLOBAL_DATA_GAME_PERIOD>
<GLOBAL_DATA_END_OF_PERIOD_INDICATOR>0</GLOBAL_DATA_END_OF_PERIOD_INDICATOR>
<GLOBAL_DATA_SHIFT_SECONDS>0</GLOBAL_DATA_SHIFT_SECONDS>
<GLOBAL_DATA_SHIFT_TENTH_SECONDS>0</GLOBAL_DATA_SHIFT_TENTH_SECONDS>
<GLOBAL_DATA_HORN>0</GLOBAL_DATA_HORN>
<DISPLAY_CONTROL_DIMMING_STATE>9</DISPLAY_CONTROL_DIMMING_STATE>
</SCOREBOARD_DATA>
 

dunnand0

New Member
I found a fix for my needs. I was able to remove what I now know is called a namespace from my XML document. The program with the output of the XML had that as an option and I didn't realize the "XMLNS" stood for XML NAME SPACE and it was an easy fix. Thanks for the help and making this script it works amazingly!!!
 

discorny

New Member
I found a fix for my needs. I was able to remove what I now know is called a namespace from my XML document. The program with the output of the XML had that as an option and I didn't realize the "XMLNS" stood for XML NAME SPACE and it was an easy fix. Thanks for the help and making this script it works amazingly!!!
I have posted an update that allows you to enter the namespace into the script.
 

discorny

New Member
discorny updated Sportzcast LiveXML Text with a new update entry:

0.5 - Value changer

New feature: Value changes via .csv
You can now select a CSV file to change values outputted by the scoreboard to values you want to appear on screen.
The CSV must be formatted like so:
XMLTag,inputvalue,outputvalue
Example:
GLOBAL_DATA_DOWN,1,1st GLOBAL_DATA_DOWN,2,2nd GLOBAL_DATA_DOWN,3,3rd GLOBAL_DATA_DOWN,4,4th GLOBAL_DATA_GAME_PERIOD,1,1st GLOBAL_DATA_GAME_PERIOD,2,2nd GLOBAL_DATA_GAME_PERIOD,3,3rd GLOBAL_DATA_GAME_PERIOD,4,4th
A good example use...

Read the rest of this update entry...
 

dunnand0

New Member
The script has stopped working. The loaded scripts section does not show the description options anymore. It just shows No Properties available.
 
Top