Note Editor Documentation


Introduction

Note Editor is a feature-rich text editor built using PySide6. It offers functionalities such as file operations, PDF export, spell checking, word count, theme toggling, and an offline dictionary using NLTK's WordNet.


Getting Started

To run the Note Editor, ensure you have Python installed along with the required libraries. Follow these steps:

  1. Clone the repository or download the source code.
  2. Install the required dependencies using pip:
pip install -r requirements.txt
  1. Download NLTK's WordNet data:
python -c "import nltk; nltk.download('wordnet'); nltk.download('omw-1.4')"
  1. Run the application:
python main.py

Modules


Features


Classes & Methods

MainWindow

Main window controller of the app.

__init__()
Initializes the UI and connects actions.
open_file()
Opens a file dialog and loads the selected file.
save_file()
Saves the current document to disk.
export_pdf()
Exports the current document to a PDF file.

Editor

Text editor component.

set_text(content)
Sets the editor text.
get_word_count()
Returns the number of words in the document.
check_spelling()
Runs spell checking on the current text.

MenuBar

Application menu component.

build_menus()
Creates the menu structure and actions.
connect_actions()
Connects menu actions to callbacks.

Conclusion

This documentation provides an overview of the Note Editor project, its setup steps, module structure, features, and the main classes involved.