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

Allow escaping commas in XYZ grid #15983

Closed
wants to merge 2 commits into from
Closed

Allow escaping commas in XYZ grid #15983

wants to merge 2 commits into from

Conversation

misterandy33
Copy link

Description

Improves the XYZ parser to allow escaping commas.
In other words, red dress, white shirt\, blue shorts becomes red dress and white shirt, blue shorts.

Checklist:

@w-e-w
Copy link
Collaborator

w-e-w commented Jun 9, 2024

this PR is not needed

use double quots

red dress, "white shirt, blue shorts"

more examples


in the event that AUTO thinks this is a good idea
this should be implemented using escapechar arg

def csv_with_skipinitialspace(data_str):
    return list(map(str.strip, chain.from_iterable(reader(StringIO(data_str), skipinitialspace=True, escapechar='\\'))))

and not the strange s/r in the PR


more reason not to implement this
also this will cause issue in prompt s/r as irrc \ is used in some prompts
if this is implemented anyone who wish to use prompt S/R with \ char will now have to escape the \ to \\

it will also have the breaking old xyz grid infotext in old image if the uses \ in the axis input

@AUTOMATIC1111
Copy link
Owner

Yeah, also against it.

@misterandy33
Copy link
Author

Well, I saw that it was using CSV and tried quoting the values with no effect. So I wrote this on my local install before I was aware of skipinitialspace.

Apologies for being such a waste of your time.

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 this pull request may close these issues.

3 participants