maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread (https://talk.maemo.org/showthread.php?t=45388)

cjsegninir 2011-03-27 13:42

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Hello everyone,
I would like to use the Queen Beecon to display in my desktop some text extracted from a webpage (It changes everyday, but it is displayed in the same place)
Seeing all the things you do know, I imagine it is fairly simple, but I have no clue on how to do it.
Could anyone give me a hand?

ndi 2011-03-29 08:53

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by cjsegninir (Post 976575)
Hello everyone,
I would like to use the Queen Beecon to display in my desktop some text extracted from a webpage (It changes everyday, but it is displayed in the same place)
Seeing all the things you do know, I imagine it is fairly simple, but I have no clue on how to do it.
Could anyone give me a hand?

I am far from expert, but I'd start by using wget to get the file locally, then cat the file and parse it. I think wget can output to a pipe, but it makes debugging harder. Depending on cutting method, several tools can be used to snip the data.

In any case, you need a script. Add wget and cat the result, maybe to grep so you can find what you want. Someone better at Linux tools can help you cut the text you want.

ejasmudar 2011-03-31 05:38

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by cjsegninir (Post 976575)
Hello everyone,
I would like to use the Queen Beecon to display in my desktop some text extracted from a webpage (It changes everyday, but it is displayed in the same place)
Seeing all the things you do know, I imagine it is fairly simple, but I have no clue on how to do it.
Could anyone give me a hand?

Yes, as suggested by ndi, you should be looking at wget. it will download the contents of the webpage (including all the javascripts, css and html codes). I then piped the output to a 'sed' command to remove everything i did not want and format it.

This script can then be called easily from QBW.
For reference, check this script that i made that reads match scores from yahoo's site and displays the required details. In the source code, i have also mentioned a link to a tutorial

moudy91 2011-04-10 07:46

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
hi guys i need to have a script to put in in the qbw to show the network name ( SSID ) when am connect to the wifi connection, can that be found or be created.
i don't want the personal ip widget i prefer the command in the qbw.
tanks

Umlungu 2011-04-10 08:49

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
I think you'd need root access/sudo to get that info, but 'iwconfig | grep wlan0' will give you the line that you need.

I haven't used qbw before, so I'm not sure if it accepts this command, but to take just ssid out of that line, you'd need to use something like, "cut 34,*". You would need to replace * with the length of the SSID though, so you if you don't know the length of the name, it'll probably look ugly

EDIT: 'iwconfig wlan0 | grep ESSID' would do the same and not have to query the other interfaces

moudy91 2011-04-10 17:27

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by Umlungu (Post 984925)
I think you'd need root access/sudo to get that info, but 'iwconfig | grep wlan0' will give you the line that you need.

I haven't used qbw before, so I'm not sure if it accepts this command, but to take just ssid out of that line, you'd need to use something like, "cut 34,*". You would need to replace * with the length of the SSID though, so you if you don't know the length of the name, it'll probably look ugly

EDIT: 'iwconfig wlan0 | grep ESSID' would do the same and not have to query the other interfaces

hi Umlungu
i put 'iwconfig wlan0 | grep ESSID in the xterm when am root but it reply me iwconfig not found.
if their anyway else even in xterm to access it ??

JonWW 2011-04-10 21:50

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by moudy91 (Post 984904)
hi guys i need to have a script to put in in the qbw to show the network name ( SSID ) when am connect to the wifi connection, can that be found or be created.
i don't want the personal ip widget i prefer the command in the qbw.
tanks

moudy91 this script will give you your SSID
Code:

echo "iwconfig wlan0"|root|grep ESSID|sed "s/.*ESSID:\"//;s/\".*//"
or if you want to show some kind of disconnected message use this script
Code:

ESSID=`echo "iwconfig wlan0"|root|grep ESSID|sed "s/.*ESSID:\"//;s/\".*//"`;if [ "$ESSID" == "" ];then echo "na";else echo $ESSID;fi
change "na" for what ever disconnected message you want.

Hope this is what you are after.

moudy91 2011-04-11 07:38

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by JonWW (Post 985222)
moudy91 this script will give you your SSID
Code:

echo "iwconfig wlan0"|root|grep ESSID|sed "s/.*ESSID:\"//;s/\".*//"
or if you want to show some kind of disconnected message use this script
Code:

ESSID=`echo "iwconfig wlan0"|root|grep ESSID|sed "s/.*ESSID:\"//;s/\".*//"`;if [ "$ESSID" == "" ];then echo "na";else echo $ESSID;fi
change "na" for what ever disconnected message you want.

Hope this is what you are after.

hi jonWW.
first i want to say thank you for helping me.
second echo "iwconfig wlan0"|root|grep ESSID|sed "s/.*ESSID:\"//;s/\".*//" That script didn't work when am connected to any wifi the ssid don't show up.
all i did copy and paste it in qbw and nothing happens.
thank you again, do you think something wrong with the script?

JonWW 2011-04-11 08:14

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by moudy91 (Post 985404)
That script didn't work when am connected to any wifi the ssid don't show up.

First try it in XTerm.
Do you have "rootsh" installed? as it cannot work wthout it.

moudy91 2011-04-11 08:16

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by JonWW (Post 985420)
First try it in XTerm.
Do you have "rootsh" installed? as it cannot work wthout it.

yes i have root installed and even in xterm it didn't work

Umlungu 2011-04-11 08:39

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by moudy91 (Post 985125)
hi Umlungu
i put 'iwconfig wlan0 | grep ESSID in the xterm when am root but it reply me iwconfig not found.
if their anyway else even in xterm to access it ??

You need to be root in order to run that command(sudo gainroot), which probably won't help for qbw, unless it runs as root.
If you are root, then you don't have iwtool installed, in which case, run 'apt-get install iw' as root.

Umlungu 2011-04-11 08:42

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Actually...forget about running it as root, try changing the path to /sbin/iwconfig..

moudy91 2011-04-11 08:45

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by Umlungu (Post 985433)
Actually...forget about running it as root, try changing the path to /sbin/iwconfig....

explain more please

moudy91 2011-04-11 08:47

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by Umlungu (Post 985431)
You need to be root in order to run that command(sudo gainroot), which probably won't help for qbw, unless it runs as root.
If you are root, then you don't have iwtool installed, in which case, run 'apt-get install iw' as root.

i have the root installed and i always when i open xterm i run root so in qbw nothing happens and even in xterm when am root nothing happens for the ssid

Umlungu 2011-04-11 08:47

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Use Jww's command as it's a lot neater(I could never wrap my head around sed ^^) but it should look like...

Code:

echo "/sbin/iwconfig wlan0"|root|grep ESSID|sed "s/.*ESSID:\"//;s/\".*//"

moudy91 2011-04-11 08:49

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by Umlungu (Post 985433)
Actually...forget about running it as root, try changing the path to /sbin/iwconfig..

Nope even this nothing happens

Umlungu 2011-04-11 08:52

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
'apt-get install iw' then

moudy91 2011-04-11 08:54

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by Umlungu (Post 985446)
'apt-get install iw' then

if i will install iw it will work 100 % ????

JonWW 2011-04-11 08:56

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
moudy91 please type in XTerm
Code:

echo "/sbin/iwconfig wlan0"|root
and paste the rusults here.

You should get something like this:
Code:

wlan0    IEEE 802.11bg  ESSID:"NETGEAR-07-B1-D6" 
          Mode:Managed  Frequency:2.427 GHz  Access Point: 00:1B:2F:07:B1:D6 
          Bit Rate=54 Mb/s  Tx-Power=10 dBm 
          Retry min limit:7  RTS thr:off  Fragment thr=2352 B 
          Encryption key:DA1B-18EC-57BF-FDED-CFF5-56F1-85D0-0510-3118-5455-478F-20B2-DD01-1775-6CC0-313D [2]  Security mode:open
          Power Management:on
          Link Quality=75/100  Signal level:-46 dBm  Noise level=-92 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0  Missed beacon:0


moudy91 2011-04-11 08:58

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by JonWW (Post 985449)
moudy91 please type in XTerm
Code:

echo "/sbin/iwconfig wlan0"|root
and paste the rusults here.

You should get something like this:
Code:

wlan0    IEEE 802.11bg  ESSID:"NETGEAR-07-B1-D6" 
          Mode:Managed  Frequency:2.427 GHz  Access Point: 00:1B:2F:07:B1:D6 
          Bit Rate=54 Mb/s  Tx-Power=10 dBm 
          Retry min limit:7  RTS thr:off  Fragment thr=2352 B 
          Encryption key:DA1B-18EC-57BF-FDED-CFF5-56F1-85D0-0510-3118-5455-478F-20B2-DD01-1775-6CC0-313D [2]  Security mode:open
          Power Management:on
          Link Quality=75/100  Signal level:-46 dBm  Noise level=-92 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0  Missed beacon:0


before or after installing iw ?

Umlungu 2011-04-11 08:59

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
yeah, once you have the iw tools installed, you *should* have access to iwconfig

Umlungu 2011-04-11 09:04

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
after installing iw

moudy91 2011-04-11 09:49

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by JonWW (Post 985449)
moudy91 please type in XTerm
Code:

echo "/sbin/iwconfig wlan0"|root
and paste the rusults here.

You should get something like this:
Code:

wlan0    IEEE 802.11bg  ESSID:"NETGEAR-07-B1-D6" 
          Mode:Managed  Frequency:2.427 GHz  Access Point: 00:1B:2F:07:B1:D6 
          Bit Rate=54 Mb/s  Tx-Power=10 dBm 
          Retry min limit:7  RTS thr:off  Fragment thr=2352 B 
          Encryption key:DA1B-18EC-57BF-FDED-CFF5-56F1-85D0-0510-3118-5455-478F-20B2-DD01-1775-6CC0-313D [2]  Security mode:open
          Power Management:on
          Link Quality=75/100  Signal level:-46 dBm  Noise level=-92 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0  Missed beacon:0


hi i did install iw but even this nothing happens.
and when i go to xterm and double click on the Tab just i see iw their is no iwconfig

moudy91 2011-04-11 09:58

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by Umlungu (Post 985458)
after installing iw

after installing iw nothing happens because i found iw and could not found iwconfig

Umlungu 2011-04-11 10:09

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
What does 'ls /sbin | grep iw' return?

moudy91 2011-04-11 10:12

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by Umlungu (Post 985489)
What does 'ls /sbin | grep iw' return?

just iw and nothing else

moudy91 2011-04-11 10:17

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by Umlungu (Post 985489)
What does 'ls /sbin | grep iw' return?

and even i did check now the app that i did install already in my phone i could not find anything about iw

Umlungu 2011-04-11 10:19

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
try apt-get install wireless-tools then

moudy91 2011-04-11 10:27

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by Umlungu (Post 985498)
try apt-get install wireless-tools then

Package wireless-tools has no installation condidate

moudy91 2011-04-11 10:29

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by Umlungu (Post 985498)
try apt-get install wireless-tools then

whicj catalogs i have to be enable ?

Umlungu 2011-04-11 10:29

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Do have all of the extras repositories like devel and testing?

moudy91 2011-04-11 10:32

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by Umlungu (Post 985507)
Do have all of the extras repositories like devel and testing?

yes, and its all enable

Umlungu 2011-04-11 10:34

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Run 'apt-get update' and then try installing wireless-tools again

moudy91 2011-04-11 10:40

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by Umlungu (Post 985510)
Run 'apt-get update' and then try installing wireless-tools again

ok.
but first how can i uninstall the iw that i did install it before so i will refresh everything from the beginning, BUT the iw could not be found in the app manager

moudy91 2011-04-11 10:46

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by Umlungu (Post 985510)
Run 'apt-get update' and then try installing wireless-tools again

after apt-get update then install wireless-tools again, same error Package wireless-tools has no installation candidate

Umlungu 2011-04-11 10:49

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
With 'apt-get --purge remove iw'
Then it seems wireless-tools is kept in the developer tools repository, so take a look at http://wiki.maemo.org/Documentation/...5#Installation for instructions on enabling this repository.

Once that's done, apt-get update again and then apt-get install wireless-tools

moudy91 2011-04-11 10:54

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by Umlungu (Post 985518)
With 'apt-get --purge remove iw'
Then it seems wireless-tools is kept in the developer tools repository, so take a look at http://wiki.maemo.org/Documentation/...5#Installation for instructions on enabling this repository.

Once that's done, apt-get update again and then apt-get install wireless-tools

a big thank you for your help and for your time.
so i have to wait till they enable this repository.
what about the iwconfig??

Umlungu 2011-04-11 11:42

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
No probs, and no, you need open your package manager and add the freemantle tools repository to it using the instructions in the link I gave earlier.

Once that's been added, apt-get will be able to find the wireless-tools package, which contains iwconfig.

moudy91 2011-04-11 11:57

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by Umlungu (Post 985546)
No probs, and no, you need open your package manager and add the freemantle tools repository to it using the instructions in the link I gave earlier.

Once that's been added, apt-get will be able to find the wireless-tools package, which contains iwconfig.

ok i did add the tool repository and waiting to be added.
thank you again

Umlungu 2011-04-11 12:09

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
okay cool, once it's added, close the application manager and type 'apt-get update' and then 'apt-get install wireless-tools' into a console


All times are GMT. The time now is 13:53.

vBulletin® Version 3.8.8