Masonry MemoPad is a simple, curses-based memo pad application that organizes notes in a masonry-style grid layout. It is designed to be minimalistic and user-friendly, with a focus on functionality and simplicity.
- Masonry Grid Layout: Notes are displayed in a grid layout, with each note dynamically adjusting its height based on its content.
- Interactive Commands:
- Add a New Note: Press
nto add a new note. You will be prompted to enter the note text. - Save Notes: Press
sto save all notes to a JSON file (memopad.json). - Quit: Press
qto exit the application. - Scroll: Use the arrow keys (
↑and↓) to scroll through the notes if the content exceeds the terminal height. - Edit Last Note: Press
eto edit the last note. - Clear All Notes: Press
cto clear all notes.
- Add a New Note: Press
- Persistence: Notes are saved to a JSON file and loaded automatically when the application starts. Initial notes are permanent and cannot be deleted.
- Responsive Layout: The number of columns adjusts based on the terminal width, ensuring an optimal viewing experience.
- Japanese Input Support: The application supports Japanese and other multi-byte character inputs.
- Install Python: Ensure you have Python installed on your system.
- Install
windows-curses(Windows Only): If you are using Windows, install thewindows-cursespackage by running:pip install windows-curses
- Save the
memo.pyfile to your desired directory. - Run the application using the following command:
python memo.py
- Interact with the memo pad using the commands described in the Features section.
memo.py: The main Python script containing the application logic.memopad.json: The JSON file used for saving and loading notes. This file is created automatically when you save notes.
- Adding Notes: When you press
n, you are prompted to enter the text for a new note. The note is then added to the grid. - Saving Notes: Pressing
ssaves all notes tomemopad.json. If the file already exists, it is overwritten. - Grid Layout: Notes are arranged in columns. The number of columns is determined based on the terminal width, with a maximum of 4 columns. Each note adjusts its height to fit its content.
- Scrolling: If the content exceeds the terminal height, you can scroll up and down using the arrow keys.
- Editing Notes: Press
eto edit the last note. The application ensures the prompt fits within the terminal width. - Clearing Notes: Press
cto clear all notes. Permanent initial notes will remain. - Persistence: When the application starts, it loads notes from
memopad.jsonif the file exists. Initial notes are always loaded first and cannot be deleted. - Japanese Input: The application supports Japanese and other multi-byte character inputs.
- The application is designed to work in a terminal environment.
- It avoids dependencies beyond the Python standard library and
curses. - On Windows, the
windows-cursespackage is required to enablecursesfunctionality.
This project is open-source and available under the MIT License.