A secure and private desktop application for writing and managing personal diary entries.
- Secure Storage: All diary entries are encrypted locally to ensure privacy.
- Password Protection: The application requires a password for access.
- Encryption: Uses robust encryption algorithms to protect your data.
- Multiple Views:
- Write new entries with mood tracking.
- View all entries in a chronological list.
- View entries grouped by date.
- Data Migration: Supports migration of data from older versions.
- Cross-Platform: Built with Python and Tkinter, making it potentially cross-platform (though specific OS features for key/data storage are handled).
The application requires the following Python packages:
- cryptography
- PyInstaller (for building)
- pytest (for testing)
- pytest-cov (for test coverage)
These can be found in requirements.txt
.
-
Clone the repository:
git clone <repository_url> cd personal-diary-project # Or your project's directory name
-
Create a virtual environment (recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Initial Run & Setup:
- On the first run, the application will guide you through creating an encryption key and setting up a password if they don't already exist.
- The encryption key (
.key.key
) and password file (.password.txt
) are stored in a platform-specific application data directory (e.g.,~/.local/share/PersonalDiary
on Linux,~/Library/Application Support/PersonalDiary
on macOS,%APPDATA%\PersonalDiary
on Windows).
To run the application:
python diary_app.py
diary_app.py
: Main entry point for the application.diary/
: Core application modules.auth.py
: Handles user authentication and password management.crypto.py
: Manages encryption and decryption of data.storage.py
: Handles reading and writing diary entries.ui/
: Contains the user interface components (Tkinter based).main_window.py
: The main application window.write_tab.py
,view_tab.py
,date_tab.py
: UI for different sections.
requirements.txt
: Lists project dependencies.setup.py
: Script for packaging (though PyInstaller is preferred for executables).build_app.py
: Script to facilitate building the application using PyInstaller.PersonalDiary.spec
: PyInstaller specification file.tests/
: Contains unit tests for the application..github/
: Contains GitHub Actions workflows (e.g., for CI).LICENSE
: Project's license file.README.md
: This file.
You can build a standalone executable using PyInstaller:
- Ensure PyInstaller is installed:
pip install PyInstaller
- Run the build script:
This will use the
python build_app.py
PersonalDiary.spec
file to create a distributable application in thedist
folder.
Contributions are welcome! If you'd like to contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix (
git checkout -b feature/your-feature-name
). - Make your changes.
- Add tests for your changes if applicable.
- Ensure all tests pass (
pytest
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature-name
). - Open a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.