Implement Pravda: Truth Social to Discord relay service
Some checks failed
Build and Push Docker Image / build (push) Failing after 1m59s

- Add core modules: database (SQLite), media (ffmpeg), discord (webhook), poller (truthbrush), server (FastAPI)
- Support video transcoding to H.264/AAC with automatic size management
- Handle message splitting for Discord limits (2000 chars, 10 attachments)
- Include interactive buttons (Delete, View Raw, Original Post)
- Add Dockerfile with ffmpeg and entrypoint script
- Add Gitea Actions workflow for CI/CD
- Configure code style tools (black, ruff, mypy)
- Include basic unit tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-23 01:01:59 -05:00
parent af530372f3
commit c75856ff44
17 changed files with 1491 additions and 0 deletions

66
pyproject.toml Normal file
View File

@@ -0,0 +1,66 @@
[project]
name = "pravda"
version = "1.0.0"
description = "Truth Social to Discord relay service"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"truthbrush>=0.5.0",
"requests>=2.31.0",
"fastapi>=0.109.0",
"uvicorn[standard]>=0.27.0",
"ffmpeg-python>=0.2.0",
"pynacl>=1.5.0",
"aiofiles>=23.2.0",
"httpx>=0.26.0",
]
[project.optional-dependencies]
dev = [
"black",
"ruff",
"mypy",
"pytest",
"types-requests",
]
[tool.black]
line-length = 88
target-version = ["py312"]
[tool.ruff]
line-length = 88
target-version = "py312"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long (handled by black)
]
[tool.mypy]
python_version = "3.12"
strict = true
warn_return_any = true
warn_unused_ignores = true
disallow_untyped_defs = true
[[tool.mypy.overrides]]
module = [
"truthbrush.*",
"ffmpeg.*",
"nacl.*",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]