riquezjp / kitchenTV

Kitchen TV; weather, clock, live news feeds & video for Raspberry pi using PHP/javascript
GNU General Public License v3.0
26 stars 12 forks source link

Future Enhancements List #3

Open JoshuaKimsey opened 7 years ago

JoshuaKimsey commented 7 years ago

So I figured It'd be a good idea to have a central list of ideas that we could implement in the future for the KitchenTV!

Here's the one's I have so far, based on what you and I have said:

*This list will be edited to include new features you or I think of in the future

riquezjp commented 7 years ago

Hi J95!

I just updated the master with a few updates. • single config file; config.php • editing channels should be easier as the new arrays don't require a number so its easier to delete one from the middle & you dont have to worry about renumbering etc. • made some slight CSS changes which makes a start on resizing for various screens. Namely the temp & headlines text which resize based on the window width.

Next I think your idea "control forecast days, channels, and custom sites more easily" is great & hope to get that going.

KTV is nice, sounds like a channel I like that, but KitchenTV is so descriptive! It's obvious what it is right away ;-)

Any comments & ideas are welcome :-)

riquezjp commented 7 years ago

Updated ~ Now number of weather days & location is set in config.php

riquezjp commented 7 years ago

The clock face PNG & background gradients JPG would be more efficient as CSS but not as easy for people to customise. Like this its very easy for people to swap the images. Its only about 30KB for the icons & backgrounds, almost nothing by today's standards. But no harm in also having a CSS option for the background for those that prefer it.

Background img for the weather would be good. It would be fun for people to change those to their local town or dream holiday destinations etc

For me the web browsing part doesnt work well & is slow (using pi in kitchen) - The point was so you can get recipes on screen etc. If you use that feature you will start noticing many websites don't allow loading in a frame, so you get a blank page. Not sure how to get around that though.

JoshuaKimsey commented 7 years ago

Outstanding! I will pull the new changes and check them out! They all sound awesome to me, especially the separating the HTML and PHP code. :)

With my fork of the project, I am going to upload the latest changes I made there so you can see if you like any. Otherwise, I will take my changes and adapt them to your code! Tell me which if any of the features I added that you like, as I'll make another branch of your new code to add them! :)

JoshuaKimsey commented 7 years ago

Ok, I added my final improvements to my fork of the code! Granted of courses it's still in the old format, but you should still be able to see the ideas I was going for by making those changes! Let me know which of them you like and I'll try incorporating them into the new version of the code! :)

*Hint: It might be easier to look through the commits to see exactly what I changed if you can't easily see it by looking at the code

https://github.com/hsoj95/kitchenTV

riquezjp commented 7 years ago

I like what you did loading Wunderground in the frame. I think this can be explored further with some other useful reference website. (tides, typhoons, tornados, sunrise, webcams!)

JoshuaKimsey commented 7 years ago

Yeah, I mainly did that because my limited internet data plan would die if I left YouTube streaming constantly, but it also has the nice benefit of having a dynamically updating weather page easily accessible. I absolutely agree that it could be exploited further! I had intentions of having one for a news site. Problem is that since news sites tend to be quite dynamic, even a site like the Drudge Report, it makes it difficult to easily have it autoscroll to where it needs to be on the webpage in the frame. I like your idea of having other weather options available to show! Being in the Southern US, one for severe weather would be quite handy! :)

Also, no I don't live in Beverly Hills! I just needed a default location that wasn't my own! 😝

riquezjp commented 7 years ago

Should be possible to pull out sections from a website to load in that frame area, in a similar way to how the BBC RSS feed is cherry picked for the bits needed.

$file=file_get_contents("http://abc.com/page.html"); 
preg_match_all("%<title>(.*?)</title>%s", $file, $titles,PREG_PATTERN_ORDER,920);

This will extract all the content between the tags it can find, but theres a simpler version preg_match() if you just want one section of a page. You just need to identify the unique html on the page to start & end with.

JoshuaKimsey commented 7 years ago

Interesting! I'm not sure that would work for Weather Underground, as that is sorta predefined. However, it would probably work great for a news site! Does this mean the news ticker on the side might be able to pull from multiple sources, besides just the BBC? I like the BBC quite a lot, but some of the British domestic policy means very little to me. It'd be nice to have the ability to have a variety of sources to see news from.

JoshuaKimsey commented 7 years ago

Ok, I have added back my additions I made to the new code you added. For now it is just a rough copy and paste, as I'm sure I wiped out some of your work with the CSS doing what I did. I will go back and hand compare with code can get changed over or not. Until then, this is a working branch with the new code! I love how much easier it is to deal with the config file now! 😃

https://github.com/hsoj95/kitchenTV/tree/Improved-Code-with-Revisions

One bug I found though, when you set the temperature setting, either C or F in the config file, it changes the temperature itself, but fails to update the letter by the temperature. So it will say 75, but have a C by it. All that needs to be changed is how it interacts with the weather plugin file as to insure the letter gets updated. Not knowing PHP well though, you will probably need to do that. 😕

riquezjp commented 7 years ago

The BBC headlines come from the BBC RSS news feed, so it will work for any news site with an RSS feed. (XML news feed) Although it will need modifying (easy) for other sites as i am sure they layout of the feed is different. Perhaps we could have say 4 pre-defined news sites to choose from from various global sources.

riquezjp commented 7 years ago

Your branch seems to be coming along nicely :-) Yes there are some CSS corrections to finish, but otherwise working ok. The digital clock/date needs some CSS work to correctly position it for the right side instead of the left, it was lost off the edge of the screen for me.

The C/F is set in weather.js I didnt move that over to the config file, but will do!

riquezjp commented 7 years ago

ºC/ºF now in config. Alternate news feeds added to config (at bottom) - needs testing over time because odd characters & unexpected content in the feeds can cause the javascipt to fall over.

JoshuaKimsey commented 7 years ago

Awesome! As for the odd characters messing up the JS, I'm not totally surprised by that! From my experience, things like ampersands and quotes can act weirdly in HTML and JS. I guess it all depends on how the code is being implemented.

JoshuaKimsey commented 7 years ago

Lol! I should apologize for how badly broken my part of the fork was since your last update! I didn't realize I had broken the ability to actually even open the streams part of the program until I was working with with part of Materialize! That will be fixed in my next update of my fork! 😁