This is a lightweight, command-line based note-taking application written in Python. It allows users to create, view, edit, and delete notes, all of which are stored in a JSON file for persistence.
- Create new notes with a title and content
- View all existing notes
- Edit the content of a note
- Delete a note by title
- Saves notes to
notes.jsonso they're available between sessions
- Python 3.x installed on your machine
-
Clone or download the script
-
Open a terminal and navigate to the directory containing the script
-
Run the script with:
python your_script_name.py
Replace
your_script_name.pywith the actual file name.
After running, you will see a menu:
Notes
Type 1 to create a new note
Type 2 to view all notes
Type 3 to delete a note
Type 4 to edit an existing note
Type 5 to quit
Follow the prompts to manage your notes.
Notes are stored in a file named notes.json in the same directory.
If the file doesn't exist, it will be created automatically on your first save.
- Note class: Represents individual notes with
titleandcontent - save_notes(): Writes all current notes to
notes.json - load_notes(): Loads notes from
notes.jsoninto memory at the start of each loop iteration
-
Create a new note
Title:Meeting
Content:Discuss project roadmap -
View all notes
Output:
Meeting: Discuss project roadmap -
Edit the note
New content:Discuss updated project roadmap -
Delete the note
Confirmation:Note deleted
- Each note must have a unique title
- Notes are reloaded from disk in each loop iteration for consistency and file sync
This project is provided as-is for educational or personal use.