telegram-bot icon indicating copy to clipboard operation
telegram-bot copied to clipboard

[Feature Request ] Code Highlighter!

Open perpi opened this issue 9 years ago • 12 comments

A big missing option in IRC clients is lack of ability to highlight programming codes. For example, if you login to http://webchat.freenode.net/?channels=python and send a line of code, you won't find any difference between the code and other chats in the channel. Most editors, IDE and some online services can highlight codes based on the programming language you are coding. Here you can see a shot of slack.com service with a python code:

2015-06-04--1433365953_861x243_scrot

A plugin with this ability will make Telegram groups a great replacement for some services and IRC! The method for telegram can be an abbr to assign type of the code:

/py <code here>
/sh <code here>
/c++ <code here>

You send /py <code here> in telegram, and the plugin convert it to a highlighted view.

perpi avatar Jun 03 '15 21:06 perpi

I was thinking in this a time ago, and like we can't change the color in telegram, I was thinking in upload or create in the server an image with the colors, and send the image, then I started the exams and didn't think more XD

rockneurotiko avatar Jun 03 '15 21:06 rockneurotiko

+1 xD

animalillo avatar Jun 04 '15 10:06 animalillo

Would be great if Telegram support text colours. Other way is by image or uploading to any code paste service

yagop avatar Jun 04 '15 14:06 yagop

BTW, i think it will be horrible -- in a day you will see a "BUY OUR SPAM" in big red letters filling half screen. I think, monocolored and monosized font is blessing

Also, we already can make screenshot from site -- why not use some existing code-highlight service?

Prince-Mandor avatar Jun 05 '15 08:06 Prince-Mandor

+1

citec avatar Dec 10 '15 16:12 citec

+1

vladimirdotk avatar Dec 13 '15 05:12 vladimirdotk

+1

seekasra avatar Feb 07 '16 04:02 seekasra

Done: Pull: #367 Gist: https://gist.github.com/TiagoDanin/35370fce4da0b58b039e

TiagoDanin avatar Feb 07 '16 14:02 TiagoDanin

@TiagoDanin

  • Great work. May you convey its process? I see a link to https://screenshotmachine.com
  • Could you provide us by some screenshots of this bot in action to see how it looks in Telegram?
  • This is not important but I see you have linked to pastebin, but it's not more recommended, you know. People prefer other replacements such as http://ix.io. What's your favourite pastebin service?

perpi avatar Feb 18 '16 19:02 perpi

@perpi

1- ~~Their API and complicates, not recommend the using~~ 2- Receive and send an image image 3- Is a service of edit online 4- Prefer http://pastebin.com

TiagoDanin avatar Feb 18 '16 22:02 TiagoDanin

+1

wadijm avatar Apr 14 '16 17:04 wadijm

Grave accent is supported in telegram!

Hitaro avatar Apr 15 '16 06:04 Hitaro