Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 15 Dec 2018, 07:37
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
'TEMPS' - Electron-based weather app for nearly every Pup...
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [15 Posts]  
Author Message
Mike Walsh


Joined: 28 Jun 2014
Posts: 4460
Location: King's Lynn, UK.

PostPosted: Sun 19 Nov 2017, 17:49    Post subject:  'TEMPS' - Electron-based weather app for nearly every Pup...
Subject description: Runs in the tray.....and a word of advice for any Puppians who may try it!
 

Evening, all.

I can't help thinking I've mentioned this somewhere else.....but I'm hanged if I can find it. So, for anyone who'd like a halfway-decent weather app, which runs from the tray, here is

Temps

I've been running this for around a year, and I'm extremely impressed with it. I think I found it on either MakeUseOf or OMG! Ubuntu (but I can't remember now!)

Homepage is here:-

https://jackd248.github.io/temps/

It's essentially a smartphone app, but has been adapted to run on the Windows, Mac & Linux desktops. After downloading, extract the package, and you'll end with a directory called either temps-linux-ia32 or temps-linux-x64, depending on your architecture.....it's available for both.

Inside this directory, you'll find a binary called, quite simply, 'temps'. Click on this, and after quite a few seconds, it'll launch. I believe it's not only setting itself in /tmp during this time (like AppImages do), but it's also connecting to the OpenWeatherMap API.





Talking of which, you'll need to get yourself an OpenWeatherMap API 'key'. You can use the existing one that comes with it, but after around 4-6 weeks this will quit on you. Just go to

http://openweathermap.org/

.....create a free a/c, and then click on the API tab at the top, and you can create as many API 'keys' as you need. Doesn't take long.

--------------------------------------------

When you've got your 'key', bring the app up with a click on the tray icon, then click on the two horizontal bars in the top-left corner; this will take you to the settings view. You'll need to delete the default location, which is Berlin; enter your location (you can get this from the OpenWeatherMap 'Maps' tab), then delete the API key and enter your own. I find the easiest way to do this is to copy'n'paste the same way Puppy does in urxvt; simply highlight to 'copy', then use the middle mouse button to 'paste'. (If you attempt to right-click for 'Paste' while the app's open, it promptly disappears..!)





When you've got the settings how you want 'em, just click on 'Apply'.

You get a four day forecast, and you can bring up temperatures for different times of the day by clicking on any of the forecast days. This gives you a simple temperature 'line graph'; by moving along this it'll show the rise & fall throughout the day. To go back, just click anywhere on the line.





It changes colour according to the temperature; from greys/dark blues for very cold, to deep orange & red for very hot.....and it has some pretty neat animations for rain/hail/sleet/snow, etc. All very nifty!

(I'm afraid mine are dull gray at the moment, 'cos it's currently bloody cold over here..!!) Laughing

---------------------------------------------------------------------------------

You can unpack the directory anywhere you want. /Opt is as good a place as any, or better still, /mnt/home. If you want it to start at boot-time, just sym-link the 'temps' binary into /root/Startup.

Couldn't be simpler!

It creates a directory in /root/.config. If you want to run this in multiple Pups, as I do, the easiest way is to place the Temps directory on a remote partition; sym-link the Temps 'binary' into each Pup's /root/Startup; allow it to create the 'config' folder in /root/.config the first time, then move this to the same location as the remote Temps directory, and sym-link it back into each Pup's /root/.config directory. This preserves your settings, and saves having to set it up again for every Pup.

--------------------------------------------------------------------------------

A word of warning, though; it seems the bods at OpenWeather occasionally decide to edit place names. Mine has been entered as 'King's Lynn, GB' for ages.....until this last week or so, that is. I started getting 'Failure during data fetching', along with loads of squiggles instead of the proper display. Turns out someone had taken it into their head to remove the apostrophe ('), so that it now reads 'Kings Lynn, GB'. That's all it took to chuck a spanner in the works, so.....do be aware of this possibility, boys & girls.

--------------------------------------------------------------------------

Personally, I can thoroughly recommend this one, kiddiwinks. It's one of the neatest weather apps I've seen by a country mile. The only Pups I can't get it to run in are Racy 5.5 and Lucid; it requires a minimum glibc of at least 2.15, I'm afraid.....

Enjoy.


Mike. Wink

_________________
MY PUPPY PACKAGES | 'Thanks' are always appreciated!
--------------------------------------


Last edited by Mike Walsh on Tue 21 Nov 2017, 10:20; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website 
spiritwild


Joined: 03 Oct 2016
Posts: 160

PostPosted: Sun 19 Nov 2017, 18:03    Post subject:  

I've been running it a while also. Although, lately it's been having issues with "failure during data fetching"
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 4460
Location: King's Lynn, UK.

PostPosted: Sun 19 Nov 2017, 18:19    Post subject:  

spiritwild wrote:
I've been running it a while also. Although, lately it's been having issues with "failure during data fetching"


Mm-hm. Sounds familiar..... Rolling Eyes Smile

I tracked my problem down to the simple fact of some bright spark at t'other end deciding to remove one apostrophe from the spelling of my location. And, as I said, that was all it took to completely bugger things up.

I kept checking my location with its normal spelling, and it kept coming back with 'location not found'... (??)

I did re-install the contents of the Temp directory.....but according to the Github page, it hasn't been upgraded for around a year. The version available for d/l is still the exact same one I downloaded a year ago!

Anyway; my advice is to check the spelling for the location you use very closely, using OpenWeather's own 'Maps' tab on the website. Zoom in as far as you need to, in order to make sure you get the closest location possible.....there's a hell of a lot more weather stations reporting to these websites than most folks realise. I could hardly believe it, but despite King's Lynn being fairly average-sized as far as towns go, it turns out there's nearly 30 weather stations within a 10-mile radius of us..! So it really is a case of 'take your pick'...

No guarantees, but that fixed it for me earlier this evening. It's worth a try.


Mike. Wink

_________________
MY PUPPY PACKAGES | 'Thanks' are always appreciated!
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
perdido


Joined: 09 Dec 2013
Posts: 1064
Location: ¿Altair IV , Just north of Eeyore Junction.?

PostPosted: Sun 19 Nov 2017, 19:25    Post subject:  

spiritwild wrote:
I've been running it a while also. Although, lately it's been having issues with "failure during data fetching"


When mine did that - after I clicked the little = icon in upper left there was a line on the next screen that says "You need a free api key from openweathermap"

Mike described how to get one in his first post.

.

_________________
Giving with an expectation for return brings misery.
Back to top
View user's profile Send private message 
spiritwild


Joined: 03 Oct 2016
Posts: 160

PostPosted: Mon 20 Nov 2017, 09:12    Post subject:  

Thanks, working now. It use to work with city,st but they seem to have changed it up a bit.

I just removed the state and it seemed to be working again.
Back to top
View user's profile Send private message 
Terry H

Joined: 29 Mar 2009
Posts: 492
Location: The Heart of Muskoka, ON Canada

PostPosted: Mon 20 Nov 2017, 17:30    Post subject:  

Mike,
Thanks for creating this thread introducing this weather app, it works very nice apart from an issue on bootup. I installed it and set up, all working well. On bootup I get an error message that /Path/to/Temps-linux-ia32/Temps.app not found, so it doesn't start at all. The path is correct.

As the executable is named only Temps, so to test it I renamed the executable to Temps.app. On startup, it runs and initially displays an error, but then changes to display the local forecast correctly. It still displays the error message screen with message /Path/to/Temps-linux-ia32/Temps.app.app not found. Strange that it gives a not found error but still runs.

So the question is does anyone have an idea why it is trying to execute Temps.app, subsequently causing the error?
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 4460
Location: King's Lynn, UK.

PostPosted: Mon 20 Nov 2017, 18:32    Post subject:  

Hi, Terry.

You want my advice? Ignore it.

I've had the exact same problem all the months I've been using it, right from day one. After the first few times (when, just like you, I started trying to 'fix' it), I quit worrying about it. It starts up, every time, as good as gold. Why bother trying to 'fix' summat that isn't actually 'broken'?

Sure, it's a wee bit annoying.....but it's got so it's just part of the normal start-up routine. It's like the desktop 'furniture'; you get so used to seeing the stuff there, that, half the time, you simply don't pay it that much attention any longer..!

So long as it runs every time, and does what its developer intended it should.....why worry? I suspect it's a bug in the internal code that slipped through the net. I've learnt to live with it. And don't forget; this was originally an Android/iOS smartphone app (you can tell that by the shape of the window). It could be something to do with the way in which those OS's mount stuff.

Who knows?


Mike. Wink

_________________
MY PUPPY PACKAGES | 'Thanks' are always appreciated!
--------------------------------------


Last edited by Mike Walsh on Wed 03 Jan 2018, 07:54; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
Terry H

Joined: 29 Mar 2009
Posts: 492
Location: The Heart of Muskoka, ON Canada

PostPosted: Mon 20 Nov 2017, 18:42    Post subject:  

Thanks Mike, happy with your reply. At least I now know I'm not getting an error, that others aren't getting. Will live with it now.
Back to top
View user's profile Send private message 
B.K. Johnson

Joined: 12 Oct 2009
Posts: 686

PostPosted: Tue 02 Jan 2018, 14:13    Post subject:
Subject description: An alternative
 

What about this as an alternative? That is if you use Firefox. Sorry Mike!
Screenshot-2018-1-2 2Forum-forecast.png
 Description   weather app in Firefox.
 Filesize   187.1 KB
 Viewed   317 Time(s)

Screenshot-2018-1-2 2Forum-forecast.png


_________________
B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM

Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 4460
Location: King's Lynn, UK.

PostPosted: Wed 03 Jan 2018, 07:48    Post subject:  

No worries, BKJ.

The more choices there are available for Pup, the better I like it. Helps us all out that way.....because, as you doubtless know, what appeals to one person doesn't necessarily float another one's boat!

Thanks for the info.


Mike. Wink

_________________
MY PUPPY PACKAGES | 'Thanks' are always appreciated!
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
spiritwild


Joined: 03 Oct 2016
Posts: 160

PostPosted: Wed 03 Jan 2018, 08:54    Post subject:  

it's funny, maybe I'm weird or just creative. You could do anything with browser add ons, wine, online apps, etc. For me it's more of a "I made this work".

I have the temperature displayed on conky, just the temp and either cloudy,sunny or whatever. It's so damn primitive but it's the fact that I had to edit the command to run inside the program.

Except when theirs a glitch, then I go insane.

You would think it's the greatest thing on earth. I may never even pay attention to it but hey, it's my creation. to each their own.

I guess it's like gardening, when it's all said and done, I could have bought tomatoes cheaper. lol
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 4460
Location: King's Lynn, UK.

PostPosted: Wed 03 Jan 2018, 09:10    Post subject:  

Hi, spiritwild.

That's how it is with me and .pets, SFSs, etc. I like nothing better than taking a package built for one distribution (say, 'buntu-based), and re-packaging it with whatever's necessary to make it run in, say, one of the Slackos. Perhaps even a different Pup-series.

I also like taking stuff I find at Github or Sourceforge (especially the latter; they have a huge repo of stuff there), and turning it into a working Puppy package, complete with Menu entries and everything. Initially, I'll build these for myself, but if they then survive further testing throughout the 'kennels', I'm more than happy to share.

I've become extremely proficient at tracking down relevant libs, etc..!

'I made this work'. Yep, couldn't agree more. It's very satisfying when that happens.


Mike. Wink

_________________
MY PUPPY PACKAGES | 'Thanks' are always appreciated!
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
Mike Walsh


Joined: 28 Jun 2014
Posts: 4460
Location: King's Lynn, UK.

PostPosted: Sun 27 May 2018, 15:53    Post subject:  

Evening, all.

Following on from Terry H's observation about getting a start-up error message for Temps, saying it couldn't be found (but still started!), I've tracked the problem down.

IF you remove the sym-link for the 'Temps' binary from ~/Startup. It'll still start.....once. It places a .desktop entry in ~/.config/autostart.....which, from what I understand, is fast becoming the 'standard' location for stuff you want to start at boot. There's rumours that ~/Startup may be eventually left-out in later Puppies, and removed from the 'path'.

However, for this particular app, you can't correct that error. This thing started life as an Android smartphone app.....hence the .app extension it keeps looking for. You can edit and mess around with the executable's name and/or the .desktop entry in ~/.config/autostart all you like.....but this thing has been hard-coded to re-create its startup script/.desktop entry every time it shuts down. So any edits you make simply get overwritten.....and you get the error messages, and failure to start.

That's why I put the sym-link into /root/Startup.....because it was the only way to consistently start the thing. Or, thinking about it, a wee script placed in /etc/init.d would probably do the trick just as well.....pointing to the executable's location.


Mike. Wink

_________________
MY PUPPY PACKAGES | 'Thanks' are always appreciated!
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
Terry H

Joined: 29 Mar 2009
Posts: 492
Location: The Heart of Muskoka, ON Canada

PostPosted: Tue 29 May 2018, 19:56    Post subject:  

Following your revisiting Temps, I have installed it on my Stretch-7.5 RC2 install, which is my got to puppy. I am running it from /root/startup with symlink to executable. It now starts without error message. I just have a timing issue, that it is starting prior to my wifi being accessible. So I may look at running from a script with a sleep in it, but its not a big issue as it is, just a click on taskbar icon after wifi up and its fine.
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 4460
Location: King's Lynn, UK.

PostPosted: Wed 30 May 2018, 06:09    Post subject:  

Hi, Terry.

Mm. Nice one. Of course, the thing that puts many people off using Electron-based apps is the enormous size of the Electron 'framework' itself. In the case of Temps, the whole thing is around 125 MB (!!).....but the 'framework' accounts for something like 110 of that.

So by running a 'common' install of Temps from a remote data partition, sym-linked into every Pup at the appropriate places, and a 'common' .config directory sym-linked the same way, Temps occupies no 'Puppy-space' at all, maintains the settings across the kennels, and is available to all Pups.

(And that 'error' message is just like part of the furniture now; I'm so used to it, I no longer 'see' it any more.)

Win-win..!


Mike. Wink

_________________
MY PUPPY PACKAGES | 'Thanks' are always appreciated!
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [15 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1259s ][ Queries: 13 (0.0171s) ][ GZIP on ]