Read the statement by Michael Teeuw here.
SampleCode for Module to read a specific Information from a webpage
-
@newbi we will help you if you get stuck making it work, but wont write it for you
-
@sdetweil, ok, thanks so far, i will try to get firm with the basics.
As i am working on my Windows Laptop, having a MagicMirror on a Raspy 3, can i develope on my Laptop or do i need to create a developement environment on my raspy (or on my Windows Laptop)? -
@newbi
If you want to display how crowded yor gym is, use HTML Snippet or SmartWebDisplay. Cheerio is more for static pages useful. If yor gym does not block iframes thi is the easiest way imho. -
@newbi MagicMirror runs on windows
need to follow the install instructions
need nodejs (20.18.1, or 22 up)
gitthere is a separate start script for windows
npm run start:windows
-
@newbi asked
can i develope on my Laptop or do i need to create a developement environment on my raspy
Dear @newbi ,
neither, nor :-)
You can “develop” physically on your laptop but the files (should) remain on the Raspi.
On the Raspi therefore you do not need a “development” environment.
You need a FTP Browser - connect this one via SFTP to the Raspi (SSH should be enabled on the Raspi - then SFTP works inherently).Than you click right on the remote (Raspi) File(s) you need to modify and open the file(s) with a (Laptop) local editor of your choice.
When changes are done, save the file and restart the mirror - then you see the changes.At least this is the way as I do those things - currently NOT programming but changing custom.css and config.js.
I am on a Windows laptop in most cases and I use BitVize for FTP and SSH and Sublime as Editor (which is for “programmers” because several “languages” are marked up nicely).
For a quick view on the result I use VNC-Viewer which gives me a better view because I have my display in portrait format which isn’t displayed nicely in Webbrowser).HTH
Regards,
Ralf -
@chrisfr1976 thanks for giving me the two modules :)
The first one seems to be promising. But I struggle to get the page been shown.
Is it possible to show a page?
And is it possible just to show the content ofwith a class name thats locatet somehere on the page?
If not, i will stopp my effords and enjoy what i got so far, but it would be nice to get this information on the screen.@rkorell, well newbi to programming or confuguring a mirror. Not now to programming at all, but i do it in a completele different environment (more old school).
I do nothing with webpages, nopthing with javascript, no libraries.
My Configuration does work well, i do it wie ssh. not the best way, but the result is good. -
@newbi if you use the iframe approach it is complete page only
thst didnt sound like what you wanted. as mentioned if you install one of the windows tools, you will get ssh window to pi, AND a windows file manager that adds drag/drop and double click to edit
i use notepad++ on windows as my editor, or sometimes visual studio
you can slso use a browser on windows to view the page, and debug the browser side of the module
-
@newbi actually I now remember a new module
-
no, an iframe is not exactly waht i wanted, but better than nothing. I struggle a bit to get the iframe to the correct position. Well if i can manage to scroll to the desired position, it would be helpfull, but i did not made it.
@sdetweil , i will chekc the module thanks. It is so much to find out, to test, a big cosmos on its own :) -
@newbi yes, LOTS of info
i think scrapey will do what you want