Puppy now has a home-grown weather forecast utility!

Business software, financial software, etc.
Message
Author
User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#16 Post by drunkjedi »

No worries musher,

I suspected problem should be from source site.
I was not checking Sydney though, but cities from India.
Didn't test much too, only 5 tries each on PC and mobile
I will try today later.
What surprised me was mobile browser was showing consistently and PC never showed even once.

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

Some Pups missing libtinfo

#17 Post by davids45 »

G'day/jour musher0,

I have been trying the less & weather pets in some Full Pups.

Tahrs 5.8.4 and 6.0.2 were fine apart from the already mentioned first-click terminal error/warning message.

Wheezy (one by pemasu) and SnowPup-016 (also one of his) - nothing when trying the report but when I tried running less in a terminal, I got a missing lib message for libtinfo.so.5

Slackos 5.9.3 and 6.30 both got to the desktop weather icon and then location selector but clicking for the report, only a brief flicker of a millisecond report.

I then copied the libtinfo.so.5 from a Tahr (it was in its /lib) to my general Library archive and then copied from my archive to /usr/lib in slacko-6.3.0 and now slacko-6.30 displays the report :D - but still with the terminal error/warning requiring the <Enter> press.

So maybe non-Ubuntu-derived Pups need this missing libtinfo.so.5 for less to do its "magic"?

A minor nuisance that, in slacko, when the weather desktop icon was created, I lost my pwidgets. A Pwidgets re-run recovered the widgets without losing the weather icon.
The weather icon appears where I have my widgets (right-hand side of the display) so I'd like to have the weather icon first appear more centrally on the desktop - is there some way to re-position the first appearance of this icon to mid-screen?

I'll further check the missing library in the non-Ubuntu Pups and let you know if this is a general fix for the missing report problem in them.

Nice sunny winter's day here, but may not reach the 25C 'hottest July day for x years' forecast. But 23C is OK by me and the garden - huskies may disagree, of course.

David S.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#18 Post by musher0 »

Hi David.

Very good report thanks. I had forgotten about the libtinfo dependency and the varying
needs of "the breeds". My apologies.

It's simple as pie to put the icon back in the middle of the screen upon installation.
Will do in next edition.

We had 35 C today if we add the Humidex factor. No huskies outside here either. ;)
They took refuge where there is some Air Conditioning!

BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#19 Post by musher0 »

davids45 wrote:G'jour/day musher0,

Success :D !
Renaming the less file to change the "%2B" expression to a "+" and then installing that has given me the weather in the Unicorn Frugal Pup I'm using at the moment.
I'll attempt an sfs combining the two pets so all my Frugals can share this package at boot-up.

A couple of comments (minor bugs?).
Each start-up of the report has a error message about a not-fully functioning terminal (see screenshot). Pressing return and the report then displays. This may be just this Unicorn Pup - I'll see with some more Pups but I thought I should mention it just in case it's not.

The second screenshot is the full weather display following pressing <Enter> after the error message.
I notice the wind direction 'icon' is being truncated by the next piece of text (the wind speed) - if you look closely at the third screen shot I hope you see the arrowhead for the north-easterly wind/breeze is being chopped; an easterly is cut to just a dash.

Thanks for your help.

David S.

[post-postscript: I see in your just-posted images, the wind direction arrows are just about "unchopped" so it is likely my terminal is at fault? Are all terminals "equal"?]
Hello again, David.

It's good to hear that you finally met with success! :)

~~~~~~~~~~

About the arrows with chopped heads in the terminal, this is the first I've heard of
such a bug, so I don't know what to tell you.

Are all terminals created equal? After reading your account, I'm not sure anymore.

I chose to include the st terminal in the package because our default urxvt was
"absorbing" (intercepting, or not showing) a lot of the ANSI colors in the wttr.in
weather report. Now if there's a problem with st... what else to use?

Other things I see as possible (to investigate, but not necessarily probable):
-- an incomplete or faulty character set in Unicorn Pup?

-- what typographers call "kerning", the spacing between the characters. I know "of
it": there is something like a virtual Linotype in every OS, that sees to it that the
characters of a text are equally and clearly separated. You can play with that kerning
a little in word processors. But in the console? I thought the user's choice of font
took care of that.

Weird.

On the other hand, if you're talking of terminals in the sense of monitors, then no,
they are not created equal. Quality of monitors can and does vary widely.

Sorry I couldn't be of more help on this subject.

BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

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

Further testing in Other Pups

#20 Post by davids45 »

G'day/jour,

I have now copied the missing libtinfo.so.5 to a number of different Pups.

Precise looks OK now, also PupJibaroJessie.

Slackos are also fine with the Tahr-derived libtinfo.so.5.

In PupJibaroWheezy, nothing happened so I tried running less in a terminal and got a 'Missing file' message that I don't understand - see screenshot. What file is missing?

In SnowPup, I saw a message about the wrong glibc - not surprising as this is a kernel-2.xxx Pup.

In DPupWheezy with a 3.5.2 kernel, after less gave the enigmatic above 'missing file' message from the terminal, I ran wttr.in.sh in the terminal and had another glibc message (screenshot).

I may need to explore the LIBRARYPATH option for the affected files?

Why I need as many weather apps as I can get:
:oops: I was wrong again (see my previous post)! Looks like we had 26+C today - so I gave my car its annual "whether it needs it or not" wash. Back to cold for the weekend by the looks of the forecasts :( .

David S.
Attachments
DPupWheezy_wttr_terminal.png
(22.74 KiB) Downloaded 578 times
Screenshot_less_pupjibarowheezy.png
(22.02 KiB) Downloaded 590 times

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

Re: Further testing in Other Pups

#21 Post by musher0 »

davids45 wrote:G'day/jour,

I have now copied the missing libtinfo.so.5 to a number of different Pups.

Precise looks OK now, also PupJibaroJessie.

Slackos are also fine with the Tahr-derived libtinfo.so.5.

In PupJibaroWheezy, nothing happened so I tried running less in a terminal and got a 'Missing file' message that I don't understand - see screenshot. What file is missing?

In SnowPup, I saw a message about the wrong glibc - not surprising as this is a kernel-2.xxx Pup.

In DPupWheezy with a 3.5.2 kernel, after less gave the enigmatic above 'missing file' message from the terminal, I ran wttr.in.sh in the terminal and had another glibc message (screenshot).

I may need to explore the LIBRARYPATH option for the affected files?

Why I need as many weather apps as I can get:
:oops: I was wrong again (see my previous post)! Looks like we had 26+C today - so I gave my car its annual "whether it needs it or not" wash. Back to cold for the weekend by the looks of the forecasts :( .

David S.
Hi David.

Another informative report. Thanks.

Less needs a text file to show the user! The less program is a text reader. Proper
syntax is < less text-xyz.txt >. If you don't have a *.txt file nearby to feed it, you
could do as your screen cap suggests and type < less --help > ! This means that
less is working though.

The DPupWheezy libc result with st was to be expected. I compiled it on Precise
5.4.3 that has a glibc of 2.15, whereas wheezy's glibc is only a 2.13. Back to the
drawing board on that one.You don't need to change anything, I'll simply recompile
st on a lower glibc such as DpupWheezy's.

About yesterday's arrowheads: the Inconsolata font has been fired. It was "her
fault": she couldn't keep her heads. ;) The LiberationMono font is being called in
as a substitute.

BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#22 Post by musher0 »

Hello all!

Here is the latest version: WorldWeather-3.7c9-corr2.pet. Please download from:
http://www82.zippyshare.com/v/Nruf9Oqk/file.html

(If you downloaded earlier, please accept my apologies and download the above.
French member augras discovered an oversight in the previous archive. I also found
a couple of oversights. The archive above now contains the appropriate corrections.)

Changes :
-- The menu is now using vovchik's new evolution of aemenu, aemenu-pango
(please see attached capture). Many thanks to vovchik. This evolved aemenu
incorporates markups (such as typographic characters, bolds, etc.) to make the
menu easier to focus on, and generally clearer.

This welcome update by vovchik means that you can follow a kind of "style sheet"
to keep the parts of your menu consistent with one another.

-- Any advanced operation (such as cleaning up old weather reports in /var/tmp) is
now grouped under the "Expert" sub-menu.

-- The stations.txt list of world weather stations is now included in the "Expert"
sub-menu. This list enables the user to search for a location pretty much in any
country.

Once the list is displayed in the less reader, to search it you type "/" (forward
diagonal) character and the name of a location. To continue searching forward for the
word, you type "n"; to search backwards, you type "N" (capital n).

-- The icon is back in the middle of the screen.

-- The Inconsolata font has been replaced with the LiberationMono font because of
the arrowheads not showing properly in the Inconsolata font.

-- I recompiled the st terminal under a sulu Puppy (C library 2.11) to accommodate
use of the script with older Puppies.

-- The version number change from 2 to 3 means that this is the 3rd interface
(vovchik's "pango" aemenu is being used in this version, whereas the regular aemenu
was used in version 2, and a straight console was used in version 1). The other
numbers refer to the main script version (which means it has remained virtually
unchanged from last time.)

If you find a bug, please do not hesitate to leave a post here.

Enjoy! :)
Attachments
weather-menu-with-markups_2016-07-23(1).jpg
(28.37 KiB) Downloaded 548 times
weather-menu-with-markups_2016-07-23.jpg
(24.23 KiB) Downloaded 569 times
Last edited by musher0 on Sat 23 Jul 2016, 23:23, edited 2 times in total.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#23 Post by musher0 »

There was a suggested correction here, but it's not needed if you download the very latest
archive mentioned above.

Thanks for your understanding.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

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

Wind direction - almost right

#24 Post by davids45 »

G'jour/day musher0,

I'm trying your latest version (link in your second last post).

The weather icon was screen centre and not behind my widgets :) , although in this Wheezy Pup, it did make the widgets disappear as before. Pwidgets sometimes does this with other packages, so it is probably a pwidgets issue. Re-starting pwidgets and all is good again.

Also I still have the "terminal not fully functioning" message and I need to hit <Enter> for the report to display. Check the top line of the attached report screenshot where this warning/error is still present. Your early report screenshots don't have this start-up message so it is a puzzle for me as all my Pups seem to do this Warning.

Your fix for getting the wind direction arrows to fully display is nearly right. In the attached screenshot, the SE wind arrow looks thicker than the easterly wind arrow and is very slightly cut at its tip?

Can the wind arrows be coloured (e.g. blue, which does not look like it is used for other coloured text)? Today, these are very cold winds here, so blue looks appropriate, for this hemisphere anyway :) ).

Thanks for your efforts,

David S.
Attachments
weather_windarrows.png
Top corner of latest report
(34.52 KiB) Downloaded 510 times

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#25 Post by musher0 »

Hello David.

Thanks for the thanks and thanks for testing.

About the arrowheads: at least now it affects only part of the NW and the SW
arrows. But I'm still looking for a better font.

As to coloring the arrows in blue or another color, I'm afraid that the change for
that would be up river from this script, on Mr. Chubin's originating site. Besides,
the wind speed numbers right next to the wind arrow are colored, no?

I have discovered that our developer colleague Chubin has color-coded the digits
for the wind speed and the temperatures: if you look closely, you'll see that the
higher those digits are, the "redder" they get!

~~~~~~~~~
I found a number of potential solutions for the "Terminal Warning" through
http://www.ask.com/web?q=linux+terminal ... archTopBox

Are you running your Puppies on a Windows-based virtual machine of some kind?
The bug seems to happen mostly on WhineDose machines. In any case, what
does

Code: Select all

echo $TERM
tell you?

A potential solution suggested by ubuntu users could be to type, in terminal,

Code: Select all

export TERM=xterm
and/or to include it near the top of your /root/.bashrc configuration file.
(Please see attached screen captures.)

Have a great day!
Attachments
this-is-what-I-have_2016-07-24.jpg
(2.95 KiB) Downloaded 506 times
this-is-what-I-have_2016-07-24(2).jpg
(43.54 KiB) Downloaded 502 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#26 Post by musher0 »

@David:

About you having to restart pwidgets after the weather script icon has been placed,
here's a new take on the pinstall.sh script.

This script should :
-- kill any running pwidgets
-- place the weather con in the middle of the screen
-- then restore the pwidgets to their former state.

Care to try it? You can try it on its own. It will just put another weather-script icon
on screen. It worked on my set-up, but I'd like to have a second opinion, please,
before I incorporate it in my next version. Thanks in advance.

BFN.
~~~~~~~~~~~~~~~~~~

Code: Select all

#!/bin/sh
# pinstall.sh # pour / for Meteo-ds-le-monde
# (c) Christian L'Écuyer, alias « musher0 » (forum PuppyLinux), 
#     ... Gatineau (Qc), Canada, 23 juillet 2016. GPL3. ...
#  /usr/share/doc/meteo-tradFR/gpl3_fr.sh affichera la license.
####
fc-cache -r # pour installer la fonte requise. / To install the required font.

####
# Icone-Meteo # pour déposer l'icône sur le bureau
####
[ "`ps | grep pwidgets`" ] && PwidgetS=1 && killall -q conky
# Remove any running pwidgets.

# Prepare 
cd /root/Choices/ROX-Filer
cp -f PuppyPin PuppyPin.cdr # Copie de réserve / Back-up

HauTPPin="`wc -l < PuppyPin`";HauTPPin="`expr $HauTPPin - 1`"
head -n $HauTPPin PuppyPin > PuppyPin.tmp

# Measure screen
VertIcN="`xwininfo -root | awk '$1=="Height:" { print $2/2}'`" 
HorizIcN="`xwininfo -root | awk '$1=="Width:" { print $2/2}'`" # 8*7
# En plein milieu de l'écran. / Right in the middle of the screen.
[ "${LANG:0:2}" = "fr" ] && EtiqT="Météo" || EtiqT="Weather"

# Create new PuppyPin
echo "<icon x=\"$HorizIcN\" y=\"$VertIcN\" label=\"$EtiqT\">/usr/share/applications/Weather_around_the_World.desktop</icon>
</pinboard>" >> PuppyPin.tmp

# Enable
mv -f PuppyPin.tmp PuppyPin
rox -p /root/Choices/ROX-Filer/PuppyPin

# Restore pwidgets if they were active.
[ $PwidgetS -eq 1 ] && /root/Startup/0_show_widgets
Attachments
pinstall.sh.zip
Unzip in /root/my-applications/bin, make executable and run. (It's the same script as the one above.)
(960 Bytes) Downloaded 533 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

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

Success with Wheezies with latest version (glibc fixed?)

#27 Post by davids45 »

G'jour/day musher0,

I've now tested your latest version in two Wheezy Pups that hadn't reported with earlier versions but now both do :D .

I don't have Windows on this computer and 'echo $TERM' returned 'xterm' in this Pup (Frugal PupjibaroWheezy).

I had noticed the colouring of the numbers for temperature and wind speed, and now you've pointed it out, the higher values have the psychologically warmer colours. Although looking at a few currently warm cities, there is a bit of variation for the change-over values. I wonder what the colour change will be for +50C which is more likely in the future - I'd almost class that as 'getting a bit hot' :shock: .
What about colouring the wind direction arrow the same colour as the first speed value, or would that detract from its visibility - where the wind is coming from is as important as its speed range, if not more so, in my experience.

I see you displaying a fancier set of dialog boxes during location selecting than I get. Is that with vovchik's aemenu-pango pet which must be separately installed? Will it affect all program menus?

I'll test when I can the other fixes you've offered in recent posts, and report back.

An ongoing thank you.

David S.

ASD

#28 Post by ASD »

Hi again musher0,

Just to let you know; I took up your suggestion and sent an email to Igor a few days ago - asking for clarification about the precise meaning of some of the output.

He may be away or perhaps he is busy with important matters, but I'll post again if I have anything useful to report.

I tried your later version and note that "Noon" now reads "Afternoon", which seems have been effected by you rather than Igor.

There will be hundreds of UK locations where local postcodes work well so that's encouraging.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#29 Post by musher0 »

ASD wrote:Hi again musher0,

Just to let you know; I took up your suggestion and sent an email to Igor a few days ago - asking for clarification about the precise meaning of some of the output.

He may be away or perhaps he is busy with important matters, but I'll post again if I have anything useful to report.

I tried your later version and note that "Noon" now reads "Afternoon", which seems have been effected by you rather than Igor.

There will be hundreds of UK locations where local postcodes work well so that's encouraging.
Hi ASD!

Yeah, translating "noon" to "afternoon" is my doing! Guilty as charged! Also thanks
for trying to get in touch with the "up river" author.

You are right about the postal codes. I tested my postal code for Canada and it
works fine. Another way to find the weather for your exact location is entering the
latitude and longitude of your home. You may get that info using a little program
called Locator, which the forum has right here!

I mention these little tricks because sometimes entering the name of your city or of
the nearest airport doesn't quite cut it. For example, this morning, for my city, the
wttr report said there was intermittent rain, but it was pouring outside my window!!
When I narrowed it down with the postal code and even more so with the lat./long.
coordinates, the weather report and the actual weather "agreed", as davids45 once
put it! :)

Finally, responding to an earlier concern of yours, I found a way to integrate the
imperial (aka Fahrenheit) degrees in the menu. I published it already on the
French side. However, I didn't have the time to translate the presentation and
explanations of the changes and additions yet and publish it here.

Also the new archive is in two parts, which you have to reassemble with this line

Code: Select all

cat WorldWeather-3.8a.pet-0? > WorldWeather-3.8a.pet
before installation proper. (If you wish to get it from there.)

TWYL. (Talk With You Later.)
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#30 Post by musher0 »

Good evening everyone.

Please welcome version 3.8a.

Changes
-- You can now search the Stations.txt reference without worrying about upper-case
or lower-case.

-- The script has been promoted : version 3.8a ;)

New
-- Four new items in the « Expert » sub-menu :

-- 2 little no-fuss converters, from Celsius to Fahrenheit and vice versa

-- You can select to have the reports in Celsius ou Fahrenheit degrees. (Watch it:
if you change degrees, all existing weather reports will be erased.)

Installation
-- Detection of pwidgets at install time: if pwidgets is active, it is closed before the
weather script icon is placed on the desktop, and then it is re-activated. Thanks to
davids45 for making me aware of the problem.

-- The pet archive is attached, but in two parts. To re-assemble it, type:

Code: Select all

cat WorldWeather-3.8a.pet-0? > WorldWeather-3.8a.pet
Screen caps will follow.

Enjoy!
Attachments
Script_Meteo-3.8a_EN-2016-07-26.jpg
(37.86 KiB) Downloaded 424 times
WorldWeather-3.8a.pet-01.zip
Please see how-to below.
(188.46 KiB) Downloaded 539 times
WorldWeather-3.8a.pet-02.zip
Unzip the two parts in a convenient place. Open a terminal in that directory and type the line above to reassemble the parts. Then install the reassembled pet archive as usual.
(188.45 KiB) Downloaded 529 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

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

A stand-alone Config directory (not /var/tmp)?

#31 Post by davids45 »

G'day/jour musher0,

Thanks for the continuing improvements to the "weather".

I see the expert information is held in separate files in /var/tmp.

I run lots of Pups on this computer and wherever possible, centralise personal program data such as config files on my data partition and symlink these out to the Pups. Every Pup has the same personal information so I don't need to do a lot of re-installing of profiles and the like. Any new or updated 'expert' information can be immediately shared by all Pups.

Could the 'expert' information (that is, stuff I create for me within the program as my 'profile') be held in a separate and specifically named directory, for example, /var/myweather/ or /root/.config/myweather? I then just symlink this special directory to keep every Pup up to date.

This is rather than use separate files in a 'general' directory like /var/tmp that other programs may also send files to? Symlinking every Pup's /var/tmp to my data partition may give problems with other programs or other programs could over-write my 'expert' profile.

This symlink of profile data is particularly handy with frugals who already share sfs files. Have you tried an .sfs yet as an alternative to the .pets?

David S.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

Re: A stand-alone Config directory (not /var/tmp)?

#32 Post by musher0 »

davids45 wrote:G'day/jour musher0,

Thanks for the continuing improvements to the "weather".

I see the expert information is held in separate files in /var/tmp.

I run lots of Pups on this computer and wherever possible, centralise personal program data such as config files on my data partition and symlink these out to the Pups. Every Pup has the same personal information so I don't need to do a lot of re-installing of profiles and the like. Any new or updated 'expert' information can be immediately shared by all Pups.

Could the 'expert' information (that is, stuff I create for me within the program as my 'profile') be held in a separate and specifically named directory, for example, /var/myweather/ or /root/.config/myweather? I then just symlink this special directory to keep every Pup up to date.

This is rather than use separate files in a 'general' directory like /var/tmp that other programs may also send files to? Symlinking every Pup's /var/tmp to my data partition may give problems with other programs or other programs could over-write my 'expert' profile.

This symlink of profile data is particularly handy with frugals who already share sfs files. Have you tried an .sfs yet as an alternative to the .pets?

David S.
Hi David.

My pleasure!

Interesting idea.

Not an sfs, no, because sfs's are static, and weather data is dynamic by nature.

A directory outside the pupsave file, possibly at /mnt/home/Weather comes to
mind. It could be accessed from different Pups. I'll give it some thought.

BFN.

~~~~~~~~~~~~~
PS. What do you think of this other idea?
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#33 Post by musher0 »

Hello again, David.

Here you go!

This little script will let you change where you store your weather reports. It's
reversible. From /var/tmp to /mnt/home/Vetero and vice versa. ("Vetero" is the
esperanto word for "weather".)

The script will move "almost" all your data from A to B. I say "almost": the only
caveat seems to be any longitude/latitude data that you would have: those will
have to be re-fetched in the usual way.

Any feedback on bugs is welcome, as you know.

Enjoy!
~~~~~~~~~~~

Code: Select all

#!/bin/sh
# Vetero.sh # Change from /var/tmp to /mnt/home/Vetero and vice versa.
# Changer de /var/tmp à /mnt/home/Vetero et vice versa.
# Dépendance / dependency : replaceit
# (c) Christian L'Écuyer, alias « musher0 » (forum PuppyLinux), 
#     ... Gatineau (Qc), Canada, 27 juillet 2016. GPL3. ...
#  /usr/share/doc/meteo-tradFR/gpl3_fr.sh affichera la license. 
#  /usr/share/doc/meteo-tradFR/gpl3.sh will show the licence.
####
case "${LANG:0:2}" in
	fr)MssG="
\t\e[1;3;37mVeuillez entrer où vous voulez enregistrer les bulletins météo :

\t\t\e[1;3;37m'var' pour les enregistrer dans /var/tmp
\t   \e[1;3;37m'home' pour les enregistrer dans /mnt/home/Vetero\e[0m
" ;;	
	*)MssG="
\t\e[1;3;37mPlease type where you want your weather info to be stored:

\t\t\e[1;3;37m'var' if you want it stored in /var/tmp
\t   \e[1;3;37m'home' if you want it stored in /mnt/home/Vetero\e[0m
" ;;
esac
echo -e "$MssG"

read W

case "$W" in
	home)mkdir -p /mnt/home/Vetero # The word "weather" in esperanto!
	mv -f /var/tmp/* /mnt/home/Vetero
	replaceit --input=/usr/local/bin/meteo-tradFR-8a.sh "/var/tmp" "/mnt/home/Vetero" 
	;;
	var)# In reverse
	mkdir -p /var/tmp
	mv -f /mnt/home/Vetero/* /var/tmp
	replaceit --input=/usr/local/bin/meteo-tradFR-8a.sh "/mnt/home/Vetero" "/var/tmp"
	;;
esac # echo $W

chmod +x /usr/local/bin/meteo-tradFR-8a.sh

case "${LANG:0:2}" in
	fr)NotE="
\t\e[1;3;37mNOTA -- Veuillez noter qu'un tel déplacement des données peut
\t\e[1;3;37mrendre inutilisables vos enregistrements en longitude et latitude. 
\t\e[1;3;37mSi tel était le cas, veuillez effacer ces données en long./lat.
\t\e[1;3;37met demander de nouvelles prévisions avec ces coordonnéees.\e[0m
" ;;
	*)NotE="
\t\e[1;3;37mNOTE -- Please be aware that this move process can make your 
\t\e[1;3;37mlongitude/latitude data unusable. If such was the case, 
\t\e[1;3;37mplease erase the former long./lat. data and ask for a new  
\t\e[1;3;37mreport with the same coordinates.\e[0m
" ;;
esac
echo -e "$NotE"
Attachments
Vetero.sh.zip
Unzip in /usr/local/bin and make executable.
(1.04 KiB) Downloaded 617 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

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

Vetero script

#34 Post by davids45 »

G'day/jour musher0,

I downloaded the .zip you posted and made the extract executable.

I run it in a terminal but get nothing but a blinking cursor after a few blank lines (see screenshot). (The screenshot happened during a blink of the cursor :roll: so it's missing )
There is no new directory in /mnt/home/ and my sydney.source file is still in /var/tmp
I have the dependency (replaceit) installed.

I'd like the weather package to put the sydney weather source file into /mnt/sda5/Puppy_Archive/weather/ rather than /var/tmp by default.

Is this what your script will do? I can then make my own pet from the installed files that will automatically include Sydney when this pet is installed into any new Pup. Likewise an sfs for the Frugals with Sydney already 'loaded' in the expert area.

Thanks,

David S.
Attachments
image-7.png
missing cursor about halfway down window
(21.11 KiB) Downloaded 555 times

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#35 Post by musher0 »

Hi David.

Oops. :oops: My oversight. I forgot that some people prefer their console to have
black type on a white background. I prefer white on black myself.

I used ANSI codes to color the type white, which is why you are seeing nothing...
Sorry about that... :oops:

Ok. I'll change the color of the type. What is your favorite color ? Red? Green?
Blue? :D How about purple? In ANSI we have a limited choice of 8 colors, but still.

Unless you have a ready-made black background console somewhere?
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Post Reply