Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tom-riddle09/telegram_wordpress_bot

A python script to which access telegram messages including media on a specified channel and creates a WordPress post.
https://github.com/tom-riddle09/telegram_wordpress_bot

python-automation telegram-bo telegram-bot xmlrpc

Last synced: 22 days ago
JSON representation

A python script to which access telegram messages including media on a specified channel and creates a WordPress post.

Awesome Lists containing this project

README

        

Python Automation Script
for Telegram Messages and WordPress Post Creation

Prerequisites
• WordPress Xmlrpc: pip install python-wordpress-xmlrpc.
• Requests: pip install requests
• Telegram bot : pip install python-telegram-bot
• Logging : pip install logging
• ffmpeg (if windows system > winget install ffmpeg) python library > pip
install python ffmpeg.

Credentials Used
✓ WordPress Application (for managing non-interactive connections)
✓ Application Name
✓ Application Password
✓ Telegram Bot Token
✓ WordPress Endpoint
✓ REST API Endpoint:
✓ WordPress Username
✓ WordPress Password
✓ Page Id for the Page

How to run the script
➢ Install the prerequisites.
➢ Run the script: python (script_name).py
Keep the script running in background.

Functions used: Use case
• “save_log” : used to store log of the program to a log file.
• “ file_extn” : used to identify the telegram file extension and write it to
the local directory, returns file path
• “upload_file”: used to upload file to the WordPress Media Library,
returns file url.
• “create_wordpress_post”: used to create WordPress post with the
uploaded file , returns post id.
• “create_vd_thmbnail”: usd to create video thumbnail for video files.