To expand upon previous discussions on Custom Open Commands and how best to enhance exporting selected results with File Export, or a custom open_command $exec(...), etc., I'd like to propose the following:
$export = persistent 'clipboard' of selections, managed by new, key-bindable commands:
$export = persistent 'clipboard' of selections, managed by new, key-bindable commands:
- Result List | Add To Export Buffer (append)
- Result List | Replace Export Buffer (overwrite)
- Result List | Clear Export Buffer
- Result List | Advanced Export/Format (also accessible in File -> Advanced Export/Format, underneath Export)
Advanced Export/Format is a popup dialog similar to Advanced Rename (with Old:, New:, Output preview), and handles both output filenaming with an export button for one-off exports, plus custom formatting. Default formatting resembles Copy Full Path, but a Presets dropdown contains the most common formats (CSV, TSV, JSON, Quotes, Double Quotes, //, \\). There's also a flyout with insertable properties (\n, <uppercase>, <lowercase>, <titlecase>, $count, $number, %% single literal, Insert Property, etc.). And a dropdown for encoding (ANSI, UTF-8, UTF-8-BOM, UTF-16 BE BOM, UTF-16 LE BOM, etc). Presets dropdown includes Add to preset, Organize presets. Regex and wildcards also supported like Advanced Rename.
$export and Advanced Export/Format settings both remain independently persistent until program exit (Format does not reset with Add/Replace/Clear actions), but can each be configured to be persistent across sessions with a True/False in Advanced.
- Unmanaged, meaning a 'scratch' variant of $export where current selection drives the Replace Export Buffer action instead of a command/hotkey.
- Output format is Copy Full Path by default, but can be configured to always inherit current Advanced Export/Format settings either with a True/False in Advanced settings, or with a persistent "Apply to $selection" checkbox in the Advanced Export/Format dialog.
Statistics: Posted by mvdeckard — Tue Sep 10, 2024 10:04 pm