Notolog - Python Markdown Editor
Project description
Notolog
Python Markdown Editor
Notolog is an open-source Markdown editor that combines simplicity with advanced features. Developed entirely in Python using PySide6, it helps you tackle everyday programming challenges while offering an opportunity to deepen your Markdown and Python skills by exploring its codebase. Featuring a wide range of tools and integrated AI assistant support, Notolog is a valuable addition to any Python project requiring a versatile Markdown editor. Installation is as simple as: pip install notolog
Features
- Open-source and Transparent: Licensed under MIT, promoting transparency and collaboration.
- Markdown Support:
- Editor mode with smooth highlighting, line numbers, and extended syntax.
- View mode, which uses the Python Markdown library for accurate rendering to HTML.
- Improves readability and structure through custom parsing of disclosure widgets, including nested hierarchies.
- Supports multi-line block open-close tokens.
- AI Assistant: Incorporate module extensions able to work either with AI APIs or with on-device large language models (LLMs).
- Accessibility Features:
- Descriptive elements for enhanced usability.
- Adjustable font sizes for improved readability.
- Auto-Save: Changes are saved automatically, ensuring that data is not lost unexpectedly.
- Enhanced Search Functionality:
- In-file content search.
- Quick file name search within the file tree.
- File Encryption:
- Securely encrypts files using Fernet, which employs AES-128 in CBC mode, providing strong encryption.
- File Meta-Headers:
- Stores essential file information securely in meta-headers formatted as HTML comments, thus enhancing privacy and security.
- Multi-language Support: Available in several languages, with easy addition of new languages.
- Customizable UI:
- Multiple color themes for personalization.
- Supports hotkeys like Ctrl+S (save) and Ctrl+F (search).
- Right-click context menus for file management in the file tree.
- TODOs Highlighting: Notolog includes specialized highlighting for TODOs. By typing '@todo something,' users can mark tasks, thus enhancing the ability to track and manage future plans efficiently.
- Unit Testing Suite: Ensures reliability and maintainability of the code.
Remember: Strong password enforcement is recommended to protect access to encrypted files.
Translations
Notolog supports multiple languages out of the box, enhancing its accessibility on a global scale. In addition to English, here are the currently supported languages:
- Chinese (Simplified), Dutch, Finnish, French, Georgian, German, Greek, Hindi, Italian, Japanese, Korean, Latin, Portuguese, Russian, Spanish, Swedish, Turkish
Themes
Notolog offers several themes that allow users to choose their preferred UI color scheme:
- Default: Every app should have a default theme.
- Calligraphy: Inspired by the art of calligraphy, this theme resembles a rice paper sheet marked with black ink.
- Nocturne: A dark-themed UI that plays a jazz nocturne at night.
- Noir Dark: This theme's name says it all - mystery and style in every pixel.
- Spooky: Embrace the spooky season with vivid Halloween-themed colors.
- Strawberry: The most playful theme, reminiscent of strawberry jam.
Below is a glimpse of the UI in Japanese, featuring the Strawberry theme:
Prerequisites
Ensure Python 3.9 or higher is installed on your system. For installation details, visit python.org.
Check the installed Python version:
python3 --version
Verify pip availability:
pip --version
Virtual Environment
Using a virtual environment is highly recommended to avoid version conflicts and interference from other packages.
Installation
Using pip (Recommended)
Set up a virtual environment (highly recommended):
python3 -m venv notolog_env
Activate the virtual environment:
On Unix-like systems (macOS and Linux):
source notolog_env/bin/activate
On Windows:
notolog_env\Scripts\activate
Install Notolog using pip:
pip install notolog
Starting the app is as simple as running:
notolog
To update Notolog to the latest version:
pip install notolog --upgrade
Using conda-forge
To install Notolog using conda-forge, first ensure your conda environment is using Python 3.9 or higher. You can create a new environment with the required Python version using:
conda create -n notolog_env python=3.9
Activate the virtual environment:
conda activate notolog_env
Then, execute the installation command:
conda install -c conda-forge notolog
This will fetch and install the latest version of Notolog compatible with Python 3.9 or newer from the conda-forge packages.
Run Notolog:
notolog
Just activate the environment and run the app next time.
From Source
To install from source:
- Clone the GitHub repository:
git clone https://github.com/notolog/notolog-editor.git
- Navigate to the project directory:
cd notolog-editor
- Set up a virtual environment (highly recommended):
python3 -m venv notolog_env
Activate the virtual environment:
On Unix-like systems (macOS and Linux):
source notolog_env/bin/activate
On Windows:
notolog_env\Scripts\activate
- Install dependencies:
pip install .
- Start Notolog using:
python -m notolog.app
Tests and Test Coverage
To minimize installation overhead and streamline dependency management, dependencies required solely for testing are isolated in test-specific requirements.
To install these dependencies, run: python dev_install.py test
. The tomli
package is required to execute this script; you can install it using pip install tomli
.
This approach helps manage test dependencies independently from the main application dependencies, ensuring a cleaner and more manageable setup.
Run Tests
To execute all available tests:
pytest
To run tests from a specific file:
pytest tests/test_pkg_integration.py
Run Tests with Coverage Reports
To run all tests with a coverage report:
pytest tests/ --cov=notolog --cov-report=term
Alternatively, to exclude UI tests from execution:
pytest tests/ --cov=notolog --cov-report=term --ignore=tests/ui_tests/
Dev Tools
To maintain high standards of code quality and ensure comprehensive test coverage, we utilize several development tools. Flake8, which combines PyFlakes, pycodestyle, and McCabe's complexity checker, is employed to enforce code quality, manage code complexity, and ensure adherence to PEP 8 style conventions.
To install these dependencies, run: python dev_install.py dev
. The tomli
package is required to execute this script; you can install it using pip install tomli
.
Build Tools
Make sure poetry-core
and build
are installed:
pip install poetry-core build
The following command generates distribution packages. Specifically, it creates both a source distribution and a wheel distribution:
python -m build
Virtual Environments
The instructions below contain steps of how to set up venv virtual environment to run a Python app safely. Starting from Python 3.6 venv is a recommended way to create virtual environments. For more information check Creation of virtual environments. Alternatively, you can execute the Notolog code and set up virtual environment with your favorite Python code editor.
Linux and macOS
Set Up Virtual Environment
- Open Terminal.
- Navigate to your project directory using the cd command.
- Create a virtual environment by running
python3 -m venv notolog
. Replace notolog with the desired name for your virtual environment.
Activate Virtual Environment:
To activate the virtual environment, run:
source notolog/bin/activate
To deactivate environment just run this command:
deactivate
Install venv on Linux systems
While Python itself comes pre-installed on many Linux distributions, including Ubuntu, some distributions may not include the venv module by default. Therefore, you need to install it separately using the package manager before you can use it to create virtual environments.
Ubuntu/Debian
sudo apt-get update
sudo apt-get install python3-venv
Fedora
sudo dnf install python3-venv
CentOS/RHEL
sudo yum install python3-venv
Windows
Set Up Virtual Environment
- Open Command Prompt or PowerShell.
- Navigate to your project directory using the
cd
command. - Create a virtual environment by running
python -m venv notolog
. Replace notolog with the name you want to give to your virtual environment.
Activate Virtual Environment
To activate the virtual environment, run:
notolog\Scripts\activate
Mind the environment name (notolog or any other selected before).
Contributing
If you encounter any issues or would like to contribute to the project, please don't hesitate to open an issue or submit a pull request on the project's GitHub page.
License
The Notolog project is licensed under the MIT License - see the LICENSE file for details.
Third-Party Acknowledgements
This project incorporates various third-party libraries and components, each subject to their own licenses. These packages may also install additional dependencies necessary for their functionality. For detailed information about these components and their licenses, please see the ThirdPartyNotices.md file.
Users and contributors are encouraged to consult this document to fully understand the licensing obligations and acknowledgements related to these third-party components.
AI Integration Disclaimers
OpenAI API
Disclaimer: This project is independent and not affiliated with, endorsed by, or sponsored by OpenAI. The OpenAI API is integrated 'as is'. The creators disclaim liability for misuse or any consequences arising from this integration.
Usage: This project uses the OpenAI API to access AI assistant capabilities, and enhance natural language processing. Users must provide their own OpenAI API keys and should refer to the OpenAI API reference for detailed usage guidelines.
Responsibility: Users are responsible for obtaining and managing their OpenAI API keys in compliance with OpenAI's terms of service.
Security: Users are expected to handle their API keys securely to avoid unauthorized access.
This section was generated with the assistance of AI to ensure accurate and concise information regarding the use of the OpenAI API.
ONNX Runtime GenAI
Disclaimer: The 'On Device LLM' module, part of this application, utilizes the ONNX Runtime functionality to provide specialized capabilities for generative AI features. The application is an independent project and is not officially associated with ONNX Runtime, maintained by Microsoft, or with any other third-party entities.
Security Disclaimer
File Encryption
- Encryption Details: Notolog uses PBKDF2HMAC for key derivation and Fernet for encryption, which employs AES-128 in CBC mode. Although 256-bit key material is generated, only the first 128 bits are utilized for encryption. Future updates aim to enhance security by employing the full 256 bits.
File Meta-Headers
- Privacy by Design: Essential file information is stored securely in meta-headers formatted as HTML comments, enhancing privacy and security.
Data Integrity and Security
- Auto-Save Feature: Changes are automatically saved, minimizing the risk of data loss.
- Password Protection: Strong password practices are recommended to safeguard access to encrypted files.
General Information
- Open Source: This application is open-source, licensed under the MIT License. Users must comply with applicable laws and regulations when using this software.
- Liability: The developers disclaim any liability for misuse or legal non-compliance related to the use of this software.
Trademark Disclaimer
All company names, product names, logos, and brands mentioned in this document, code, or comments are the property of their respective owners. All company, product, and service names used in this document, code, or comments are for identification purposes only. Use of these names, logos, and brands does not imply endorsement or affiliation. Mention of third-party names, logos, and brands is solely for identification and does not constitute an endorsement or affiliation with any trademark holder.
This README.md file has been carefully crafted and edited using the Notolog editor itself.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file notolog-1.0.5.tar.gz
.
File metadata
- Download URL: notolog-1.0.5.tar.gz
- Upload date:
- Size: 957.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e1189a207109fea858b1fb2435e7c0971ebfc376ef4907da35105b1a2acfcf6 |
|
MD5 | 2761aeb0e31467dd714f4ce4b0319a10 |
|
BLAKE2b-256 | 7ec83ac9bbc30ac34b6e87be47c051e3d877e68897b11eb81a3be113f6c88c55 |
File details
Details for the file notolog-1.0.5-py3-none-any.whl
.
File metadata
- Download URL: notolog-1.0.5-py3-none-any.whl
- Upload date:
- Size: 1.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12cb0f7d78d86762adb42dbab7c36c30dd71daad6af82d37475fe2900acc9b94 |
|
MD5 | f3cf2a2f808137544ea8c5b152ffb5e0 |
|
BLAKE2b-256 | f4ffd0976a34909819faa4093433c4d2d3278b763b2b3b55715f8fb6c0d39b19 |