Skip to content

EgorKhabarov/NotesAssistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

520 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

EN RU

GitHub Actions Workflow Status

Telegram UptimeRobot Status

NotesAssistant

Bot for organizing notes in Telegram

Storing, adding, editing and deleting notes by date. You can tag a note with an emoji. Convenient search by emoji statuses and dates. Birthdays and holidays are marked on the calendar (you need to set an emoji status).

Installation instructions

Download

git clone https://github.com/EgorKhabarov/NotesAssistant
cd NotesAssistant
cp config.example.yaml config.yaml
pip install -r requirements.txt

Settings

Edit config.yaml in the bot directory

BOT_TOKEN: ""        # Telegram bot token from https://t.me/BotFather
WEATHER_API_KEY: ""  # Get it from https://home.openweathermap.org/api_keys

Set up a bot at https://t.me/BotFather

/mybots -> @your_bot_username

Bot Settings -> Group Privacy -> disabled
Bot Settings -> Inline Mode   -> disabled

Launch

Only bot

python start_bot.py

Server

python -c "from server import app;app.run('0.0.0.0')"

Getting administrator rights

Get your telegram chat_id

Launch the bot and send the command /id. Add the resulting chat_id to ADMIN_IDS in config.yaml and restart the bot.

Important

Add only chat_id of personal accounts (private chats)! Any interaction of any person in a telegram group with a bot is perceived as on behalf of the group.

Setting up PythonAnywhere

  • Create a web server using the latest available version of Python
  • In the Code category change Working directory to the path to the folder with server.py
  • In the Security category change Force HTTPS to Enabled

Docker

docker build -t NotesAssistant .
docker volume create NotesAssistantData
docker volume create NotesAssistantLogs
docker run -p 5000:5000 -v NotesAssistantData:/app/data -v NotesAssistantLogs:/app/logs --name NotesAssistantContainer NotesAssistant -d NotesAssistant
docker compose up -d --build

Commands

start

Greets the user.

Buttons Actions
/menu Same as /menu command
/calendar Same as /calendar command

menu

Navigation through bot functions.

Buttons Actions
๐Ÿ“š Help Same as /help
๐Ÿ“† Calendar Same as /calendar
๐Ÿ‘ค Account Personal account and data export
๐Ÿ‘ฅ Groups Group settings
๐Ÿ“† 7 days Notes in the next 7 days
๐Ÿ”” Notifications View notes that will be included in the notification
โš™ Settings Same as /settings
๐Ÿ—‘ Bin Recycle bin with deleted notes (premium)

help

Gives access to information about the bot's capabilities.

calendar

Calendar.

January (1.2000) (Leap ๐Ÿฒ) (52-5)
Mo Tu! We Th Fr Sa Su
#1 2
3 4!* 5 6ยณ 7 8 9
10! 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
<<<โŸณ>>>
๐Ÿ”™๐Ÿ—‚

Designations

First button

When pressed, a yearly calendar appears.

Designation Meaning
January Names of the month
(1.2000) Month and year numbers
(Leap ๐Ÿฒ) Is it a leap year and the animal of this year
(52-5) Numbers of the first and last week

Days of the week

When pressed, they do nothing. The text on the button may end with the ! character. This means that on this day of the week there are repeating notes with an interval of a week (more about statuses).

Button for the day

When pressed, it calls up message for one day

Sign Designation
# Today
* There are notes on this day
If there are less than 10 notes then it will consist of degree icons
indicating the number of notes
! There is an important note on this day
For example, with the status birthday ๐ŸŽ‰ or holiday ๐ŸŽŠ

Navigation buttons

Buttons Actions
<< Show calendar for one year ago
< Show calendar for one month ago
โŸณ Show calendar for current date
> Show calendar one month ahead
>> Show calendar for one year ahead

Tip

When you click on a โŸณ in the calendar, today's date opens.

Colors

Color Designation
4!* Today
4!* There are notes on this day

account

Here you can change your username and password or log out of your account. You can also view your limits ๐Ÿ“Š.

groups

You can connect a group to your account in the bot.

๐Ÿ”ธAllMemberModeratorAdmin
<Your first group name>
๐Ÿ”™๐Ÿ‘ฅ Create group

week_event_list

Message with notes in the next 7 days.

notifications

Message with notes for today, tomorrow, after tomorrow, after after tomorrow and in a week.

settings

Message with settings.

๐Ÿ—ฃ ru ๐Ÿ”— True โฌ†๏ธ ๐Ÿ”• โฌ›๏ธ
-3 -1 3 ๐ŸŒ +1 +3
-1h -10m 08:00 โฐ +10m +1h
Default settings
Sign Designation
๐Ÿ—ฃ Language (default ru)
๐Ÿ”— Should I shorten links (https://en.wikipedia.org/wiki/Hyperlink โ†’ en.wikipedia.org)
โฌ‡๏ธ / โฌ†๏ธ Note sort order
๐Ÿ”• Whether to enable notifications (disabled by default)
โฌœ๏ธ / โฌ›๏ธ Bot theme (replaces dark emoticons with light ones)
๐ŸŒ Your time zone
โฐ Notification Time

trash

List of deleted notes.

๐Ÿ”ผ
Select one note
โ†•๏ธ
Select multiple notes
๐Ÿงน
Empty Trash
๐Ÿ”„
Update cart

today

โž• ๐Ÿ”ผ โ†•๏ธ Menu
๐Ÿ”™ < > ๐Ÿ”„
Sign Designation
โž• Add note
๐Ÿ”ผ Select one note
โ†•๏ธ Select multiple notes
Menu Return to menu
๐Ÿ”™ Return to calendar
< Show message for yesterday
> Show message for tomorrow
๐Ÿ”„ Update message

export

Export notes in different file formats csv, xml, json, jsonl.

Message for one note

๐Ÿ“Edit text ๐ŸทStatuses ๐Ÿ—‘Delete note
๐Ÿ“‹Display ๐Ÿ“…Change date
โ„น๏ธInformation ๐Ÿ—„ะกhange history
๐Ÿ”™Back ๐Ÿ”„Update message

Note statuses

A status is one or more emoji to mark an note or add different effects.

Note can have a maximum of 5 statuses.

Important

There are incompatible statuses.

They cannot be placed together in the same note.

If you have one note from a pair, then you will not be able to place the second one.

Incompatible statuses
๐Ÿ”— (Link) and ๐Ÿ’ป (Code)
๐Ÿชž (Hidden) and ๐Ÿ’ป (Code)
๐Ÿ”— (Link) and โ›“ (No link shortening)
๐Ÿงฎ (Numbered List) and ๐Ÿ—’ (List)

Status effects are used only to visually display events. The event text itself remains unchanged.

Limits

There are limits for different user groups.

Maximum possible values

user_status note
day
symbol
day
note
month
symbol
month
note
year
symbol
year
note
all
symbol
all
default 20 4000 75 10000 500 80000 500 100000
premium 40 8000 100 15000 750 100000 900 150000
admin 60 20000 200 65000 1000 120000 2000 200000

Search

The bot features a convenient search feature for notes. You can search using a message beginning with # (e.g., #query) or the command /search query. This search attempts to find all matches. The query #1 2 finds all notes containing the numbers 1 OR 2 (t1ext, tex2t, 2te1xt).

open

Daily message
/open_today[_page_<page>]
/open_now[_page_<page>]

Monthly/Yearly calendar message
/open_calendar
/open_calendar_year

Open
/open[_<year>[_<month>[_<day>[_page_<page>]]]]

Contributors

Languages