#+title: Pipeline for FIT file post processing * Prerequisites + bash + java + awk + node * Usage #+begin_src sh $ GARMIN_PWD="my_garmin_pwd" ./fit-pipeline.sh CE5470D544BEC294_20231022_164826_c.fit #+end_src * Pipeline steps 1. Convert FIT file to CSV using FitCSVTool.jar (a tool from Garmin's FIT SDK) 2. Update default power data (trainer data) with secondary power data (bike data) in the CSV file using awk 3. Convert the modified CSV file to FIT file 4. Upload the modified FIT file to Garmin Connect * Environment variables + FIT_PIPELINE_DIR - install directory of the pipeline scripts; defaults to the main bash script's module directory + FIT_PIPELINE_TMP_DIR - directory of temporary files; defaults to "$FIT_PIPELINE_DIR/tmp" + FIT_PIPELINE_RESULT_DIR - directory of the modified FIT files; defaults to "$FIT_PIPELINE_DIR/result" + GARMIN_USER - Garmin Connect username + GARMIN_PWD - Garmin Connect password