Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lots of to-dos #5

Open
2 of 21 tasks
dcdunkan opened this issue Jan 20, 2023 · 0 comments
Open
2 of 21 tasks

Lots of to-dos #5

dcdunkan opened this issue Jan 20, 2023 · 0 comments

Comments

@dcdunkan
Copy link
Owner

dcdunkan commented Jan 20, 2023

Features

List of few features that I want to add to this bot if possible. Some of the following may seem unnecessary and I'll re-think about it when I'm working on it. (Warning! This list might include some items that may seem stupid or can never be done)

  • Highlight only if the code block contains more than x number of characters. It would be a mess if someone use three backticks instead of one backtick, even for a single monospace word.
  • Make send as document mode the default mode for images.
  • Allow users to toggle code wrapping for a chat.
  • Disable code wrapping by default.
  • Quick inline mode. Write the code after the bot username and the bot should return two inline results: 1) Highlighted image and 2) Highlighted image with code as caption (incase someone wants to copy and edit it).
  • Show a preview of the theme set: When a theme is set for a chat send a highlighted dummy code image using the chat settings. That'll help user to see what's their configuration looks like.
  • There Is More Mode for private chats, which allows users to make highlighted images for snippets with more than 4096 (Telegram limit) characters.
  • Allow formatting supported languages using dprint. "fmt" parameter probably. (Not quite sure about this, might be an overkill).
  • Allow users to specify language with an argument in the /hl (/highlight) command. For accurate highlighting.
  • Show chat settings (theme, font) in /stats (or introduce a /settings command).
  • Switch to a better highlighter library such as Shiki or Prisma. They would require language of the code. So: language guessing using yoeo/guesslang model or its modified microsoft/vscode-languagedetection one.
  • Allow users to make line numbers optional and introduce a toggle-using-argument for that as well.
  • Emoji support: Currently emoji aren't rendered due to some limitations with the library we're using. But there is a way using images or SVG. Couldn't hurt to try even though I'm pretty sure it will make the image generation slower.
  • Re-rendering for edits: Re-render the image when the source is edited. This feature MUST have the ability to toggle.
  • Recovery mode argument: r. When people forgot to format the code, and have used `, or * symbols which caused their code to get formatted by their client, recover mode comes to the rescue. It goes through the message entities that are in the code snippet and applies them back. Probably, only support Markdown v2.

Finished

  • No puppeteer. Highlighting without using puppeteer. (The most wanted feature). This was done in v0.5.0 by using an implementation which creates a SVG and transform it into PNG.
  • Forced /highlighting by replying to a message - if the message contains pre code blocks, highlight them in the usual way. If not, highlight the whole message.

Miscellaneous

  • Design a more simple bot profile picture. (Maybe not)
  • Help message for private and a brief one for groups (not for admins).
  • Improve locales and messages.
  • Improve README instructions and guide.
@dcdunkan dcdunkan self-assigned this Jan 20, 2023
@dcdunkan dcdunkan pinned this issue Jan 20, 2023
@dcdunkan dcdunkan removed their assignment Apr 27, 2023
@dcdunkan dcdunkan changed the title Feature Tracker There is a lot to-do May 12, 2023
@dcdunkan dcdunkan changed the title There is a lot to-do Lots of to-dos Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant