Comments (1)
Script for migration
import json
import sqlite3
channel = "zetalot"
database_path = f"channels/{channel}/data/monkalot.db"
stats_path = f"channels/{channel}/data/emote_stats.json"
a = open(stats_path)
emotes = json.load(a)
connection = sqlite3.connect(database_path)
def execute_command_get_cursor(sql_command, args):
"""Execute a command and return the cursor and connection.
Use this if you need the output of the command, or need the cursor and connection.
Since different threads will try to access this method, a connection has to be reopened everytime.
"""
cursor = connection.cursor()
cursor.execute(sql_command, args)
connection.commit()
return cursor
for emote, value in emotes.items():
sql_command = "INSERT OR REPLACE INTO emote_total (emote, total) VALUES (?, ?);"
print(f"{emote}, {value}")
execute_command_get_cursor(sql_command, (emote, value))
from monkalot.
Related Issues (20)
- Counted emotes don't get updated HOT 2
- TypeError in speech.py HOT 1
- Error on !topspammers command
- Webserver does not shut down when main process is killed HOT 1
- Card info command doesn't use updated card database HOT 1
- Handle chatbot returning None
- Support FFZ emotes where BTTV emotes are supported
- If a single person gets pyramid points plural verb is used HOT 1
- Refactor documentation HOT 1
- Separate cleverbot speech and chatterbot speech modules
- Check db_migrate folder
- Check tools folder
- Remove todo.md
- Release 2.0
- !rank command does not work
- !pstart does not post questions HOT 1
- !wakeup not working for mods
- 400 Client Error: Bad Request for url: https://api.twitch.tv/kraken/users?login= HOT 6
- Some issues i faced today (first testing it in my broadcaster channel) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from monkalot.