companion icon indicating copy to clipboard operation
companion copied to clipboard

feat: allow custom export file name

Open bryce-seifert opened this issue 1 year ago • 3 comments

This adds the a config field to customize export file names to aid with organization of config exports. It partially addresses https://github.com/bitfocus/companion/issues/3075

Screenshot 2024-10-15 at 8 55 15 PM

bryce-seifert avatar Oct 16 '24 01:10 bryce-seifert

@bryce-seifert did you try to investigate variable parsing as part of adding this field?

krocheck avatar Oct 16 '24 03:10 krocheck

I did look at parsing, but was not sure how to get that functional. If you have any pointers or ideas, happy to investigate more. I'm curious how much variables would be used, too, since this modal is ephemeral, so you'd have to enter variables every time. Perhaps that issues is solved outside of this modal, but not sure where best to do it

bryce-seifert avatar Oct 16 '24 23:10 bryce-seifert

@bryce-seifert I hear you on attempting to figure out how to handle and being confused. That's why I asked and got an appropriate response. To properly implement to the issue referenced, we probably need a default_export_filename userconfig value with a default just as that user prescribes.

I like what you're doing here, as its attempting to respond to #3075. I get its not ephemeral, but I'd challenge you to reach beyond that as I've described and reach out to me or Julian in Slack if you need help or inspiration.

krocheck avatar Oct 17 '24 00:10 krocheck

@krocheck I have worked on adding the default_export_filename to the user config that allows for variables, as well as added the ability to override the default and use variables in all of the export modals. Let me know what suggestions you have on the implementation

Here's the new user config, which defaults to a similar format as the current export defaults Screenshot 2024-10-21 at 8 48 55 PM

Here's the file name parameter in the custom export modal Screenshot 2024-10-21 at 8 49 02 PM

And the file name parameter in the other export modal used for pages and triggers Screenshot 2024-10-21 at 8 49 26 PM

bryce-seifert avatar Oct 22 '24 01:10 bryce-seifert