pWidgets 2.5.8

Window managers, icon programs, widgets, etc.
Message
Author
User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

Temp_cpu widget - config file "edited"

#3106 Post by davids45 »

G'day,

Working from the certainty that an infinite number of monkeys on typewriters could write Shakespeare sooner or later, I have taken some of their output concerning conky and cpu temperature (found by the Bard Google), and by trial and many errors, randomly found a Temp-cpu widget config "Text" line that gives me a dual core display on this HP desktop's pwidgets.

Those with nothing to lose may wish to blindly follow my one-eyed efforts......

Firstly, you need to install a lmsensors.pet as the Widgets conky doesn't seem to have this.

Secondly, run 'sensors' in a terminal to check it runs and to see what cpu/core temperatures you could expect from your computer.

Thirdly, edit your existing temp-cpu config file replacing the 'TEXT' lines as below or just replace the config file with this:
#this is a Pwidgets config file
#the actual building of the graphics is defined in bottom of this file, - after 'TEXT'.

#### PWIDGETS #####

HEIGHT=75
OFFSET_X_LEFT=40
OFFSET_X_RIGHT=20


#### CONKY ####
#COLORS --- 0:headings 1:base-info 2:extra-info 3:markers 5:green 6:red
#Colors are defined in theme-files, - NOT here.
color0 A2914E
color1 666666
color2 bbbbbb
color3 ffab00
color5 499D3A
color6 red

background no
own_window yes
own_window_type roxdesktop
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes
own_window_colour hotpink
double_buffer yes
total_run_times 0
update_interval 1
minimum_size 180 5
draw_shades yes
draw_outline no
draw_borders no
stippled_borders 2
border_margin 4
border_width 1
default_color white
default_shade_color 333333
default_outline_color red
no_buffers yes
uppercase no
use_spacer none
#font fixed
use_xft yes
xftfont dejavu:bold:size=10

TEXT
${font pdingobats2:size=28}${color4}z${font}${color0} CPU Temps
${color yellow} ${execi 33 sensors | grep -A 2 'Core' | cut -c1-22 | sed '/^$/d'}
Attached for those with young eyes is a desktop shot showing the lmsensors output as well as the Temp-cpu widget in its current form in the centre of the widgets (yellow text temps). 01micko's pmcputemp (version 0.6) is also shown on the task-bar.

It would be nice to get all three 'sensor'-reported temps in the widget - I would probably need to understand what a "grep" is :shock: and how to "cut" just the bits needed, or even how to optionally add the 'critical' values from the sensors display.

David S.
Attachments
lm_sensors-3.1.2.pet
Possibly a bit old. Try your Pup repository if this pet doesn't seem to work.
(72.05 KiB) Downloaded 346 times
capture24021.gif
(44.79 KiB) Downloaded 624 times
Last edited by davids45 on Thu 16 Apr 2015, 00:46, edited 1 time in total.

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

Temp_cpu widget - 2 cores + pci adaptor

#3107 Post by davids45 »

G'day,

If you have a graphic adaptor with a temperature output (as "temp1") and a dual core CPU, this Temp_cpu pwidget config may work for you.
#this is a Pwidgets config file
#the actual building of the graphics is defined in bottom of this file, - after 'TEXT'.
# needs lmsensors installed too - check likely widget output by running sensors in a console!!!!!!!

#### PWIDGETS #####

HEIGHT=100
OFFSET_X_LEFT=40
OFFSET_X_RIGHT=40


#### CONKY ####
#COLORS --- 0:headings 1:base-info 2:extra-info 3:markers 5:green 6:red
#Colors are defined in theme-files, - NOT here.
color0 A2914E
color1 666666
color2 bbbbbb
color3 ffab00
color5 499D3A
color6 red

background no
own_window yes
own_window_type roxdesktop
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes
own_window_colour hotpink
double_buffer yes
total_run_times 0
update_interval 1
minimum_size 180 5
draw_shades yes
draw_outline no
draw_borders no
stippled_borders 2
border_margin 4
border_width 1
default_color white
default_shade_color 333333
default_outline_color red
no_buffers yes
uppercase no
use_spacer none
#font fixed
use_xft yes
xftfont dejavu:bold:size=12

TEXT
${font pdingobats2:size=24}${color4}z${font}${color0} CPU Temps
${color yellow} ${execi 33 sensors | grep -A 2 'Core' | cut -c1-22 | sed '/^$/d'}
${font}${color0} Graphic-card ${color orange} ${execi 33 sensors | grep -A 1 'temp1' | cut -c14-22 | sed '/^$/d'}
The screen-shot is from unicornpup-6.0. The widget has the yellow 'Core' temperatures.
The lmsensors 'sensors' output is just readable in the blue window.
If your sensors output is different, tinkering of the TEXT line in the config file may be needed to match the sensor's wording.

01micko's pmcputemp-0.61 is also running - its blue icon showing a core temperature is on the task-bar.

David S.

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#3108 Post by Moat »

FWIW - I corrected three small issues with the WeatherStation script's wind direction indicator (arrow) -

1) There was no entry for 360 degrees (so no direction arrow would display), which - even though the same as 0 degrees - Yahoo sometimes reports either/or. Entry added.

2) The directional arrows (pcompass' iconwind font) were all being displayed as rotated 10 degrees clockwise relative to the actual reported Yahoo coordinates - just required shuffling all of the corresponding script 'echo' entries down one place in the script.

3) A space was missing from the 50 degrees '$WinCode' line, which prevented any arrow from displaying with a reported 50 degree coordinate.

Here's the entire revised code -

Code: Select all

if [ $WinCode =  0 ] ; then echo "J" 
  elif [ $WinCode = 10 ] ; then echo "a" 
  elif [ $WinCode = 20 ] ; then echo "b" 
  elif [ $WinCode = 30 ] ; then echo "c" 
  elif [ $WinCode = 40 ] ; then echo "d" 
  elif [ $WinCode = 50 ] ; then echo "e" 
  elif [ $WinCode = 60 ] ; then echo "f" 
  elif [ $WinCode = 70 ] ; then echo "g" 
  elif [ $WinCode = 80 ] ; then echo "h" 
  elif [ $WinCode = 90 ] ; then echo "i" 
  elif [ $WinCode = 100 ] ; then echo "j" 
  elif [ $WinCode = 110 ] ; then echo "k" 
  elif [ $WinCode = 120 ] ; then echo "l" 
  elif [ $WinCode = 130 ] ; then echo "m" 
  elif [ $WinCode = 140 ] ; then echo "n" 
  elif [ $WinCode = 150 ] ; then echo "o" 
  elif [ $WinCode = 160 ] ; then echo "p" 
  elif [ $WinCode = 170 ] ; then echo "q" 
  elif [ $WinCode = 180 ] ; then echo "r" 
  elif [ $WinCode = 190 ] ; then echo "s" 
  elif [ $WinCode = 200 ] ; then echo "t" 
  elif [ $WinCode = 210 ] ; then echo "u" 
  elif [ $WinCode = 220 ] ; then echo "v"
  elif [ $WinCode = 230 ] ; then echo "w"
  elif [ $WinCode = 240 ] ; then echo "x"
  elif [ $WinCode = 250 ] ; then echo "y"
  elif [ $WinCode = 260 ] ; then echo "z"
  elif [ $WinCode = 270 ] ; then echo "A"
  elif [ $WinCode = 280 ] ; then echo "B"
  elif [ $WinCode = 290 ] ; then echo "C"
  elif [ $WinCode = 300 ] ; then echo "D"
  elif [ $WinCode = 310 ] ; then echo "E"
  elif [ $WinCode = 320 ] ; then echo "F"
  elif [ $WinCode = 330 ] ; then echo "G"
  elif [ $WinCode = 340 ] ; then echo "H"
  elif [ $WinCode = 350 ] ; then echo "I"
  elif [ $WinCode = 360 ] ; then echo "J"
   
Bob
Attachments
Original Weather Station.jpg
Original script - pointing 10 degrees to the right...
(8.29 KiB) Downloaded 487 times
Weather Station.jpg
Revised script - 0 degrees correctly displayed as straight North/straight "up"...
(7.99 KiB) Downloaded 483 times
Last edited by Moat on Fri 01 May 2015, 07:47, edited 1 time in total.

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

Weatherstation wind direction

#3109 Post by davids45 »

G'day Moat,

Thanks for looking into the widget weatherstation wind script.

However, in my day-old full VividPup beta (see attached screen shot), the wind direction arrow is a text letter so I'm guessing I'm missing the pcompass font.

I haven't tried this in other Pups to check, but if this is a missing font, do you know where I can find the pcompass font file?

Regards,
David S.

Update: same text-instead-of-arrow in Dpup Wheezy with the weatherstation widget for wind direction.
Attachments
Vivid_Weatherstation_font.jpg
Weatherstation wind direction arrow is text
(94.51 KiB) Downloaded 626 times

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#3110 Post by Moat »

Hi David!

Below I attached the pcompass font I am using in (a somewhat modified) Precise 5.7.1 Retro - remove the fake tar.gz extension, and copy the font to /usr/share/fonts/default/ttf directory and see if that cures the issue.

Myself, I've experienced rendering issues of the pcompass font in some later Pups... hopefully it'll work for you (I'm gonna guess it will work in your Dpup Wheezy, but maybe not Vivid...?).

Bob
Attachments
pcompass.ttf.tar.gz
(3.84 KiB) Downloaded 302 times

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

pcompass font tested in Vivid & Wheezy

#3111 Post by davids45 »

G'day Bob,

Copied your ttf file to /usr/share/fonts/default/ttf and it works in Libre Office writer & calc (see screenshot from Vivid - second column is first column copied as pcompass)
So thanks for that.

But now in my weatherstation widget, I see a rectangle where previously there was a conventional letter (again check the screenshot). I've made the problem line red.
The rectangle came in both wheezy and vivid pups.

So could it be my location station doesn't issue a wind-direction (Sydney, NSW), or there is a problem in the widget config somewhere with the pcompass font - I had seen letters earlier with the default widget font?
${color6}Wind direction ${color6}${font}${alignr}${execi 120 /usr/local/pwidgets/widgets/scripts/WeatherStation show2}${font pcompass:size=10}${execi 120 /usr/local/pwidgets/widgets/scripts/WeatherStation iconwind}
I will keep playing.
David S.
Attachments
Vivid_Wstation_Pcompass.jpg
Weatherstation widget in Vivid - pcompass font installed and working
(135.63 KiB) Downloaded 550 times

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

Re: pcompass font tested in Vivid & Wheezy

#3112 Post by Moat »

Hi David -
davids45 wrote:But now in my weatherstation widget, I see a rectangle where previously there was a conventional letter...
Yes - that's the exact error (rectangle) that I've run across on some Pups I tried that were "later" than my Precise. I'm simply not smart enough to figure out what in particular is causing that, but have a sneaky suspicion it's something relating to later versions of Xorg (for instance, in Carolina v1.3 pcompass font works - in Carolina v1.3 Vanguard - with Xorg upgraded to v1.16.2 - pcompass just renders the rectangle, as well as displaying some other font-related issues across the desktop environment).

My guess is the pcompass font needs to be "rebuilt" in order to work with these later Xorgs (??), and that's somewhat over my head... :oops: :?

Just a total noob's guess, FWIW.

It's a shame, though, and likely just some tiny little thing/bug - as in your screenshot can be seen that the other Pwidgets' image-rendering fonts are working perfectly fine.

Bob

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

Re: pcompass font tested in Vivid & Wheezy

#3113 Post by Moat »

davids45 wrote:So could it be my location station doesn't issue a wind-direction...
BTW - you can check if the wind info had been downloaded to the temporary file used by Pwidgets, by viewing the contents (right-click and select 'Open As Text') of the file /root/.pwidgets/tmp/wever-tmp - the entry should be @ around line 13. For example, my wever-tmp's line 13 currently looks like this -

Code: Select all

<yweather:wind chill="57"   direction="340"   speed="7" />
Bob

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

Wind direction on weatherstation widget

#3114 Post by davids45 »

G'day Bob,
As you suggested, I checked my widgets tmp file and there is a lot of data there for Sydney, including the wind direction, which is displayed as degrees by the widget.
<title>Yahoo! Weather - Sydney, AS</title>
<link>http://us.rd.yahoo.com/dailynews/rss/we ... html</link>
<description>Yahoo! Weather for Sydney, AS</description>
<language>en-us</language>
<lastBuildDate>Fri, 01 May 2015 12:10 pm AEST</lastBuildDate>
<ttl>60</ttl>
<yweather:location city="Sydney" region="" country="AS"/>
<yweather:units temperature="C" distance="km" pressure="mb" speed="km/h"/>
<yweather:wind chill="18" direction="140" speed="16.09" />
<yweather:atmosphere humidity="88" visibility="9.99" pressure="1015.92" rising="0" />
<yweather:astronomy sunrise="6:29 am" sunset="5:13 pm"/>
<image>
<title>Yahoo! Weather</title>
<width>142</width>
<height>18</height>
<link>http://weather.yahoo.com</link>
<url>http://l.yimg.com/a/i/brand/purplelogo/ ... a.gif</url>
</image>
<item>
<title>Conditions for Sydney, AS at 12:10 pm AEST</title>
<geo:lat>-33.96</geo:lat>
<geo:long>151.01</geo:long>
<link>http://us.rd.yahoo.com/dailynews/rss/we ... html</link>
<pubDate>Fri, 01 May 2015 12:10 pm AEST</pubDate>
<yweather:condition text="Light Rain Shower" code="11" temp="18" date="Fri, 01 May 2015 12:10 pm AEST" />
<description><![CDATA[
<img src="http://l.yimg.com/a/i/us/we/52/11.gif"/><br />
<b>Current Conditions:</b><br />
Light Rain Shower, 18 C<BR />
<BR /><b>Forecast:</b><BR />
Fri - Rain. High: 19 Low: 16<br />
Sat - Rain. High: 21 Low: 17<br />
Sun - AM Showers. High: 22 Low: 16<br />
Mon - Partly Cloudy. High: 23 Low: 16<br />
Tue - Sunny. High: 25 Low: 10<br />
<br />
<a href="http://us.rd.yahoo.com/dailynews/rss/we ... html">Full Forecast at Yahoo! Weather</a><BR/><BR/>
(provided by <a href="http://www.weather.com" >The Weather Channel</a>)<br/>
]]></description>
<yweather:forecast day="Fri" date="1 May 2015" low="16" high="19" text="Rain" code="12" />
<yweather:forecast day="Sat" date="2 May 2015" low="17" high="21" text="Rain" code="12" />
<yweather:forecast day="Sun" date="3 May 2015" low="16" high="22" text="AM Showers" code="39" />
<yweather:forecast day="Mon" date="4 May 2015" low="16" high="23" text="Partly Cloudy" code="30" />
<yweather:forecast day="Tue" date="5 May 2015" low="10" high="25" text="Sunny" code="32" />
<guid isPermaLink="false">ASXX0112_2015_05_05_7_00_AEST</guid>
It's the next step of conversion/rendering of this value into a pcompass font letter that is not working as the number-to-letter conversion in another font such as dejavu sans looks OK.

I should just get used to accepting the degrees value (e.g. 0 or 360=a northerly, 180=a southerly) I suppose, and delete the arrow part of the widget.

It could be fun to add some extra days' forecast detail which is in the Yahoo output.

David S.

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

Re: Wind direction on weatherstation widget

#3115 Post by Moat »

davids45 wrote:I should just get used to accepting the degrees value (e.g. 0 or 360=a northerly, 180=a southerly) I suppose, and delete the arrow part of the widget.
Yes... but I really like the arrow, dang it, and would prefer it continued to work! :)
davids45 wrote:It could be fun to add some extra days' forecast detail which is in the Yahoo output.
Ha - funny... I had the exact same thought while looking through the script. And in looking, have just discovered that the "tomorrow" portion is actually parsing and (wrongly) displaying the last line of the forecast - or the 5th day out. Utter noob me is currently searching for a way to parse only from the second day (i.e. - tomorrow). Awk? Cat? Grep? Tail? Cut? Sed? Lost and searching... :?

Bob

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

Weatherstation Winds Well Directed

#3116 Post by davids45 »

G'day Bob,

I have successfully added your Weatherstation widget script revision to my Precise571 so I now see how the wind is blowing - gently and from the SE where most of our rain comes from.

Looking at the /usr/share/fonts/default/TTF/ fonts directory, I thought the two text files 'fonts-scale' and 'fonts-dir' may be my problem as they have lines for the pcompass font in Precise but not in other Pups. I copied each pcompass line into the equivalent Vivid files and increased the number at the start of each file by one, but no joy with where the wind blows from in Vivid.

I might continue to play around with this, hoping someone who may know what they are doing could help with a font-curative post??

David S.

Further testing of Moat's WeatherStation script and I find pcompass font is working in pemasu's SnowPups and Exprimo (see attached desktop). As these are kernel-2...., font problem may be kernel related (old is good, new is bad?), or is it the pwidgets version (again, old is good, new is bad?). More to check :) .
Attachments
exprimo.jpg
Widget in Dpup Exprimo
(43.59 KiB) Downloaded 324 times
precise_weatherstation.jpg
Weatherstation with wind direction indicated
(85.07 KiB) Downloaded 463 times
Last edited by davids45 on Mon 04 May 2015, 00:19, edited 1 time in total.

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

Re: Wind direction on weatherstation widget

#3117 Post by Moat »

Moat wrote: Utter noob me is currently searching for a way to parse only from the second day (i.e. - tomorrow). Awk? Cat? Grep? Tail? Cut? Sed? Lost and searching... :?
Aha... found it! Sed it is -

Code: Select all

| sed -n '2p'
... does the trick.

So -

Code: Select all

show11)
    tomorrow=`grep yweather:forecast '/root/.pwidgets/tmp/wever-tmp' | sed -n '2p' |cut -d '"' -f 8 `
    tomorrow2=`grep yweather:forecast '/root/.pwidgets/tmp/wever-tmp' | sed -n '2p' |cut -d '"' -f 6 `
    tomorrow3=`grep yweather:forecast '/root/.pwidgets/tmp/wever-tmp' | sed -n '2p' |cut -d '"' -f 10`
... now correctly displays tomorrow's weather - not four days ahead as it was OOTB.

I'll just attach the entire revised script (remove fake .tar.gz, as usual) -
Attachments
WeatherStation.tar.gz
Revised WeatherStation script
(5.19 KiB) Downloaded 252 times

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

Re: Weatherstation Winds Well Directed

#3118 Post by Moat »

Hi David!
davids45 wrote:... so I now see how the wind is blowing - gently and from the SE...
Excellent! :D

More tweaks posted above, if you're feeling a bit adventurous and also wish that tomorrow's forecast doesn't catch you off guard when you step outside. :shock:
davids45 wrote:I might continue to play around with this, hoping someone who may know what they are doing could help with a font-curative post??
Yes, hoping somebody font-smart drops in, too. In the meantime, I might just fallback to my Mint install, attempt to find a font editing/creation app, and give it a go myself. A 100% learning experience...

G'day back!

Bob
Last edited by Moat on Fri 01 May 2015, 11:20, edited 1 time in total.

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#3119 Post by Moat »

DoH!

zagreb999
Posts: 567
Joined: Fri 11 Apr 2014, 06:39
Location: Yugoslavija

save file

#3120 Post by zagreb999 »

MR.
CAN YOU MAKE A PET FOR
SAVE FILE AS PWIDGET,
LIKE RAM MEMORY?
THANKS!

User avatar
jrb
Posts: 1536
Joined: Tue 11 Dec 2007, 19:56
Location: Smithers, BC, Canada

Accuweather RSS feeds

#3121 Post by jrb »

Hi All,

Recently I was dismayed to see that my weather widget had quit working. Upon investigation I found that the Accuweather RSS feeds for many small Canadian towns had been abandoned. :cry: I don't know if this is true for any of the rest of the world but I decided to take action.

I have rewritten the /usr/local/pwidgets/widgets/scripts/weather and /usr/local/pwidgets/widgets/scripts/weathericon scripts to use the http://www.accuweather.com of your town ( http://www.accuweather.com/en/ca/smithe ... cast/52722 ) instead of the RSS code ( NAM|CA|BC|Smithers ).

You should install this pet AFTER installing the normal pwidgets pet.

So when you go to setup the weather location click on the "www" button which will take you to http://www.accuweather.com, find your town, copy the url and paste it into the pwidgets weather location dialog box. You should be good to go from there. I've tried it for various places in the world and it has worked for all so far.

It would be better if these files were incorporated into the normal pwidgets pet, perhaps as weather3 and weathericon3 but, sadly :oops: , I don't have the gtkdialog skills to do that. Zigbert, maybe you can have a look?
Attachments
pwidget-weather-http.02.pet
use http instead of rss
(1.48 KiB) Downloaded 380 times

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

Space_Puppy_filesystem widget

#3122 Post by davids45 »

G'day zagreb999,

The pwidget Space_Puppy_filesystem will show the SaveFile space for a Frugal install and the partition space for a Full Puppy.

I have attached three screen shots of different types of Puppy.

I hope you can read the Puppy Space widget display to see if that is what you asked for.

[I add the RAM and CPU bars (TEXT lines in those widget config files) to Space_Puppy_filesystem widget config so the one widget shows these data.
Easier for adding to new Pups.]

David S.
Attachments
Full_PartitionSpace.jpg
Full install where Puppy has partition to itself so size of partition is shown with how much is used. Partition is 2.88GB with free space 1.77GB.
(87.1 KiB) Downloaded 958 times
Frugal_partitionsave.jpg
Frugal Pup with &quot;partition&quot; chosen for SaveFile (will use all space if needed). My Frugal partition is 38.45GB with free space now 18.45GB for Pups to use.
There are about 20 Pups on this partition.
(89.64 KiB) Downloaded 915 times
Frugal_FolderSaveFile.jpg
Frugal Pup with Save file as folder (512MB) so Puppy Space display shows 503MB with 464MB free. This Frugal is on the same partition as the other Frugal example.
(44.97 KiB) Downloaded 953 times

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

Weather widget 're-location'

#3123 Post by davids45 »

G'day jrb,

I have tried to use your alternate weather widget that uses the accuweather source.
I can pick from a couple of nearby weather stations (about 5km away) so have no problem there.

I loaded your .pet and added the address of the North Ryde weather station to the line in the Weathericon script.
#!/bin/sh
#AccuWeather icon, using weather.ttf
#USAGE: WeatherIcon <locationcode>
#Sintot
#150503-modified by jrb to use accuweather http ( ex: http://www.accuweather.com/en/ca/smithe ... cast/52722 )

METRIC=1
LOCCOD="http://www.accuweather.com/en/au/north- ... cast/12470"
if [ -z $1 ] && [ -x $LOCCOD ] ; then
echo
echo "USAGE: $0 [locationcode]"
echo
exit 0;
elif [ ! -z $1 ] ; then
LOCCOD=$1
fi
# ---------------------Proposed Change Start-------------------------------------------------------------------------
# Load from accuweather to a scratch file first for testing before overwriting the main file

echo $LOCCOD > $HOME/.pwidgets/tmp/Weather_City.tmp #jrb
CITY=`echo $LOCCOD | cut -d "/" -f 6` #jrb
curl -s $LOCCOD | grep -e RecentLocationsCarousel.push | grep -e $CITY > $HOME/.pwidgets/tmp/Weather.tst #jrb
Not sure if this needs to be in quotation marks or not? Maybe you could actually put in your Smithers URL as a working example.

My main question is about the Weather config text file.
When I want to add the Weather widget, pwidgets asks for a location based on the older format (see attached screen shot).
What do I do there? Or is there something else to be changed or have I missed an important step?

David S.
Attachments
Weather_config_text.jpg
Dialog box for Weather widget - old format location?
(101.81 KiB) Downloaded 383 times

User avatar
jrb
Posts: 1536
Joined: Tue 11 Dec 2007, 19:56
Location: Smithers, BC, Canada

Re: Weather widget 're-location'

#3124 Post by jrb »

HI David,

Sorry for the confusion.
davids45 wrote:I loaded your .pet and added the address of the North Ryde weather station to the line in the Weathericon script.
No need to do anything in either of the scripts in my .pet, all you have to do is enter the URL, without quotes, in the Weather config dialog box.
My main question is about the Weather config text file.
When I want to add the Weather widget, pwidgets asks for a location based on the older format (see attached screen shot).
What do I do there? Or is there something else to be changed or have I missed an important step?
Yes, as I mentioned in my first post, my gtkdialog skills are not great and I don't really understand what triggers the Weather config dialog box. So, for now, it still asks for the old format, just ignore that and paste in your URL.

The URL will only show up in line 48 of /root/.pwidgets/widgets/Weather.

BTW: I wanted to ask you where you found the RSS code for Weather_Station?
Attachments
pwidge_reply1.jpg
(19.76 KiB) Downloaded 867 times

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

Revised Weather Widget

#3125 Post by davids45 »

G'day jrb,

Thanks for replying and I have done as you indicated, just copying the accu weather URL for my nearby weather station at North Ryde into the Weather config box, and it is all good.

Re the revised 'Weather Station' widget:
The address for my weather feed is entered into its config file as:
#### PWIDGETS #####
HEIGHT=210
OFFSET_X_LEFT=40
OFFSET_X_RIGHT=20
URL=http://weather.yahooapis.com/forecastrss?p=ASXX0112&u=c
AS=Australia, 0112 is Sydney and c is for not-funny degrees.


I think however Yahoo is not as comprehensive as Accuweather, as I have trouble getting a nearer weather station than "Sydney" which is about 10km away and closer to the ocean/harbour. Accuweather lets me have either of the two local stations I know of - although Hunters Hill looked odd today with the wrong weather (cloudy - didn't see one all day) and temperature (13C when it was more like 20C). Perhaps they have the wrong "Hunters Hill". I'll try a bit more testing of this.

Nonetheless, the temperatures agree between the two widgets but the icon for the Weather Station widget is not right or up-to-the-minute sometimes. Well after sunset here, it was still showing a sun icon with some clouds. It has been cloudless all day here in Chatswood and we are in for a cold (by our standards, not yours probably :wink: ) clear night. Accuweather has been quite accurate in comparison - sunny then a clear night.
Perhaps this is a problem due to slower updating by Yahoo?
Partial screen shot attached showing both widgets.

Can we get all the details in accuweather that Yahoo reports (mostly looking right) and optionally use accuweather in the Weather Station widget? Pick the input that has the better source for one's location?

David S.
Attachments
weather_widget_comparison.jpg
WeatherStation (Yahoo feed) upper, Weather (accuweather) lower. Clear night outside.
(47.71 KiB) Downloaded 839 times

Post Reply