[DiscordArchive] or is it...?
[DiscordArchive] or is it...?
Archived author: AlexanderESmith • Posted: 2023-08-30T14:55:35.922000+00:00
Original source
Of course, this is a destructive process, so you can't convert back
Archived author: AlexanderESmith • Posted: 2023-08-30T14:56:19.652000+00:00
Original source
I would have no way in hell of figuring out if one of `. _ -` needed to be added anywhere
Archived author: mynameismeat • Posted: 2023-08-30T14:58:35.327000+00:00
Original source
it's basically (extended regex) `s/(\.|-| )/_/g`. I can't immediately grok what the first and last 2 rules are doing, but that's because regex is write only lol
Archived author: AlexanderESmith • Posted: 2023-08-30T15:00:10.787000+00:00
Original source
- First line finds any upper case letter and adds a space before it
- Second line fixes the first, unnecessary space
- Last 2 lines fix the corner case I was worried about, because my sledgehammer approach doesn't bother to consider current or next character :p
Archived author: AlexanderESmith • Posted: 2023-08-30T15:00:34.934000+00:00
Original source
But yes, I could convert a lot of those to one line
Archived author: AlexanderESmith • Posted: 2023-08-30T15:01:05.817000+00:00
Original source
The rest of the script handles the `= blah` to `: "blah"` conversion
Archived author: AlexanderESmith • Posted: 2023-08-30T15:01:25.520000+00:00
Original source
(which I could probably also do with regex if I use references...)
Archived author: AlexanderESmith • Posted: 2023-08-30T15:01:55.144000+00:00
Original source
But I created this because I was being lazy at the time, and refining it that much would have been effort XD
Archived author: AlexanderESmith • Posted: 2023-08-30T15:03:23.875000+00:00
Original source
I bet I could do exactly what the c++ does in bash, now that I have the logic in front of me
Archived author: AlexanderESmith • Posted: 2023-08-30T15:04:08.270000+00:00
Original source
Honestly, I didn't even realize it was a conversion that your team was intentionally doing; I thought it was some docker BS