Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Add date and time variables to "Auto Naming Format" #55

Closed
leo-nightfever opened this issue Jan 2, 2024 · 1 comment · Fixed by #57
Closed

[FEATURE REQUEST] Add date and time variables to "Auto Naming Format" #55

leo-nightfever opened this issue Jan 2, 2024 · 1 comment · Fixed by #57

Comments

@leo-nightfever
Copy link

leo-nightfever commented Jan 2, 2024

I love this project and it really improved my OpenSCAD workflow.

I just went through the settings and found the Auto Naming Format. My usual export name is filename_yyyyMMdd-mmhh.stl which I do by hand at the moment.

Thanks in advance!

EDIT: I did look through your documentation as well as the linked one from VisualStudio, but this doesn't seem to be implemented yet.

@Antyos
Copy link
Owner

Antyos commented Jan 2, 2024

Thanks for the feature request! Yes, this has been on my todo list since the very beginning of making this extension, I've just never gotten around to it.

The templating is handled by https://github.com/Antyos/vscode-openscad/blob/master/src/export/variable-resolver.ts. It would be a fairly straightforward process to implement. I'm thinking of using the syntax ${date:YYYY-MM-DD}, or whatever other tokens you want. Luxon seems like a good library that supports this: https://moment.github.io/luxon/#/formatting?id=table-of-tokens. I think I was waiting to implement variable substitution as described in #51, but implementation of dates is significantly easier.

I'm not sure when I'll have time to implement this (I'm about to go out of town for a week), but I may have time after I get back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants