Open terefang opened 4 months ago
FYI - I originally designed safenames to help with real-world data ingestion using Datapusher+ for CKAN - especially with spreadsheet header names.
That's why its defaults are heavily informed by CKAN requirements.
I can certainly make it "safer" using your proposal, though I have to prioritize CKAN data ingestion.
Perhaps, I can just add a new command called safernames
, so as not to perturb safenames which is working quite well in our pipelines.
hmm .. would the creation of a new subcommand with similar functionality be counter-intuitive ?
Point taken...
I'll just have to add it to safenames
then in a way that doesn't have breaking API changes...
how about --mode "s"
and --mode "S"
?
Yes... that's the easy part...
The part that I'm thinking about is how the JSON output formats will work...
while the current safename option are many and database column-name safe, actual naming schema might not be what the user wants.
my proposal would be the (s)afe mode as defined be the following steps:
[:alnum:]
with "_"[_]+
with "_"(s)afe mode should operate in ascii-chars-only mode, (S)afe mode should work in unicode-chars mode.