Code Monkey home page Code Monkey logo

telebot-calendar's Introduction

Inline calendar for Telebot

Code style: black

Simple calendar for Telebot.

Installation

PYPI

pip install telebot-calendar

Description

The file telebot_calendar.py used to create, modify, and retrieve user data from an inline keyboard calendar created by the user.

Usage

To use the telebot_calendar you need to have Telebot installed first. Working example.py See the example in the file example.py

Languages

To set the language, add its instance to the calendar class

from telebot_calendar import Calendar, RUSSIAN_LANGUAGE

calendar = Calendar(language=RUSSIAN_LANGUAGE)

You can also create your own language class. If you will do it for other languages, we will be grateful to PR

Demo

telebot-calendar's People

Contributors

flymedllva avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

telebot-calendar's Issues

leap year's bug

Из-за того что 2020 год високосный день недели отстает от даты. Например 30.03.2020 указывается как воскресенье.
r-b_calendar

issue with selecting month when at month calendar

Line 220 in telebot_calendar.py

month[0], callback_data=calendar_callback.new("MONTH", year, i + 1, "!")

should probably be replaced with

month[0], callback_data=calendar_callback.new("MONTH", year, 2*i + 1, "!")

Otherwise, we're getting wrong callback data (wrong months' indexes) for the whole left column in the month calendar (except Jan).

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.