AhFei

AhFei

简洁的写作需要勇气

Self-recommended Telegram forwarding robot, convenient for organizing messages, and can also convert GIFs and splice images.

extract_forward_TGbot#

Cannot do without Telegram, because of some excellent active channels, updating open source, technology and other information, as well as meme channels like "沙雕墙". In the past, I used to collect messages, but...

Phones are naturally not suitable for organizing data, and it is not convenient to use Telegram on a computer to operate these collections.

So, this forwarding bot was born, dedicated to solving the organization and preprocessing of information. The basic function is to extract the text and URLs from the messages sent to it and be able to push them to a web notepad, making it faster and more liberating to organize.

Project address: AhFeil/extract_forward_tgbot: Store and forward messages sent to it, and be able to push them to a webpage for easy viewing and editing of information, with the ability to concatenate images and convert videos to GIF (github.com), the installation steps are available in the project description.

Basic usage of the forwarding bot:#

  1. Forward the message to it, or send a message directly.
  2. It will extract the text and internal link URLs from it and save them. The internal link URLs will be placed after the text in order.
  3. Send the command /push, it will push all the saved content to the web notepad and return the URL.
  4. Access the webpage on your computer to view and efficiently process.

I usually push all the accumulated content to the webpage on Saturdays and process it together with the accumulated content in RSS.

Experience the features#

Chat with the forwarding bot: t.me/extract_forward_bot

Animation demonstrating basic functions:

image

Push format (the separator is: save time + forwarded from which channel + URL to this message):

image.png

Current commands#

Basic functions:#

  1. /start: Verify connection and operation.
  2. /push: Push all saved messages, the URL path is random, can be set using /set.
  3. /emsg: View the number of messages saved, the earliest message and its save time.
  4. /dmsg: Delete the latest saved message and return the text, can be used to display the URL.

Extended functions:#

  1. /set: Set the URL path. Use the format /set mypath, only alphanumeric characters, 3 to 26 characters. Restore random path: /set random.
  2. /image: Combine the images in the queue.
  3. Video to GIF: Forward video messages from specified channels or send videos to the bot, it will immediately return a GIF.

Specific usage of the image command:

"Simply put" --> Send an image to the forwarding bot, then send the command /image, and you will receive the returned image.

  1. How to add images to the queue:
    • Forward messages from specified channels, the images in the messages will be added to the queue. Currently, the specified channels in t.me/extract_forward_bot are: "沙雕墙".
    • Actively send images to the bot, they will also be saved in the image queue, only supports sending in the form of photos (phones default to sending as photos, the image form is actually a file).
  2. Rules for combining images:
    • If there is only one image, it will return a picture with explanatory text, with the text below the original image.
    • For two to four images, it will return a concatenated image.
    • If there are five or more images, it will return a GIF. (Since GIFs are compressed into MP4, a zip file will also be sent).
    • Each time an image is combined, the image queue will be cleared. Images with significantly different sizes will be stretched to the same size.
  3. Setting parameters:
    • Only one parameter can be set at a time, and no combination will be performed, only the parameter will be set.
    • /image clear: Clear the images in the queue.
    • /image Some explanatory text: Set the explanatory text.
    • /image time 3, /image time 1.5: Set the time interval for the generated GIF, in seconds.
    • /image array (1,2),(0,3): Specify the arrangement of the images. The numbers represent the order of the images in the queue, 1 is the earliest image sent to the bot, 0 represents an empty space. From 1 to 3, these three images will be placed in the order specified in the array, like this arrangement:
1 2
  3

There are still many issues with the current arrangement function, such as the matrix cannot be a single column or row, and 0 may cause the generated image to not be displayed completely in certain cases. However, there should be no problem as long as 0 is not used.

In essence, the image dialog box treats each image as a separate message and cannot automatically determine whether it has ended. Therefore, by sending the command /image, the processing of the images accumulated in the queue can be completed.

Video to GIF demonstration:

video2gif

Image combination demonstration:

Concatenation:

2p2one

Convert to GIF:

photos2gif

Add explanatory text at the bottom of the image:

add_text

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.