Open kratsg opened 6 years ago
Hi
Then general answer for any questions about panda-shortname
is that it's something I thought would be useful but didn't really maintain (I generally just use sed for most scripts). I'm tempted to remove it if we're going to put this code into a release or something, but before yesterday no one so much as asked about it.
That being said, I think it could also be quite a useful command with some work. My thinking is that any name-shortening script should follow a few rules:
.
separated fields
mcYEAR_Energy
part is useful, the first part of the job option file name (MG*
in your example) is useful, and the format is useful. But all of these can also be shortened a bit. _
in the JO name, is almost always useless for all but a few people. This third field is in general stupidly long, I suspect just because it's created first (by whoever requests the MC) and people are about as good at estimating how long file names will become as they are at estimating how long projects will take.But yeah, I think the third field is the tricky one, because unless PMG really cracks down on the naming of JO files this is going to be all over the place for the foreseeable future.
What usually works is splitting by _
and taking the first part, discarding the second, and keeping everything after. Apparently I'm not doing that doing exactly that here, it looks like instead I'm removing every all-caps or numbers string between the _
. Anyway, suggestions as to how to do that smarter are welcome.
I'm unclear on what
panda-shortname
does based on what it currently does:It seems to strip away some pieces, including the scope (which the documentation states) but i'm not sure the other pieces that got stripped away should have.