| Server IP : 85.155.190.233 / Your IP : 216.73.216.103 Web Server : nginx/1.24.0 System : Linux antigravity-cli 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 User : wp-moonbloom ( 1001) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /opt/Gemini_Swarm_Core/scripts/ |
Upload File : |
import asyncio
import sys
import os
from pathlib import Path
from datetime import datetime, timezone
# Load environment variables on VPS
env_file = Path("/opt/Gemini_Swarm_Core/.env")
if env_file.exists():
with open(env_file, "r") as f:
for line in f:
line = line.strip()
if "=" in line and not line.startswith("#"):
k, v = line.split("=", 1)
os.environ[k.strip()] = v.strip().strip('"').strip("'")
sys.path.insert(0, "/opt/Gemini_Swarm_Core/scripts")
from trend_scout import TrendScoutManager
from tg_bridge import DB_PATH, TOKEN, ALLOWED_USERS
from aiogram import Bot
async def main():
print("Starting VPS manual blog writer run...")
if not TOKEN:
print("ERROR: TELEGRAM_BOT_TOKEN is not set.")
sys.exit(1)
bot = Bot(token=TOKEN)
manager = TrendScoutManager(bot=bot, db_path=DB_PATH, allowed_users=ALLOWED_USERS)
success = await manager.run_blog_writer(datetime.now(timezone.utc))
print("Execution completed! Result Success:", success)
await bot.session.close()
if __name__ == "__main__":
asyncio.run(main())