Closed alexander-haller closed 4 months ago
In GitLab by @mhxion on Nov 6, 2023, 24:56
requested review from @alexander-haller
Very good
approved this merge request
In GitLab by @mhxion on Nov 9, 2023, 15:02
I am glad you liked it! : ) Thanks for approving.
In GitLab by @mhxion on Nov 9, 2023, 15:02
resolved all threads
In GitLab by @mhxion on Nov 6, 2023, 24:56
Merges new-export-behavior -> dev
Export
Fixes #2. Export function now is as powerful as shell redirection. It acts almost exactly the same way as before.
--export
as a flag: When--export
is passed without any following value/path, it acts as a flag, andexport_dir
value fromelapi.yaml
configuration file is used. It should be clear thatexport_dir
in a configuration file only accepts a directory path.*--export
to a directory: If a directory path is provided as a value, i.e.,--export <path/to/directory>
, then that path is used instead. When the path is a directory, the file name is auto-generated using the following scheme:DATE_HHMMSS_<FUNCTION>.EXT
(NEW)
--export
to a file: Exporting always to a directory with a fixed file name scheme poses some issues.To address those issues,
--export
now supports a path to a direct file as well. When a file path is passed, i.e.,--export <path/to/file.json>
, then data is simply exported to that file. A few examples:When export is successful, a success message including the full file path will always be printed.
show-config
command can always be run to see which export path will be used when no path is explicitly passed to--export
. As always,show-config
is there to alleviate any confusion with the fallback order.Format
Previously, we could pass desired format for returned data with the argument
--output
or-o
. You mentioned in the past, how the term--output
could get confusing. And now it does the most since we currently have both--export
and--output
! This PR renames--output
/-o
to--format
/-F
. Example: