Initial version
This commit is contained in:
commit
8680f22a6e
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
FROM python:3.9
|
||||||
|
# Or any preferred Python version.
|
||||||
|
ADD main.sh /root/
|
||||||
|
ADD convertAllFits.py /root/
|
||||||
|
ADD https://raw.githubusercontent.com/dodo-saba/fit2gpx/refs/heads/main/src/fit2gpx.py /root/
|
||||||
|
RUN pip install --no-cache-dir --upgrade pip && \
|
||||||
|
pip install --no-cache-dir pandas gpxpy fitdecode
|
||||||
|
CMD ["/bin/sh", "/root/main.sh"]
|
||||||
|
# Or enter the name of your unique directory and parameter set.
|
9
Readme.md
Normal file
9
Readme.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Sigma Rox 4 file converter
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
docker build .
|
||||||
|
|
||||||
|
## Execution
|
||||||
|
|
||||||
|
docker run -v /tmp:/container/directory sha256:<last line of build script>
|
16
convertAllFits.py
Normal file
16
convertAllFits.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
from fit2gpx import Converter
|
||||||
|
from os import listdir
|
||||||
|
from os.path import isfile, join
|
||||||
|
|
||||||
|
mypath='/container/directory'
|
||||||
|
|
||||||
|
onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))]
|
||||||
|
|
||||||
|
conv = Converter()
|
||||||
|
|
||||||
|
for f in onlyfiles:
|
||||||
|
if "activity_uncompleted" in f:
|
||||||
|
print(" Ignore" + f)
|
||||||
|
elif f.endswith(".fit"):
|
||||||
|
print(mypath+'/'+f)
|
||||||
|
gpx = conv.fit_to_gpx(f_in=mypath+'/'+f, f_out=mypath+'/'+f+'test.gpx')
|
Loading…
Reference in New Issue
Block a user