Skip to content

Commit

Permalink
Merge pull request #35 from Casvt/Development
Browse files Browse the repository at this point in the history
V1.2.0
  • Loading branch information
Casvt authored Feb 11, 2023
2 parents e89e998 + 8d0387d commit 73e8935
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ RUN pip3 install -r requirements.txt

COPY . .

CMD [ "python3", "/app/Noted.py" ]
CMD [ "python3", "/app/MIND.py" ]
17 changes: 10 additions & 7 deletions Noted.py → MIND.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
"""
Expand All @@ -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
Expand All @@ -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()
Expand All @@ -101,4 +104,4 @@ def Noted() -> None:
return

if __name__ == "__main__":
Noted()
MIND()
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.
4 changes: 2 additions & 2 deletions backend/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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'
6 changes: 3 additions & 3 deletions frontend/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
<link rel="stylesheet" href="/static/css/login.css">
<script src="/static/js/login.js" defer></script>

<title>Login - Noted</title>
<title>Login - MIND</title>
</head>
<body>
<header>
<h1>Noted Reminders</h1>
<h1>MIND Reminders</h1>
</header>
<main>
<div class="form-container">
<form id="login-form">
<h2>Login</h2>
<noscript>Javascript is disabled. The web-ui of Noted does not work with JavaScript disabled.</noscript>
<noscript>Javascript is disabled. The web-ui of MIND does not work with JavaScript disabled.</noscript>
<input type="text" id="username-input" autocomplete="username" placeholder="Username" required autofocus>
<p class="error hidden" id="username-error">*Username not found</p>
<input type="password" id="password-input" autocomplete="current-password" placeholder="Password" required>
Expand Down
6 changes: 3 additions & 3 deletions frontend/templates/page_not_found.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
<link rel="stylesheet" href="/static/css/general.css">
<link rel="stylesheet" href="/static/css/page_not_found.css">

<title>Page Not Found - Noted</title>
<title>Page Not Found - MIND</title>
</head>
<body>
<header>
<h1>Noted Reminders</h1>
<h1>MIND Reminders</h1>
</header>
<main>
<h2>Noted</h1>
<h2>MIND</h1>
<p>404 - Page not found :(</p>
<a href="/">Go to home page</a>
</main>
Expand Down
8 changes: 4 additions & 4 deletions frontend/templates/reminders.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<script src="/static/js/settings.js" defer></script>
<script src="/static/js/templates.js" defer></script>

<title>Reminders - Noted</title>
<title>Reminders - MIND</title>
</head>
<body>
<header>
Expand All @@ -32,7 +32,7 @@
</g>
</svg>
</button>
<h1>Noted Reminders</h1>
<h1>MIND Reminders</h1>
</div>
</header>
<div class="nav-divider">
Expand Down Expand Up @@ -63,7 +63,7 @@ <h1>Noted Reminders</h1>
</button>
</div>
<div>
<button id="logout-button" aria-label="Log out of Noted" tilte="Logout">
<button id="logout-button" aria-label="Log out of MIND" tilte="Logout">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" width="256" height="256" x="0" y="0" viewBox="0 0 24 24" style="enable-background:new 0 0 512 512" xml:space="preserve">
<g>
<path d="M11.476,15a1,1,0,0,0-1,1v3a3,3,0,0,1-3,3H5a3,3,0,0,1-3-3V5A3,3,0,0,1,5,2H7.476a3,3,0,0,1,3,3V8a1,1,0,0,0,2,0V5a5.006,5.006,0,0,0-5-5H5A5.006,5.006,0,0,0,0,5V19a5.006,5.006,0,0,0,5,5H7.476a5.006,5.006,0,0,0,5-5V16A1,1,0,0,0,11.476,15Z"></path>
Expand All @@ -81,7 +81,7 @@ <h1>Noted Reminders</h1>
</div>
<div id="reminder-tab">
<div class="search-container">
<noscript>Javascript is disabled. The web-ui of Noted does not work with JavaScript disabled.</noscript>
<noscript>Javascript is disabled. The web-ui of MIND does not work with JavaScript disabled.</noscript>
<form id="search-form">
<div class="search-bar">
<button type="submit">
Expand Down
4 changes: 2 additions & 2 deletions tests/Noted_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

from frontend.api import api
from frontend.ui import ui
from Noted import _create_app
from MIND import _create_app

class Test_Noted(unittest.TestCase):
class Test_MIND(unittest.TestCase):
def test_create_app(self):
result = _create_app()
self.assertIsInstance(result, Flask)
Expand Down
2 changes: 1 addition & 1 deletion tests/db_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import unittest

from backend.db import DBConnection
from Noted import DB_FILENAME, _folder_path
from MIND import DB_FILENAME, _folder_path

class Test_DB(unittest.TestCase):
def test_foreign_key(self):
Expand Down

0 comments on commit 73e8935

Please sign in to comment.