/**
  * Configures the current command.
  */
 protected function configure()
 {
     parent::configure();
     $cwd = getcwd() . DIRECTORY_SEPARATOR;
     $this->setName('dump:multi')->setDescription('Fetch multiple workouts from a tracker and save each one of them into a folder.')->addArgument('tracker', InputArgument::OPTIONAL, 'The tracker to dump from (ex: polar, endomondo). Optional only if provided a resume list.')->addArgument('output-format', InputArgument::OPTIONAL, 'The format to dump it.', 'tcx')->addOption('output-directory', 'd', InputOption::VALUE_REQUIRED, 'The directory where to dump the workouts.', $cwd . 'dump')->addOption('output-overwrite', 'o', InputOption::VALUE_NONE, 'Flag to auto overwrite the file if it already exists.')->addOption('output-files-list', 'l', InputOption::VALUE_REQUIRED, 'The file with the list of workouts to dump.', $cwd . 'dump' . DIRECTORY_SEPARATOR . 'list.csv')->addOption('date-start', 's', InputOption::VALUE_REQUIRED, 'The start date from where to start dumping workouts', 'today')->addOption('date-end', 'e', InputOption::VALUE_REQUIRED, 'The end date from where to start dumping workouts', 'now')->addOption('list-only', null, InputOption::VALUE_NONE, 'Flag if only the list should be generated and not also processed.')->addOption('resume-list', 'r', InputOption::VALUE_REQUIRED, 'Resume a multi dump from a dump list file.');
 }
 /**
  * Configures the current command.
  */
 protected function configure()
 {
     parent::configure();
     $this->setName('upload:workout')->setDescription('Upload a workout file to a tracker.')->addArgument('tracker', InputArgument::REQUIRED, 'The tracker to upload (ex: polar, endomondo).')->addArgument('workout-file', InputArgument::REQUIRED, 'The path to the workout file to upload.');
 }
예제 #3
0
 /**
  * Configures the current command.
  */
 protected function configure()
 {
     parent::configure();
     $cwd = getcwd() . DIRECTORY_SEPARATOR;
     $this->setName('dump:workout')->setDescription('Fetch a workout from a tracker and save it to a file.')->addArgument('tracker', InputArgument::REQUIRED, 'The tracker to dump from (ex: polar, endomondo).')->addArgument('id-workout', InputArgument::REQUIRED, 'The ID of the workout to dump.')->addArgument('output-format', InputArgument::OPTIONAL, 'The format to dump it.', 'tcx')->addOption('output-file', 'f', InputOption::VALUE_REQUIRED, 'The path to the output file.', $cwd . '/dump/[ID].[FORMAT]')->addOption('output-overwrite', 'o', InputOption::VALUE_NONE, 'Flag to auto overwrite the file if it already exists.');
 }