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

Option to replace space character with Underscore automaticaly in gcode file name #1518

Closed
supermerill opened this issue Aug 30, 2021 · 9 comments
Labels
enhancement fix is live in the last release Please download /build the last release and try to reproduce.

Comments

@supermerill
Copy link
Owner

see #1516
``
This is a QOL idea, and one that is more of a workaround that may benefit Klipper users.

It appears that Klipper does not handle spaces in filenames especially well and causes certain issues like errors downloading files or generating thumbnails in the frontend software that is commonly used. My firsthand experience is with Moonraker and Mainsail over Klipper, but Fluidd may also have this problem.

In any case, I wonder if it would be possible to provide "checkbox" option to "Replace Output Filename Spaces with "_"" or something similar. This makes sense in the "Printer Settings" tab as this is a "printer" (Klipper) issue rather than a "Print Settings/Output options" issue.

My current process is that I have renamed my print settings, filament settings and printer profiles to not have any spaces, and also made sure not to have any spaces in [printer settings/output filename format], but I still have to watch out for STLs that have spaces in their filenames.
``

@neophyl
Copy link

neophyl commented Aug 30, 2021

Sounds like a useful addition. How easy would it be to extend that concept to also replace special characters ? One thing I have to be careful of with my setup using a flash air card is using things like % or other special characters. If I transfer a gcode file over with one it makes the entire directory non accessible (a limitation of webdav I believe).

@supermerill
Copy link
Owner Author

supermerill commented Aug 30, 2021

I can create a text field where you write all forbidden characters to replace with '_'
(and if it's starting with '[' or '(' , it's assumed that it's a regexp to use)

@neophyl
Copy link

neophyl commented Aug 30, 2021

Sounds viable 😊 Although I try and avoid regex as it hurts my poor brain lol.

@supermerill supermerill added the fixed for the next version That means that you should be able to test it in the latest nightly build label Aug 31, 2021
@supermerill supermerill added fix is live in the last release Please download /build the last release and try to reproduce. and removed fixed for the next version That means that you should be able to test it in the latest nightly build labels Sep 6, 2021
@yiannias
Copy link

yiannias commented Sep 7, 2021

So thankful for addressing this!

I am trying to find the actual place where this is visible in the interface (I have tried the PC and Mac version of the build and can't seem to find it).

I would expect it in Print Settings/Output Options/ in the "Output file" group under "Output filename format" or in Printer Settings/General or in Preferences/General, but I can not find it there or anywhere else.

@supermerill
Copy link
Owner Author

supermerill commented Sep 8, 2021

I would expect it in Print Settings/Output Options/ in the "Output file" group under "Output filename format" or in Printer Settings/General or in Preferences/General, but I can not find it there or anywhere else.

it's in printer -> general -> firmware

Try a search with 'illegal' or 'filename'

you need to be in expert mode

@yiannias
Copy link

yiannias commented Sep 8, 2021 via email

@supermerill
Copy link
Owner Author

supermerill commented Sep 8, 2021

It's only on the 2.3.57 branch, as the 2.3.56 one only get bugfixes, to minimize regressions.

@yiannias
Copy link

yiannias commented Sep 8, 2021 via email

@Kadah
Copy link

Kadah commented Nov 26, 2021

Just going to note this hear since the SEO for this feature leads.

To make it more obvious to yourself that the setting for this isn't undefined when set to just " ", use "[\s]". This is the regex match for whitespace, eg. space, tab, and newline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement fix is live in the last release Please download /build the last release and try to reproduce.
Projects
None yet
Development

No branches or pull requests

4 participants