Code Monkey home page Code Monkey logo

ptb-mn's Introduction

This Telegram-Bot aims to help Admins of @MilitaerNews publishing for multiple languages.

You can find it here.

Usage

๐Ÿ”ฐ German Channel (@MilitaerNews)

  • if photo, animation or video (can also be a media group) is posted:
    • translates caption of each photo, image or animation - or the first entry of a media group
    • if no hashtag is present: appends Hashtags for each flag to the caption
    • appends the language's footer attribute to the caption
    • reposts in all News channels after 20 seconds
  • if a posted text (i.e. no photo, animation, video etc.) contains #eilmeldung:
    • remove this message
    • send German Breaking News photo with caption being the text of the initial channel post
    • translates to all given languages
    • prepends the language's breaking attribute to given text
    • reposts in all News channels
  • if a posted text (i.e. no photo, animation, video etc.) contains #mitteilung:
    • remove this message
    • send German Announcement photo with caption being the text of the initial channel post
    • translates to all given languages
    • prepends the language's announce attribute to given text
    • reposts in all News channels and pins them

๐Ÿ”ฐ Memes Channel (@MilitaerMemes)

  • default behavior:
    • appends English footer the each photo, animation or video posted in this channel
  • if the caption of a posted photo, animation or video contains #de:
    • the appended footer will be in German
  • channel posts are forwarded to the German and English discussion groups

Languages

This bot posts to channels with different languages. A language consists of these attributes:

attribute type usage
lang_key str identifies a language, corresponding photos and translation
channel_id int identifier of the corresponding News channel on Telegram
footer str text to appear at the end of channel posts
breaking str hashtag for breaking news
announce str hashtag for announcements

See lang.py for the implementation.

Contribute

Contributions are welcome!

Feel free to open up an issue in which you clearly define what should be added or changed.

ptb-mn's People

Contributors

pxnx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

bavarian69

ptb-mn's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.