Is the latest GMT version (6.5.0_274eb0d_2023.11.15) being pickier about having a slash or a colon? I’ve tried escaping those characters and I get the same result.
Did I miss a memo on a change to pstext, or is something amiss? I’ve been using this kind of command for years without issues.
Gmt now “careful” examines the very first record to learn if there are things like absolute time strings (users often forget -f0T for instance) so we can that record and set things internally. Unfortunately, the section that checks if a valid date-time stamp had some issues, now fixed. More work will be put into this function to avoid such crashes.
Thanks, Paul. A little bit hard to interpret what “careful” GMT means.
Do I need to go back to an older version?
Or is someone on the team going to make sure that pstext can take anything a user sends to it, without crashing? I need that file name (with internal date stamp included) printable on my graphics.
Oh boy. I updated GMT to latest merged version. Still not quite there…
Using my original text string, pstext operates without complaints, placing it right where it belongs.
Then, I tried changing the text string passed to pstext, to: txt_ds="Test print", and I get this error message back from pstext: pstext [ERROR]: Unacceptable date template ddmmmmyyyy. Yikes! Didn’t crash, but pstext is unhappy.
Ah, it seems to be anything that starts with an upper case T, pstext doesn’t like.
@John_Geodesy, I’ve completely rewritten the “Detect” functions in GMT that determines if a string is time, longitude, etc. If you build master you could cd to test/gmtconvert and run
gmt convert -/ strings.txt
and look at the output. If you have time, make a file with the same format with some of your cases, say, john,txt and run
gmt convert john.txt
Plese send me anything that fails the test. We wont implement the new functions until we have covered all possible cases.
Output from the command, gmt convert -/ strings.txt all looks fine. Let me know if you need to see it.
Creating a john.txt file that looks like this:
> cat john.txt
ATL03_20200626034717_00120806_006_01.h5/beam: gt3l |STRING
Test text |STRING
Some other things that might look like dates: 11-14-2023 |STRING
20231120-Check how this is handled |STRING
Then running:
> gmt convert -/ john.txt
ATL03_20200626034717_00120806_006_01.h5/beam: gt3l STRING STRING
Test text STRING STRING
Some other things that might look like dates: 11-14-2023 STRING STRING
20231120-Check how this is handled STRING STRING
Everything came out the way I expected. No failures detected, thus far!