Skip to content

Telegram/Telethon message with entities converter. Rewritten for additional syntax (markdown, docuwiki)

License

Notifications You must be signed in to change notification settings

Antiokh/TelethonMessageConverter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TelethonMessageConverter

Telegram/Telethon message with entities to HTML converter. It needs message and entities fields from telethon.tl.custom.message.Message objects. Use it like this:

from TelethonMessageConverter import MessageToSyntax
    
for msg in tg_client.iter_messages(invite_link):
    converter = MessageToSyntax(msg.message, msg.entities)
    html = converter.to_syntax('html')

Not all MessageEntity* items are processing. You may add new one to _ENTITIES_TO_TAG dict.

See also

About

Telegram/Telethon message with entities converter. Rewritten for additional syntax (markdown, docuwiki)

Resources

License

Stars

Watchers

Forks

Languages

  • Python 100.0%