diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 9ac96ce..dea27db 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -26,7 +26,7 @@ assignees: '' **Version info** - OS: [e.g. iOS] - Browser: [e.g. chrome, safari] - - Noted Version: [e.g. V1.0.0] + - MIND Version: [e.g. V1.0.0] - Python Version: [e.g. V3.7] **Additional context** diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 082e749..434ded3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,8 +1,8 @@ -# Contributing to Noted +# Contributing to MIND ## General steps -Contributing to Noted consists of 5 steps, listed hereunder. +Contributing to MIND consists of 5 steps, listed hereunder. -1. Make a [contributing request](https://github.com/Casvt/Noted/issues/new?template=contribute-request.md), where you describe what you plan on doing. This request needs to get approved before you can start, or your pull request won't be accepted. This is to avoid multiple people from doing the same thing and to avoid you wasting your time if we do not wish the changes. This is also where discussions can be held about how something will be implemented. +1. Make a [contributing request](https://github.com/Casvt/MIND/issues/new?template=contribute-request.md), where you describe what you plan on doing. This request needs to get approved before you can start, or your pull request won't be accepted. This is to avoid multiple people from doing the same thing and to avoid you wasting your time if we do not wish the changes. This is also where discussions can be held about how something will be implemented. 2. When the request is accepted, start your local development (more info about this below). 3. When done, create a pull request to the Development branch, where you mention again what you've changed/added and give a link to the original contributing request issue. 4. The PR will be reviewed and if requested, changes will need to be made before it is accepted. @@ -22,7 +22,7 @@ python3 -m unittest discover -v -s './tests' -p '*_test.py' 6. Test your version thoroughly to catch as many bugs as possible (if any). ## Styling guide -The code of Noted is written in such way that it follows the following rules. Your code should too. +The code of MIND is written in such way that it follows the following rules. Your code should too. 1. Compatible with python 3.7 . 2. Tabs (4 space size) are used for indentation. diff --git a/Dockerfile b/Dockerfile index cd22d33..f699d48 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,4 +9,4 @@ RUN pip3 install -r requirements.txt COPY . . -CMD [ "python3", "/app/Noted.py" ] +CMD [ "python3", "/app/MIND.py" ] diff --git a/Noted.py b/MIND.py similarity index 87% rename from Noted.py rename to MIND.py index 2ef2806..4b5ee14 100644 --- a/Noted.py +++ b/MIND.py @@ -2,7 +2,8 @@ #-*- coding: utf-8 -*- from os import makedirs, urandom -from os.path import abspath, dirname, join +from os.path import abspath, dirname, join, isfile +from shutil import move from sys import version_info from flask import Flask, render_template, request @@ -15,7 +16,7 @@ HOST = '0.0.0.0' PORT = '8080' THREADS = 10 -DB_FILENAME = 'db', 'Noted.db' +DB_FILENAME = 'db', 'MIND.db' def _folder_path(*folders) -> str: """Turn filepaths relative to the project folder into absolute paths @@ -67,8 +68,8 @@ def internal_error(e): return app -def Noted() -> None: - """The main function of Noted +def MIND() -> None: + """The main function of MIND Returns: None """ @@ -79,6 +80,8 @@ def Noted() -> None: # Register web server app = _create_app() with app.app_context(): + if isfile(_folder_path('db', 'Noted.db')): + move(_folder_path('db', 'Noted.db'), _folder_path('db', 'MIND.db')) db_location = _folder_path(*DB_FILENAME) makedirs(dirname(db_location), exist_ok=True) DBConnection.file = db_location @@ -90,9 +93,9 @@ def Noted() -> None: # Create waitress server and run server = create_server(app, host=HOST, port=PORT, threads=THREADS) - print(f'Noted running on http://{HOST}:{PORT}/') + print(f'MIND running on http://{HOST}:{PORT}/') server.run() - print(f'\nShutting down Noted...') + print(f'\nShutting down MIND...') # Stopping thread reminder_handler.stop_handling() @@ -101,4 +104,4 @@ def Noted() -> None: return if __name__ == "__main__": - Noted() \ No newline at end of file + MIND() diff --git a/README.md b/README.md index 7cc545e..3c9bc2f 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ -# Noted Reminders +# MIND Reminders A simple self hosted reminder platform that uses push to send notifications to your device. Set the reminder and forget about it! 📢 -Noted is a simple self hosted application for creating reminders that get pushed to your device using the [Apprise](https://github.com/caronc/apprise) API. You can send messages to just about every platform, including scheduled emails! +Mind is a simple self hosted application for creating reminders that get pushed to your device using the [Apprise](https://github.com/caronc/apprise) API. You can send messages to just about every platform, including scheduled emails! ## Screenshots -![noted-reminders-home](https://user-images.githubusercontent.com/57927413/213593220-495aeb86-2bf8-4c43-895d-c7cba38c3cee.png) +![mind-reminders-home](https://user-images.githubusercontent.com/57927413/213593220-495aeb86-2bf8-4c43-895d-c7cba38c3cee.png) -![noted-reminders-add-notification-services](https://user-images.githubusercontent.com/57927413/212755314-1104531e-7feb-4e59-af1d-927576e47152.png) +![mind-reminders-add-notification-services](https://user-images.githubusercontent.com/57927413/212755314-1104531e-7feb-4e59-af1d-927576e47152.png) -![noted-reminders-edit](https://user-images.githubusercontent.com/57927413/213594471-ecc99a72-cf0f-4570-8e78-92ffbf37e59d.png) +![mind-reminders-edit](https://user-images.githubusercontent.com/57927413/213594471-ecc99a72-cf0f-4570-8e78-92ffbf37e59d.png) -![noted-reminders-settings](https://user-images.githubusercontent.com/57927413/212755327-b45da53c-72f7-480c-9a77-eaad28803fbb.png) +![mind-reminders-settings](https://user-images.githubusercontent.com/57927413/212755327-b45da53c-72f7-480c-9a77-eaad28803fbb.png) ## Core Features * Basic auth @@ -28,19 +28,19 @@ You can see our planned features in our [Project board](https://github.com/users Replace the timezone value (`TZ=`) to the [TZ database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of your timezone! ```bash docker run -d \ - --name noted \ - -v noted-db:/app/db \ + --name mind \ + -v mind-db:/app/db \ -e TZ=Europe/Amsterdam \ -p 8080:8080 \ - mrcas/noted:latest + mrcas/mind:latest ``` ## Getting Started - Create a new account - Click the bell icon on the left side to add an Apprise push option and save it (Here is an example using Pushover) -![noted-reminders-notification-service](https://user-images.githubusercontent.com/57927413/213593832-6c62307c-cf7c-4d11-b6ce-dea33676d477.png) +![mind-reminders-notification-service](https://user-images.githubusercontent.com/57927413/213593832-6c62307c-cf7c-4d11-b6ce-dea33676d477.png) - Click the home icon and create a reminder! -You can see the [wiki](https://github.com/Casvt/Noted/wiki) for instructions on how to install Noted on other OS'es. +You can see the [wiki](https://github.com/Casvt/MIND/wiki) for instructions on how to install MIND on other OS'es. diff --git a/backend/db.py b/backend/db.py index 6333578..bc1f550 100644 --- a/backend/db.py +++ b/backend/db.py @@ -64,8 +64,8 @@ def close_db(e=None) -> None: def migrate_db(current_db_version: int) -> None: """ - Migrate a Noted database from it's current version - to the newest version supported by the Noted version installed. + Migrate a MIND database from it's current version + to the newest version supported by the MIND version installed. """ print('Migrating database to newer version...') cursor = get_db() diff --git a/docker-compose.yml b/docker-compose.yml index afbf0cc..85c3cf5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,11 +1,11 @@ version: '3.3' services: - noted: - container_name: noted + mind: + container_name: mind volumes: - - 'noted-db:/app/db' + - 'mind-db:/app/db' environment: - TZ=Europe/Amsterdam ports: - '8080:8080' - image: 'mrcas/noted:latest' + image: 'mrcas/mind:latest' diff --git a/frontend/templates/login.html b/frontend/templates/login.html index 610ace6..5b8da9b 100644 --- a/frontend/templates/login.html +++ b/frontend/templates/login.html @@ -9,17 +9,17 @@ -