Update Documentation
parent
6e92799c3b
commit
f153fba905
1 changed files with 53 additions and 17 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
1. [Overview](#overview)
|
1. [Overview](#overview)
|
||||||
2. [Features](#features)
|
2. [Build System](#build-system)
|
||||||
3. [Code Structure](#code-structure)
|
3. [Code Structure](#code-structure)
|
||||||
4. [Class Reference](#class-reference)
|
4. [Class Reference](#class-reference)
|
||||||
5. [Function Documentation](#function-documentation)
|
5. [Function Documentation](#function-documentation)
|
||||||
|
|
@ -14,19 +14,48 @@
|
||||||
|
|
||||||
PNG Metadata Editor is a graphical application built with Python and Tkinter that allows users to view, edit, add, and delete metadata in PNG files. The application leverages the Pillow library for PNG manipulation.
|
PNG Metadata Editor is a graphical application built with Python and Tkinter that allows users to view, edit, add, and delete metadata in PNG files. The application leverages the Pillow library for PNG manipulation.
|
||||||
|
|
||||||
## Features
|
## Build System
|
||||||
|
|
||||||
### Core Functionality
|
### build.py Functionality
|
||||||
- **Metadata Viewing**: Display all text chunks (tEXt, zTXt, iTXt) in PNG files
|
|
||||||
- **Metadata Editing**: Add, modify, and delete metadata fields
|
|
||||||
- **JSON Support**: Pretty-print JSON-formatted values
|
|
||||||
- **Clipboard Integration**: Copy metadata values to clipboard
|
|
||||||
|
|
||||||
### UI Features
|
The `build.py` script provides a unified way to build the application across platforms:
|
||||||
- Split-pane view with tree and detail panels
|
|
||||||
- Status bar with temporary messages
|
1. **Dependency Management**:
|
||||||
- Unsaved changes indicator
|
- Checks for `requirements.txt` and installs dependencies
|
||||||
- Responsive dialogs for adding/editing fields
|
- Falls back to default dependencies if file not found
|
||||||
|
|
||||||
|
2. **PyInstaller Handling**:
|
||||||
|
- Verifies PyInstaller is installed
|
||||||
|
- Automatically installs it if missing
|
||||||
|
- Provides clear error messages if installation fails
|
||||||
|
|
||||||
|
3. **Platform-Specific Builds**:
|
||||||
|
- Detects operating system (Windows, macOS, Linux)
|
||||||
|
- Applies appropriate build options for each platform
|
||||||
|
- Includes version information from `version.txt` when available
|
||||||
|
|
||||||
|
4. **Build Process**:
|
||||||
|
```python
|
||||||
|
# Main build workflow:
|
||||||
|
1. Check/install PyInstaller
|
||||||
|
2. Install dependencies
|
||||||
|
3. Determine platform options
|
||||||
|
4. Execute PyInstaller build
|
||||||
|
```
|
||||||
|
|
||||||
|
### Build Requirements
|
||||||
|
|
||||||
|
- Python 3.6+
|
||||||
|
- PyInstaller (auto-installed if missing)
|
||||||
|
- Platform-specific icon files:
|
||||||
|
- `AppIcon.ico` for Windows
|
||||||
|
- `AppIcon.icns` for macOS
|
||||||
|
|
||||||
|
### Build Output
|
||||||
|
|
||||||
|
- Executable is created in the `dist/` directory
|
||||||
|
- Temporary build files are stored in `build/`
|
||||||
|
- Version information is embedded from `version.txt`
|
||||||
|
|
||||||
## Code Structure
|
## Code Structure
|
||||||
|
|
||||||
|
|
@ -37,7 +66,6 @@ png-meta-editor.py
|
||||||
│ ├── __init__() - Initialization
|
│ ├── __init__() - Initialization
|
||||||
│ ├── setup_ui() - UI Construction
|
│ ├── setup_ui() - UI Construction
|
||||||
│ ├── open_file() - File Operations
|
│ ├── open_file() - File Operations
|
||||||
│ ├── save_changes() - Save Functionality
|
|
||||||
│ └── Various helper methods
|
│ └── Various helper methods
|
||||||
└── Supporting Functions
|
└── Supporting Functions
|
||||||
├── format_value_for_display()
|
├── format_value_for_display()
|
||||||
|
|
@ -249,10 +277,18 @@ if app.has_unsaved_changes:
|
||||||
|
|
||||||
## Development Notes
|
## Development Notes
|
||||||
|
|
||||||
### Design Decisions
|
### Build System Improvements
|
||||||
1. **State Management**: Uses `has_unsaved_changes` flag to track modifications
|
1. **Automatic Dependency Installation**:
|
||||||
2. **UI Separation**: Treeview and detail view maintain separate data representations
|
- Script checks for `requirements.txt`
|
||||||
3. **Error Handling**: Graceful degradation with user-friendly messages
|
- Installs dependencies automatically
|
||||||
|
|
||||||
|
2. **PyInstaller Management**:
|
||||||
|
- Verifies PyInstaller installation
|
||||||
|
- Auto-installs if missing
|
||||||
|
|
||||||
|
3. **Platform Detection**:
|
||||||
|
- Automatically applies correct build options
|
||||||
|
- Handles version information consistently
|
||||||
|
|
||||||
### Future Improvements
|
### Future Improvements
|
||||||
- Batch processing for multiple files
|
- Batch processing for multiple files
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue