A tool for editing GPX files, specifically designed for moving and copying attributes between waypoints
Project description
GPX Editor
A tool for editing GPX files, specifically designed for moving and copying attributes between waypoints.
Features
- Copy attributes between waypoints
- Swap attributes
- Apply operations to all waypoints
- Process multiple GPX files with batch operations
- Preview attribute values before making changes
- Undo/redo functionality
- Automatic backups
- Prefix/suffix options for batch file saving
- File type preservation
- Directory-based file renaming with abbreviations
- Both GUI and CLI interfaces
- Safety features to prevent modifying critical attributes
Installation
Using Poetry (Recommended)
# Install dependencies with Poetry
poetry install
# Run the application
poetry run python -m gpx_editor
Using pip
pip install -r requirements.txt
python -m gpx_editor
Usage
GUI Mode
The GPX Editor GUI follows a logical workflow:
- Select Files: Choose one or more GPX files to work with
- View Attributes: After file selection, attributes are loaded automatically
- Select Operation: Choose to copy or swap attributes
- Execute Operation: Perform the operation in memory
- Save Files: Save changes only when you're ready
poetry run python -m gpx_editor
Multiple File Processing
The GPX Editor supports batch processing of multiple files:
- Select multiple files using the file selection panel
- Choose attributes and operations to perform
- Execute operations on all files
- Save all modified files with optional prefix/suffix
Attribute Preview
Before making changes, you can preview attribute values:
- View attribute values for the current file in the Preview tab
- Use "Show Batch Preview" to see the same attribute across all selected files
CLI Mode
The command-line interface supports all core operations:
# Copy an attribute
poetry run python -m gpx_editor --input input.gpx --output output.gpx --copy description name
# Swap attributes
poetry run python -m gpx_editor --input input.gpx --output output.gpx --swap description name
# Apply to all waypoints
poetry run python -m gpx_editor --input input.gpx --output output.gpx --copy description name --all
# Rename file based on directory structure
poetry run python -m gpx_editor --input path/to/your/gpx/file.gpx --rename
Directory-Based File Renaming
The GPX Editor can rename files based on their directory structure:
- Applies abbreviations to directory names (2-3 letters)
- Excludes the original filename
- Uses hyphens as separators (e.g., "D3-D2-D1.gpx")
- Reverses the order of directories (deepest directory first)
Example: For a file path north/mountain/trail/hiking_route.gpx, the new filename would be TRL-MTN-N.gpx
Sample Files
The samples directory contains example GPX files for testing:
sample1.gpx- Basic waypoints with standard attributessample2.gpx- Different location with additional attributessamples/north/mountain/trail/hiking_route.gpx- For testing directory-based renaming
Project Structure
.
├── gpx_editor/ # Main package directory
│ ├── __init__.py # Package initialization
│ ├── __main__.py # Entry point
│ ├── abbreviations.py # Static abbreviation class (2-3 letters)
│ ├── cli.py # Command-line interface using argparse
│ ├── editor.py # Core GPX editing functionality
│ └── gui.py # Tkinter-based GUI interface
├── samples/ # Sample GPX files for testing
├── pyproject.toml # Poetry configuration
├── requirements.txt # Pip dependencies
├── README.md # Project documentation
└── PROJECT_PLAN.md # Development plan and checklist
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gpx_editor-1.0.0.tar.gz.
File metadata
- Download URL: gpx_editor-1.0.0.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.9.22 Linux/6.11.0-1012-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcfb10ee2ed45d1d9d310b5911b946d6c69e3cc6097d464e619213cf0ddceb65
|
|
| MD5 |
35f2ff3e08cdf15a27a44d272f481d36
|
|
| BLAKE2b-256 |
8efa9185b63602004632f910223636a581ccf1171c5df36994692042b939c3b1
|
File details
Details for the file gpx_editor-1.0.0-py3-none-any.whl.
File metadata
- Download URL: gpx_editor-1.0.0-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.9.22 Linux/6.11.0-1012-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11efa8e984b187cb4ef1d81b954311529816df6faf0bc54633d102f8256d5604
|
|
| MD5 |
88ba19c41baa0a62ede67706f2f85ae8
|
|
| BLAKE2b-256 |
cb6855563708350f49b786bab58122d3e7039842a4fa1b9a9238bdae90bba9fb
|