Improve export folder to custom one (#2439)

* Improve export folder to custom one

* improve based on Darren feedback

Co-authored-by: James Maslek <jmaslek11@gmail.com>
This commit is contained in:
DidierRLopes
2022-08-28 04:25:07 +03:00
committed by GitHub
parent c30a8de32f
commit 97312178b6
2 changed files with 6 additions and 2 deletions

View File

@@ -476,6 +476,8 @@ class SettingsController(BaseController):
help="Folder where to export data. 'default' redirects to OpenBB Terminal 'exports'",
default="default",
)
if other_args and "-" not in other_args[0][0]:
other_args.insert(0, "--folder")
ns_parser = parse_simple_args(parser, other_args)
if ns_parser:
@@ -489,7 +491,9 @@ class SettingsController(BaseController):
export_path += "/".join([ns_parser.folder] + self.queue)
self.queue = []
base_path = os.path.dirname(os.path.abspath(__file__))
export_path = export_path.replace("'", "").replace('"', "")
base_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
default_path = os.path.join(base_path, "exports")
success_export = False

View File

@@ -397,7 +397,7 @@ tweak how the terminal behaves. This includes the following:
- `dt` adds or removes the datetime from the flair (which is next to the emoji).
- `flair` allows you to change the emoji that is used.
- `lang` gives the ability to change the terminal language. At this moment, the terminal is only available in English.
- `export` defines the folder you wish to export data to you acquire from the terminal.
- `export` defines the folder you wish to export data you acquire from the terminal. Use quotes for custom locations.
- `tz` allows you to change the timezone if this is incorrectly displayed for you.
- `autoscaling` automatically scales plots for you if enabled (when green).
- `pheight` sets the percentage height of the plot (graphs) displayed (if autoscaling is enabled).