r/Python • u/Wheeto • Jun 06 '20
I Made This I created a GUI that collates various interests of mine in one handy place
124
u/kapulov Jun 06 '20
Impressive! How did you do it?
211
u/Wheeto Jun 06 '20 edited Jun 07 '20
Created the form in TKinter.
BBC News is from newsapi.org. Weather data comes from openweathermap api. Hard drive info from the module psutil. Pi-hole data from the module pihole.
The Steam data, Threshold news and Pi temp/usage are all from some very time consuming web scraping! :)
4
Jun 07 '20
Looks sexy man. I did some tkinter and actually really liked it once I committed to using it!
As for the webscraping, that’s fricken awesome. I’m super curious how you went about getting the top sellers from steam! I’d love to do that and keep up a “top discounted” section! Think that’s possible? Are you going to share the code? Would be neat but I understand if you don’t.Anyways. Looks great!
→ More replies (1)2
u/Wheeto Jun 07 '20
The Steam web scraping was the most difficult!
I just pull the data from the Steam homepage.. name and price. For the images I had to extract the appid and then I could grab the url with the image.
I'll upload the code to Github asap!
Thanks for the kind words!
104
11
→ More replies (3)5
37
u/runew0lf Jun 06 '20
Would it be possible to share this?? it looks pretty damn awesome!
→ More replies (1)37
u/Wheeto Jun 06 '20 edited Jun 07 '20
Yeah I'll share when I get a free moment! :)
Now on Github: https://github.com/A-Wheeto/Dashboard
→ More replies (6)5
15
u/Alazn02 Jun 06 '20
Are the BBC articles clickable links?
21
u/Wheeto Jun 06 '20
Not yet! That's my next task! I should be able to draw the text on a hidden button that will take you to the bbc article!
17
u/nemom Jun 06 '20
Not to take anything away from what you've done already, because it looks really nice... Did you look into Flask at all? Seems like if would be a good fit since you're pulling in mostly web data. Instead of a desktop app, you'd have a local webpage. You'd already have a browser open for any linked articles. The page and data would all update with a refresh. It could even be set with a simple autorefresh every few minutes while open.
→ More replies (4)3
u/Wheeto Jun 07 '20
That's a great idea, I would like to learn Flask and I'll look at importing it over.
21
u/teatral90 Jun 06 '20
u code it with tkinter or pyqt? i guess its pyqt
27
u/Wheeto Jun 06 '20
All in tkinter!
3
Jun 06 '20
I love tkinter for data acquisition, control, and proecessing. Did you create a default style, or individually tune each widget, frame, etc... for coloring and font?
Really sharp looking project!
6
u/Wheeto Jun 06 '20
I worked on each box one by one and over the few months it took me to create I changed the entire colour scheme a few times! The colours I'm using now are actually a copy of Steam :)
3
u/samuelcbird Jun 07 '20
Do you know a good resource for customising tkinter? I’ve really struggled to find what i’m looking for but your GUI is beautiful!
→ More replies (1)
4
u/0xPure Jun 06 '20
Nice project! How should start a beginner in programming to start making something like that? I've been watching a lot of programming courses but I've never made any program. I feel kinda frustrated because I have knowledge but I don't know how to make simple but useful programs. Online courses never teach that or they just make the typical hello world.
I do use Twitter a lot and I always like to check out what tweets of any subject (not about any specific keyword or hashtag) are the most liked and retweeted in last 7 days. I did try coding a simple console app with Python to get and print those tweets but I haven't managed to do it.
Anyways, I enjoy seeing others having success in programming and making nice projects like this.
8
u/Wheeto Jun 06 '20
I also watched many tutorials and read countless articles but I only really started to get a grip with Python when I just sat down and wrote code. I've been coding a few hours a day for about 6 months now. My code is probably very inefficient and messy but it works! Now I can go back with the new things I learned and refine and improve :)
I'd recommend reading up on API's aswell. The inspiration for this came from looking at what various free API's are out there, and theres a lot!
I'm a complete beginner too, so keep at it! :)
3
u/arsewarts1 Jun 06 '20
Awesome dashboard. I suggest looking into tableau bc they have open code and would really speed up your development.
2
3
u/Nixellion Jun 06 '20
Looks cool, though I suggest looking into making it a web app and maybe hosting it on rpi as well. So you can set it as new tab in your browsers
You can use Python+Flask for it for backend. For frontend you can just render HTML with flask's jinja engine or you can look into frontend frameworks like vue.js, angular, react. I still cant wrap my head around those so all my web frontends are just html+javascript rendered by jinja.
If you're looking for an existing project like that - DashMachine is a nice one :)
1
u/Wheeto Jun 06 '20
Sounds like a great idea! I've looked into Flask a few times its definitely something I'd like to learn :)
→ More replies (1)
3
u/mafatik Jun 06 '20
Wow, I thought I'm only developer and flight simmer
2
u/Wheeto Jun 06 '20
I got into the FS2020 alpha last week! :)
3
2
u/clapifyouretired Jun 06 '20
THIS is what I want to achieve. I'm a beginner and seeing a project like this just makes me want to work harder. Well done. It looks phenomenal.
2
u/Wheeto Jun 06 '20
Thanks so much! I'm really a total beginner with Python but I feel like I'm learning more each day, keep at it :)
9
7
5
Jun 06 '20
That’s honestly a cool idea! Make a dashboard with all your interests in one GUI. I may make one myself!
4
u/22732255fan Jun 06 '20
Very interested in this for another project I have in mind for work. Would love to see more on this as well.
4
4
1
1
u/v4-digg-refugee Jun 07 '20
First of all, I’ve been wanting to build something similar for a while now and this is great inspiration. Definitely gives me more confidence with tkinter. One of my main toggles will be a summary of my own personal finance.
Second, and much more importantly, that sunrise time screams Finland. But maybe I’m just too American to know better.
1
1
1
u/_coopa Jun 07 '20
Did you use grid or pack for your ui layout? I can never seem to get tkinter to look as neat as that when I use it.
1
u/Wheeto Jun 07 '20
I actually used place for everything you see. It's time consuming work but allowed me to draw boxes and align text exactly how I wanted.
→ More replies (1)
1
1
Jun 08 '20
in Tkinter you could create a scrollable window? I developing app for month and this is my biggest pain, to output large number of information
2
u/Wheeto Jun 08 '20
I think you could achieve this in a Canvas, check out this link: https://blog.tecladocode.com/tkinter-scrollable-frames/
1
u/clapifyouretired Jun 12 '20
Hi! A couple of questions from a complete beginner who's in love with your dashboard.
Is there a way to get clickable links? And if so, can you give me a general idea on how to?
Does the news update automatically?
1
u/Wheeto Jun 12 '20
Hi! I've created clickable items in tkinter before, you can create a button and format it to remove the border etc. then display text or an image on it.
For automatic updating you would need to call the root.after function which allows you to draw the form and wait a specific amount of time before it calls another function (which can update text/images). It can be a bit tricky but some Googling will get you the answers you need. :)
6
u/namuan Jun 06 '20
It does look good for a Tkinter app. Although happy with PyQt these days but would be interested in seeing the code behind the app
2
2
2
2
2
2
2
2
2
u/royalscenery Jun 06 '20
Nice job! Out here making Tkinter look young again, that’s close to my heart. Really nice.
2
2
2
2
2
u/maxellus Jun 07 '20
If you'd like to use tkinter very easily, look at the project: PySimpleGui. It simplify greatly the writing of gui in Python via Tkinter.
1
u/MikeTheWatchGuy Jun 09 '20
I'm going to attempt to duplicate this program using PySimpleGUI. It's great to see nicely designed GUIs that show that tkinter isn't the "problem". It's bad design choices that are the biggest problem.
One change I'll be making is to remove the titlebar. I dunno how long it'll take to duplicate this layout with so many other things to do, but it's definitely a GUI layout worth writing in PySimpleGUI.
2
2
1
1
u/FADanShM Jun 06 '20
Nice
2
u/nice-scores Jun 07 '20
𝓷𝓲𝓬𝓮 ☜(゚ヮ゚☜)
Nice Leaderboard
1.
u/spiro29at 9999 nices2.
u/RepliesNiceat 8828 nices3.
u/Manan175at 7099 nices...
247804.
u/FADanShMat 1 niceI AM A BOT | REPLY !IGNORE AND I WILL STOP REPLYING TO YOUR COMMENTS
1
1
1
u/mrFatsTheTerrible Jun 06 '20
Thank you for sharing and showing something like this is possible. I'm beginning to learn Python so I have a ways to go.
1
1
Jun 06 '20
Oh boy! I bet you can't wait to talk about the weather during small talk!
Jesting aside, cool project!
1
1
1
1
1
u/leftieant Jun 07 '20
Top work! I’ve been struggling for motivation to do something similar with a heap of weather feeds that I’d like to automate and follow - this gives me inspiration.
1
u/NoValidTitle Jun 07 '20
This is very inspirational. I didn't know tkinter could do stuff like this. But I'm also a total noob.
1
1
1
1
1
1
1
1
Jun 07 '20
Cool!!! Now get an old tablet and set it up on a wall in your bathroom to always run and update that gui. Then you can always have your favorite updated info when you poop.
1
1
1
1
1
u/Jakob4800 Jun 07 '20
That’s awesome, I’m more curious as to why your e hard drive is lower then the others. And I’m also wondering why you used python? Could the same effect not be done using HTML and css with Iframes?
1
u/gigatransport Jun 07 '20
You should do this but with a python web application framework like Django instead and have it as your start page! Looks nice tho.
1
1
u/CMBR1010 Jun 07 '20
I've been thinking of a similar idea in which I aggregate prioritized information and create my own feed from various sources. The purpose of this idea is too make better use of my time on social media and new platforms as well as avoiding distractions (click-bait, ads, etc.).
I also thought it would be interesting and useful to aggregate information at various scopes/scales. For example, local, city, county, state, national, and global.
Some questions:
- What information is important for any person at each level?
- What percentage of this personalized feed should be allocated for each of the following: news, markets, personal interests, humor, work-related, personal budget, etc.?
- Also, what information is actionable? It's good to be informed, but what information can you actually use on a daily, weekly, monthly, annual basis to make informed meaningful decisions/actions.
1
1
u/Infrared12 Jun 08 '20
Can't believe this was done with tkinter, can anyone tell me the pros/cons of tkinter, kivy and pyqt?
1
1
0
Jun 07 '20
[deleted]
2
u/Wheeto Jun 07 '20
I got obsessed with creating Ortho tiles! I mainly fly in Europe and have most of it covered :)
0
15
u/Wheeto Jun 06 '20
Thanks for all the kind words guys! As a Python novice I'm really happy with such amazing feedback! :)