Skip to content

Instantly share code, notes, and snippets.

View fskuratov's full-sized avatar

Fedor Skuratov fskuratov

View GitHub Profile
@fskuratov
fskuratov / Msg2Trello.py
Last active March 27, 2023 14:21
Telegram bot, developed using Python, that seamlessly translates incoming messages or forwarded texts into tasks and subtasks with the help of the GPT-3.5 API. The tasks, along with their associated subtasks as checklists, are efficiently organized into specified boards and lists on Trello by utilizing the Trello API.
import logging
import openai
import re
from datetime import datetime, timedelta
from trello import TrelloClient
from telegram import Update
from telegram.ext import ApplicationBuilder, ContextTypes, CommandHandler, MessageHandler, filters
# Set up logging for easier debugging
logging.basicConfig(
@fskuratov
fskuratov / chatbot.py
Created March 25, 2023 13:12
A Python script for bot that transforms every message sent to it into a task.
import logging
import openai
from telegram import Update
from telegram.ext import ApplicationBuilder, ContextTypes, CommandHandler, MessageHandler, filters
# Set up logging for easier debugging
logging.basicConfig(
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
level=logging.INFO
)