tomaarsen / TwitchMarkovChain

Twitch Bot for generating messages based on what it learned from chat
MIT License
118 stars 25 forks source link

merging databases #28

Closed tradingaddict closed 2 years ago

tradingaddict commented 2 years ago

Hey, I'm wondering if there's a way to combine the data gathered from several different channels into one db file, instead of being limited to data from one channel at a time

tomaarsen commented 2 years ago

Hello @tradingaddict

I'm afraid that's not easily possible. One of the difficulties of doing that "on the fly" is "having to avoid race conditions. However, you could write a script to merge different database files together. Each of the databases have the same tables, the table data just needs to be appended together. Then, once you've created this large output database containing the data of all channels, then you can copy this one a few times and rename it to replace the old database files from each channel.

tradingaddict commented 2 years ago

Okay, I did try googling and fiddling with the databases to see if I could merge them myself, but I'm too out of my depth here to figure out how to do it in any easy enough or reasonably fast way. Thanks for the answer!

tomaarsen commented 2 years ago

Understandable! Sadly, I can't commit the time to help you out here...