I use this little utility to find records in all.txt and format them a bit to 
make them easier to view and grep a 2nd time if you want a specific date for 
example.
It adds the date and lines up the columns better.
You'll have to change the getenv for Linux.  I don't know what it uses.

 I also use a batch file to drive this and save a few more keystrokes.
alltxt w9mdb %1

73 
Mike W9MDB

#include <stdio.h>
#include <string.h>

char *strtoupper(char *s)
{
        char *s2 = strdup(s);
        char *s3 = s2;
        while(*s) {
                *s2++ = toupper(*s++);
        }
        return s3;
}

int main(int argc, char*argv[])
{
        if (argc != 3) {
                printf("Usage: %s mycall findcall\n",argv[0]);
                return 1;
        }
        char *mycallsign = strtoupper(argv[1]);
        char *findcallsign = strtoupper(argv[2]);
        char date[4096];
        char path[4096];
        char buf[4096];


        sprintf(path,"%s/AppData/Local/WSJT-X/ALL.TXT",getenv("USERPROFILE"));

        FILE *fp = fopen(path,"r");

        while(fgets(buf,sizeof(buf),fp)) {
                if (buf[4]=='-') { // then this is a date
                        strncpy(date,buf,11);
                }
                else if (strstr(buf,mycallsign) && strstr(buf,findcallsign)) { 
// non-date line
                        if (strstr(buf,"Trans")) { //  make this a consistent 
fixed format
                                char *p=strtok(buf,":");
                                char *p2 = strtok(NULL,"\r\n");
                                printf("%s %-36s: %s\n",date,p,p2);
                        }
                        else {
                                char *field1 = strdup(buf);
                                char *field2 = strdup(buf);
                                field1[4]=0;
                                strcpy(field2,&field2[5]);
                                printf("%s %s                    
%s",date,field1,field2);
                        } 
                }
        }
        fclose(fp);

        return 0;
        
}

-----Original Message-----
From: Alan VK2ZIW [mailto:[email protected]] 
Sent: Tuesday, August 18, 2015 5:03 AM
To: WSJT software development
Subject: Re: [wsjt-devel] WSJT-X, some s/w little issues

Hi,

Can we have the date in "ALL.TXT" please ?

This is the balloon PS-49 near New Zealand:

bash-4.3$ cat ALL_WSPR.TXT | grep VK3
150816 1500   3 -13 -0.2 10.1402676  VK3YT RF15 27           2     1    0
150816 2100   2 -21 -0.7 10.1402686  VK3YT RF46 27           0     1    0
150816 2200   2 -24 -0.5 10.1402686  VK3YT RF46 27           0     1    0
150818 0700   2 -22 -0.1 10.1402676  VK3YT BF86 27           2     2    0
150818 0800   1 -24 -0.2 10.1402664  VK3YT BF86 27           1   100    0
bash-4.3$ cat ALL.TXT | grep VK3
0702 -17 -0.1 1004 @ VK3YT1CB38S40        
0802 -21 -0.1 1004 @ VK3YT1D738RU0        
bash-4.3$ ls -l ALL*

WSJT-X 1.6.0 devel compiled on Fedora 21 x86_64.

Images:

> Are you saying the build fails to find the default icons or is it 
> specific images in the document used during the user-guide build section?

Images in the document used during the user-guide build section:
information.png

And, in WSJT (wsjt/trunk/wsjt.py) can you define "idWarn=-1" in the globals 
next to "idsec".

73

Alan VK2ZIW

On Sun, 16 Aug 2015 22:23:49 -0600, Greg Beam wrote
> HI Alan,
> 
> See below.
> 
> On 8/16/2015 5:44 PM, Alan VK2ZIW wrote:
> > Hi,
> > WSJT-X experimental compiled from SVN on Fedora 21 x86_64
> >
> > 1) Still, no SVN version in Title or Help -> About WSJT-X
> 
> This one has already been discussed / explained.
> 
> >
> > 2) Images used in documentation not there, fix:
> > bash-4.3$ mkdir -p doc/user_guide/images; cd doc/user_guide/images 
> > bash-4.3$ ln -s ../../../../../doc/icons icons bash-4.3$ cd ../../..
> > bash-4.3$ pwd
> > /downloads/hamradio/digital/wsjt/5790all/wsjt/branches/wsjtx_exp/bui
> > ld
> 
> Are you saying the build fails to find the default icons or is it 
> specific images in the document used during the user-guide build section?
> 
> I am assuming this is on Fedora? To cover the bases here, the icon 
> admonitions, to the best of my knowledge, are from the AsciiDoc 
> package itself and not included as part of the WSJT-X user-guide 
> source folder.
> 
> The default location for these icons should be something like :
> 
> /etc/asciidoc/images/icons
> 
> The AsciiDoc conf file ( system level ) should find them.  Can you 
> verify the locations on your AsciiDoc system installation and where 
> did you get the icons to link with in your ln -s statement above ? I 
> don't see these icons anywhere in the ^/branches/wsjtx_exp or 
> ^/branches/wsjtx but maybe I am misunderstanding the problem?
> 
> Either way, I'll have a peak at the sources to see if there's a rouge 
> location being specified or something. Any changes / updates will be 
> made to the Devel branch ^/branches/wsjtx *not* Joe's Exp branch 
> ^/branches/wsjtx_exp.
> 
> >
> > 3) Warnings
> >
> > mainwindow.cpp:2006:43: warning: ‘txDuration’ may be used 
> > uninitialized in this function
> >
> > <and some warnings re. comparison between unsigned and int>
> >
> > 4) When started up in JT9 mode, the Wide Graph draws horizontal 
> > lines every 30 secs and the noise cannot be seen. Cmange mode to 
> > WSPR-2 and back and it's all fixed.
> 
> Joe and / or Bill will have to comment on 3 and 4.
> 
> >
> > Otherwise, all good. Listening for PS49 balloon.
> >
> >
> > http://picospace.net/tracker/new
> >
> > Alan VK2ZIW
> >
> > Man's greatest waste of time: Worshipping the wrong God.
> > Consider Jesus.
> > ---------------------------------------------------------------------------
> > Alan Beard               Unix Support Technician from 1984 to today
> > 70 Wedmore Rd.           Sun Solaris, AIX, HP/UX, Linux, SCO, MIPS
> > Emu Heights N.S.W. 2750  Routers, terminal servers, printers, terminals 
> > etc..
> > +61 2 47353013 (h)       Support Programming, shell scripting, "C", 
> > assembler
> > 0414 353013 (mobile)     After uni, electronics tech
> 
> 73's
> Greg, KI7MT
> 
> ----------------------------------------------------------------------
> -------- _______________________________________________
> wsjt-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wsjt-devel


Alan

Man's greatest waste of time: Worshipping the wrong God.
Consider Jesus.
---------------------------------------------------------------------------
Alan Beard               Unix Support Technician from 1984 to today
70 Wedmore Rd.           Sun Solaris, AIX, HP/UX, Linux, SCO, MIPS
Emu Heights N.S.W. 2750  Routers, terminal servers, printers, terminals etc..
+61 2 47353013 (h)       Support Programming, shell scripting, "C", assembler
0414 353013 (mobile)     After uni, electronics tech


------------------------------------------------------------------------------
_______________________________________________
wsjt-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wsjt-devel


------------------------------------------------------------------------------
_______________________________________________
wsjt-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to