Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sneetsher/gpx-renamer
File renamer for GPX traces
https://github.com/sneetsher/gpx-renamer
Last synced: 1 day ago
JSON representation
File renamer for GPX traces
- Host: GitHub
- URL: https://github.com/sneetsher/gpx-renamer
- Owner: sneetsher
- License: gpl-3.0
- Created: 2021-10-03T22:45:43.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-07T19:38:43.000Z (almost 3 years ago)
- Last Synced: 2023-07-28T21:09:21.568Z (about 1 year ago)
- Language: Python
- Size: 218 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gpx-renamer
File renamer for GPX traces
### Description
Small script to parse and rename GPX file based on its data like start date, recorded length, GPS bound coordinates, towns passed through (using offline reverse-geocode module).
### General workflow
# move gpx files out of subdirectories (Like OSMTracker structure)
mv */*.gpx .# delete empty folders
find . -type d -delete# simulate renaming
gpx-renamer-short -s *.gpx# rename for real
gpx-renamer-short -r *.gpx### CLI help
usage: gpx-renamer [-h] [-c] [-d] [-f FORMAT] [-l] [-t] [-r] [-s] files [files ...]
File renamer for GPX traces.
positional arguments:
files files to be processedoptional arguments:
-h, --help show this help message and exit
-c, --copy copy instead of rename/move
-d, --debug activate debug output, can be used to see all Format keywords
-f FORMAT, --format FORMAT
use custom format
-l, --long use long format for name: {startdate}-{starttime}_{minlat},{minlon}-{maxlat},{maxlon}_{cities}_{length}_{points}
-t, --short use short format for name: {startdate}-{starttime}_{minlat},{minlon}-{maxlat},{maxlon}_{edges}_{length}
-r, --rename rename, defaut is using minimum format: {startdate}-{starttime}_{edges}
-s, --simulate dry runHelper proxies: gpx-renamer-min same as using -r, gpx-renamer-short same as using -r -t, gpx-renamer-long same as using -r -l
### Why need such tool?
- When using multiple recording devices, each has its own trace naming convension. Seems more effective to keep file in chronical order. Ex: `YYYYMMDD` is sortable better than other date formats.
- Categorize GPX based on covered location (city, town, geocode) in automated way.
- Easier to tag when uploading to Open Street Map OSM.### Dependencies
- `gpxpy`
- `reverse-geocode`### Installation from source
#day1
pip3 install -q build#day2
python3 -m build
pip3 install dist/gpx-renamer-0.0.1.tar.gz### PyPI upload new modified source
#day1
pip3 install twine#day2
twine upload dist/*### Related Resources
- [Best practices file naming](https://library.stanford.edu/research/data-management-services/data-best-practices/best-practices-file-naming)
### Useful tools
- [Validation](https://www.topografix.com/gpx_validation.asp)
saxcount -v=always -n -s -f file.gpx
- Validation using `gpxpy`
gpxinfo file.gpx
- Split tracks using `gpxutils`
gpxclean -n -s 1000 file.gpx
- Generate map using `papermap`
papermap -sc 10000 wgs84 36.78189 5.90056 Taher.pdf`
- Splice and clean GPX using GPSPrune (GUI tool)