Skip to content

Prrromanssss/YaNotes-GUI

Repository files navigation

YaNotes

flake8 test

Contents

About

The pace of life is so frantic that a handy note-taking app is essential!!!

So, this is a note-taking application written with the PyQt5 library.

Authorization

Each user can sign in and use their personal notes.

Image of the signing in

Sign up

Image of the signing up

Recovery their password

Image of the recovery password

Then, the user can see his profile

Image of the account

There are 3 types of the notes:

  • Text notes
  • Table notes
  • Calendar notes

Text notes

The user can create an unlimited number of note folders.

Image 1 of the text notes

Each folder has 10 pages for editing: you can write some text or change the name of the page on which you write. Click "save page" to save your edits.

Image 2 of the text notes

Table notes

Also user can load his .csv files in this app. You can create an unlimited number of note tables.

Image 1 of the table notes

Load your .csv files with appropriate configuration of the file. Follow this link to understand what setting is responsible for CSV File Reading and Writing in Python.

Image 2 of the table notes

Calendar notes

A telegram bot written on the pyTelegramBotAPI api is integrated into my project. So, you can set some notifications in these notes to receive them in the bot.

  • Firstly, follow this link YaNotes_bot and click "/start".
  • I have read too little "this" to understand how to poll bot asynchronously with PyQt5. That's why you need to get your chat id and enter it after pressing the button "Connect tg bot".
  • You can get chat id with username_to_id_bot or other bots that can do it.
  • Do not forget to choose your GMT!!!

When notes began to refer to a date in the past, they are automatically deleted.

Image of the calendar notes


Deployment instructions

1. Cloning project from GitHub

1.1 Run this command

git clone https://github.com/Prrromanssss/YaNotes-GUI.git

2. Creation and activation venv

2.1 First of all, from root directory run this command

python -m venv venv

2.2 Then run this command to activate venv

Mac OS / Linux

source venv/bin/activate

Windows

.\venv\Scripts\activate

3. Installation all requirements

3.3 Run this command

pip install -r requirements.txt

4. Generate file with virtual environment variables (.env)

4.1 Generate file '.env' in root directory with structure specified in the 'examples/test-env.txt' file

5. Running project

5.1 Run this command

python main.py

Database

This project uses the sqlite3 database.

Test database for work is presented in the YaNotes.sqlite3 file.

ER-diagram

Image of the ER-diagram


Architecture

In this project I tried to stick to the MVC software architectural pattern or MTV in python. The project also works asynchronously with asyncio and asyncqt.


Structure

Image of the general architecture

Structure of the apps folder

Image of the apps folder

I placed all PyQt5 widgets in the apps folder. Each window has its own folder corresponding to its name. In which this structure is presented:

  • templates: All design files (.ui, .py) are located in templates folder.
  • models: This file presents work with the database, according to this structure:
    import sqlite3
    
    from settings import DATABASE
    
    
    class TableNameModel:
        @staticmethod
        def description_of_the_request(*, arg1, arg2):
            con = sqlite3.connect(DATABASE)
            request = ''' Some SQL request
                      '''
            con.execute(request)
            con.commit()
    It was better to write a simple ORM, but I didn’t have enough time :(
  • widgets aka views: The rest of the files ending in _widget are allegedly views that connect to load data from the database into templates, and they also contain all the functionality of this window.
  • validators

Image of the each app

Structure of the bot folder

Image of the each app

All entities associated with the telegram bot are in the bot folder. It should be noted that the api token for the bot is a virtual environment variable.

The rest of the structure

  • media: User avatars are stored in this folder
  • tables: User .csv files are stored in this folder

Examples

You can find some examples in the examples folder.

About

Graphical user interface for note taking with account system

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages