DXcluster for SvxLink - single line code

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

DXcluster for SvxLink - single line code

Birger Olsson
#Play the five newest DX-spots from DX-summit

spellWord [exec /usr/bin/lynx -dump http://oh2aq.kolumbus.com/dxs/dx25.
html | /usr/bin/awk {/[0-9][0-9][0-9]/{print $2 " " $3}} |
/usr/bin/head -5];

Depends on lynx, awk and head (standard utils). I also did a minor
adjustment in spellWord for playing of newline, spacing and slash.

Can easy be improved and simplified if we have an awk-guru on the
mailinglist (better use of regexp and no nead for use of /usr/head).  

I am using the same type of code for a lot of web-data. Listing of
local echolink nodes, nearby aprs-stations, etc, etc...

#Play echolink node list for SM6-prefix (SA6,SK6,SL6,SM6)

spellWord [exec /usr/bin/lynx -dump http://www.echolink.org/logins.jsp 
| /usr/bin/awk {/S[AKLM]6/{print $1 " " $NF}}]

Tnx to SVX for a great software and the new simple way to add modules.
Keep up the good work.

73's
SM6VQJ, Birger








 




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Svxlink-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/svxlink-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: DXcluster for SvxLink - single line code

Tobias Blomberg-3
On Mon, 2005-10-17 at 18:55 +0200, Birger Olsson wrote:

> #Play the five newest DX-spots from DX-summit
>
> spellWord [exec /usr/bin/lynx -dump http://oh2aq.kolumbus.com/dxs/dx25.
> html | /usr/bin/awk {/[0-9][0-9][0-9]/{print $2 " " $3}} |
> /usr/bin/head -5];
>
> Depends on lynx, awk and head (standard utils). I also did a minor
> adjustment in spellWord for playing of newline, spacing and slash.
>
> Can easy be improved and simplified if we have an awk-guru on the
> mailinglist (better use of regexp and no nead for use of /usr/head).  
>
> I am using the same type of code for a lot of web-data. Listing of
> local echolink nodes, nearby aprs-stations, etc, etc...
>
> #Play echolink node list for SM6-prefix (SA6,SK6,SL6,SM6)
>
> spellWord [exec /usr/bin/lynx -dump http://www.echolink.org/logins.jsp 
> | /usr/bin/awk {/S[AKLM]6/{print $1 " " $NF}}]

Cool hacks :-)

There is something you need to know when doing this though: SvxLink is
implemented using a non blocking programming paradigm. That means that
no single operation should ever block and wait for something to finish.
Getting a web page could possibly take a long time and block for a
while. That means that everything in SvxLink will stop until the web
page is fetched. On a simplex link it's probably a minor problem but if
SvxLink is configured as a repeater controller it will cause problems.

One way to solve this problem is to have a separate script that is
started outside of SvxLink that periodically refresh a file on disk. The
file can then be accessed from TCL when the data is needed. This will of
course put unnecessary load on the remote web site but it's one way to
do it.

A better way to do it is to add an exec function call from TCL to
SvxLink so that the SvxLink core handle the execution of the external
application/script. The SvxLink core could then signal the TCL script
when the execution of the external application ends.

The TCL interface need a rewrite anyway so maybe I will include such an
exec function in the future.

73 de SM0SVX / Tobias


>
> Tnx to SVX for a great software and the new simple way to add modules.
> Keep up the good work.
>
> 73's
> SM6VQJ, Birger
>
>
>
>
>
>
>
>
>  
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Svxlink-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/svxlink-devel



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Svxlink-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/svxlink-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: DXcluster for SvxLink - single line code

Birger Olsson
In reply to this post by Birger Olsson
>One way to solve this problem is to have a separate script that is
>started outside of SvxLink that periodically refresh a file on disk.
The
>file can then be accessed from TCL when the data is needed. This will
of
>course put unnecessary load on the remote web site but it's one way
to
>do it.

Periodically downloading is not the way to do it. I dont think the
site owners likes that and we will not get real-time data. But, as you
say, it will speed up things. There is a timeout option in Lynx, but
that wount help us much in this case.

>A better way to do it is to add an exec function call from TCL to
>SvxLink so that the SvxLink core handle the execution of the external
>application/script. The SvxLink core could then signal the TCL script
>when the execution of the external application ends.

>The TCL interface need a rewrite anyway so maybe I will include such
an
>exec function in the future.

>73 de SM0SVX / Tobias

Add that to the bottom of the wish-list (if there is such a thing) and
add AGC to the top ;-)

73 de SM6VQJ / Birger


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Svxlink-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/svxlink-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: DXcluster for SvxLink - single line code

Tobias Blomberg-3
On Thu, 2005-10-20 at 10:35 +0200, Birger Olsson wrote:

> >One way to solve this problem is to have a separate script that is
> >started outside of SvxLink that periodically refresh a file on disk.
> The
> >file can then be accessed from TCL when the data is needed. This will
> of
> >course put unnecessary load on the remote web site but it's one way
> to
> >do it.
>
> Periodically downloading is not the way to do it. I dont think the
> site owners likes that and we will not get real-time data. But, as you
> say, it will speed up things. There is a timeout option in Lynx, but
> that wount help us much in this case.

Yes, it's an ugly solution which I normally would not recommend.
Unfortunately it's the only way right now if you don't want to freeze
SvxLink during the operation. But as I said earlier, I think it's a
minor problem on a simplex node.


>
> >A better way to do it is to add an exec function call from TCL to
> >SvxLink so that the SvxLink core handle the execution of the external
> >application/script. The SvxLink core could then signal the TCL script
> >when the execution of the external application ends.
>
> >The TCL interface need a rewrite anyway so maybe I will include such
> an
> >exec function in the future.
>
> >73 de SM0SVX / Tobias
>
> Add that to the bottom of the wish-list (if there is such a thing) and
> add AGC to the top ;-)

Yes AGC is high up on my list as well. I just haven't gotten around to
do it yet. Now I've got one more reason to do it ;-)

73 de SM0SVX / Tobias


>
> 73 de SM6VQJ / Birger
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Svxlink-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/svxlink-devel



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Svxlink-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/svxlink-devel
Loading...