I will try it myself with the same subdirectories. Lorin Tremblay schrieb am Mittwoch, 11. Oktober 2023 um 22:00:34 UTC+2:
> The image is situatied in the web folder under webcam, since that > previously I had no need to have it elsewhere. > > # Where the generated reports should go, relative to WEEWX_ROOT > > HTML_ROOT = /var/www/html/weewx > > /var/www/html/weewx/webcam/snap.jpg > > > Now there is a snap.png and snap.svg in that folder now > > > *pi@Weewx-APRS3695*:*/var/www/html/weewx/webcam $* ls -la > > total 536 > > drwxrwxrwx 2 root root 4096 Oct 11 15:55 . > > drwxr-xr-x 15 root root 4096 Oct 11 15:55 *..* > > -rw-r--r-- 1 pi pi 492892 Oct 11 15:55 *snap.jpg* > > -rw-r--r-- 1 root root 33150 Oct 11 15:55 *snap.png* > > -rw-r--r-- 1 root root 682 Oct 11 15:55 *snap.svg* > > -rwxrwxrwx 1 root root 482 Oct 11 15:55 *'#Webcam_FTP.last**’* > > > > > The script is located in /etc/weewx/skins/Belchertown/webcam/snap.svg.tmpl > > I’ve also tried with a copy of my image in the folder of the script > (/etc/weewx/skins/Belchertown/webcam/snap.jpg) and nothing change. > > > > > > On 11 Oct 23, at 14:55, Karen K <kk44...@gmail.com> wrote: > > Is the image situated in /var/www/html/.../webcam or in > /etc/weewx/skins/Belchertown/webcam? It should be the former. > > I did not use sub-directories myself. So I am not sure. You could try > href="snap.jpg" instead of href="webcam/snap.jpg". > > Lorin Tremblay schrieb am Mittwoch, 11. Oktober 2023 um 16:02:38 UTC+2: > >> <?xml version="1.0" encoding="UTF-8" standalone="no"?> >> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" " >> http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> >> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="2688" >> height="1512" viewBox="0 0 2688 1512"> >> <style> >> text { >> font-family: Roboto, sans-serif; >> font-weight: 300; >> line-height: 1.625; >> margin: 0; >> font-size: 48px; >> fill: white; >> } >> </style> >> ## webcam image >> <image x="0" y="0" width="2688" height="1512" href="webcam/snap.jpg" /> >> ## readings >> <text x="400" y="570" text-anchor="left">Temp:$current.outTemp - >> Dir:$current.windDir.ordinal_compass - Speed:$current.windSpeed - >> Bar:$current.barometer - Total Rain:$day.rain.sum - $current.pm2_5_aqi >> </text> >> </svg> >> >> >> On 11 Oct 23, at 08:47, Karen K <kk44...@gmail.com> wrote: >> >> Could you show your template file? >> >> Lorin Tremblay schrieb am Montag, 9. Oktober 2023 um 23:04:00 UTC+2: >> >>> Ok now I’m generating a .png with the info in the right position, but >>> the image is not present >>> >>> So now I’m my webcam folder I have to orignal jpg image, a svg and a png >>> with the text and no pictures. >>> >>> I have done everything mentioned >>> >>> >>> >>> - move the template "snap.svg.tmpl" to the "webcam" sub-directory in >>> your skin directory (something like "/etc/weewx/skins/...”).à >>> >>> So now the snap.svg.tmpl is residing in >>> */etc/weewx/skins/Belchertown/webcam* >>> >>> >>> - Change the template line to "template = webcam/snap.svg.tmpl”. >>> >>> Changed that in the skin.conf >>> >>> >>> - Change the file line to "file = webcam/snap". >>> >>> Changed that in the skin.conf >>> >>> >>> >>> >>> - Double check "href="/webcam/snap.jpg"". Are you sure that is >>> situated in the root directory? May be you want to remove the slash at >>> the >>> beginning. >>> >>> And remove the / so now is reads "href="webcam/snap.jpg" >>> >>> So what I’m I missing? >>> >>> >>> On 8 Oct 23, at 14:59, Karen K <kk44...@gmail.com> wrote: >>> >>> There is a path problem. First, use "file" with a relative path, i.e. >>> without "/var/www/html/weewx". Then, according to the template "snap.svg" >>> is situated in the base directory (I guess "/var/www/html/weewx"). But you >>> look for it in the "webcam" sub-directory. >>> >>> So >>> >>> - move the template "snap.svg.tmpl" to the "webcam" sub-directory in >>> your skin directory (something like "/etc/weewx/skins/..."). >>> - Change the template line to "template = webcam/snap.svg.tmpl". >>> - Change the file line to "file = webcam/snap". >>> - Double check "href="/webcam/snap.jpg"". Are you sure that is >>> situated in the root directory? May be you want to remove the slash at >>> the >>> beginning. >>> >>> Lorin Tremblay schrieb am Sonntag, 8. Oktober 2023 um 18:00:27 UTC+2: >>> >>>> Thank was able to install it, now I know I’m close but I’m missing >>>> something. >>>> >>>> Trying to add the info to my webcam with belchertown skins >>>> >>>> Here is my webcam file path. >>>> /var/www/html/weewx/webcam/snap.jpg >>>> >>>> Here is the content of my snap.svg.tmpl >>>> <https://github.com/roe-dl/weewx-svg2png/blob/master/examples/webcam-with-weather-data/webcam.svg.tmpl> >>>> >>>> <?xml version="1.0" encoding="UTF-8" standalone="no"?> >>>> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" " >>>> http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> >>>> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="2688" >>>> height="1512" viewBox="0 0 2688 1512"> >>>> <style> >>>> text { >>>> font-family: Roboto, sans-serif; >>>> font-weight: 300; >>>> line-height: 1.625; >>>> margin: 0; >>>> font-size: 48px; >>>> fill: white; >>>> } >>>> </style> >>>> ## webcam image >>>> <image x="0" y="0" width="2688" height="1512" href="/webcam/snap.jpg" >>>> /> >>>> ## readings >>>> <text x="2400" y="1450" text-anchor="middle">$current.outTemp >>>> $current.windSpeed $current.barometer</text> >>>> </svg> >>>> >>>> >>>> And here is the skin.conf >>>> >>>> [SVGtoPNGGenerator] >>>> [[file1]] >>>> # file name without extension (optional) >>>> file = /var/www/html/weewx/webcam/snap >>>> # image width in pixels (optional) >>>> #width = replace_me >>>> # image height in pixels (optional) >>>> #height = replace_me >>>> >>>> >>>> [[[file1]]] >>>> template = snap.svg.tmpl >>>> >>>> *[Generators]* >>>> generator_list = weewx.cheetahgenerator.CheetahGenerator, >>>> weewx.reportengine.CopyGenerator, >>>> user.belchertown.HighchartsJsonGenerator, >>>> user.svg2png.SVGtoPNGGenerator >>>> >>>> >>>> The .svg is getting created but not the png…. >>>> >>>> Is there something to do with files path? >>>> >>>> >>>> >>>> >>>> On 8 Oct 23, at 01:45, Karen K <kk44...@gmail.com> wrote: >>>> >>>> I uploaded a fix. Please try again. >>>> >>>> You can also copy svg2png.py to /usr/share/weewx/user by hand. >>>> >>>> Lorin Tremblay schrieb am Sonntag, 8. Oktober 2023 um 02:41:03 UTC+2: >>>> >>>>> I'm personally getting this error when I try to install it >>>>> >>>>> >>>>> Request to install '/home/pi/Desktop/weewx-svg2png.zip' >>>>> Extracting from zip archive /home/pi/Desktop/weewx-svg2png.zip >>>>> Traceback (most recent call last): >>>>> File "/usr/share/weewx/wee_extension", line 92, in <module> >>>>> main() >>>>> File "/usr/share/weewx/wee_extension", line 84, in main >>>>> ext.install_extension(options.install) >>>>> File "/usr/share/weewx/weecfg/extension.py", line 130, in >>>>> install_extension >>>>> self.install_from_dir(extension_dir) >>>>> File "/usr/share/weewx/weecfg/extension.py", line 150, in >>>>> install_from_dir >>>>> installer_path, installer = >>>>> weecfg.get_extension_installer(extension_dir) >>>>> File "/usr/share/weewx/weecfg/__init__.py", line 1904, in >>>>> get_extension_installer >>>>> installer = loader() >>>>> File "/var/tmp/weewx-svg2png-master/install.py", line 8, in loader >>>>> File "/var/tmp/weewx-svg2png-master/install.py", line 12, in >>>>> __init__ >>>>> NameError: name 'SNMPInstaller' is not defined >>>>> >>>>> I personally want to add the weather data to snapshot of my webcam… >>>>> >>>>> >>>>> On 7 Oct 23, at 02:47, Karen K <kk44...@gmail.com> wrote: >>>>> >>>>> I added another example. It shows how to put WeeWX weather data onto a >>>>> webcam picture. >>>>> >>>>> Webcam picture with WeeWX weather readings >>>>> <https://github.com/roe-dl/weewx-svg2png/tree/master/examples/webcam-with-weather-data> >>>>> >>>>> Stefan Gliessmann schrieb am Donnerstag, 5. Oktober 2023 um 14:21:44 >>>>> UTC+2: >>>>> >>>>>> Awesome! >>>>>> >>>>>> I will give it a shoot later and let you know :) >>>>>> >>>>>> Thanks in advance for your contributions!!!! >>>>>> >>>>>> On Tuesday, October 3, 2023 at 4:15:11 PM UTC+2 Karen K wrote: >>>>>> >>>>>>> If there is a link in a social media post, sites like Twitter (X), >>>>>>> Mastodon and others show a preview image or thumbnail of the linked >>>>>>> page. >>>>>>> For a long time I wondered how to define that image. Then I found out >>>>>>> they >>>>>>> look for special "meta" statements within the page header. I included >>>>>>> such >>>>>>> statements in my weather website, and indeed, the respective images >>>>>>> were >>>>>>> displayed. >>>>>>> >>>>>>> I used a screenshot for that purpose. But the screenshot said 3,8°C, >>>>>>> and it's summer time and temperatures are much higher. And I wondered >>>>>>> how >>>>>>> to get actual data into that screenshot. So I thought I could create an >>>>>>> SVG >>>>>>> file using the CheetahGenerator functionality of WeeWX, and convert it >>>>>>> to >>>>>>> PNG afterwards. I found the CairoSVG package to do the converting job. >>>>>>> >>>>>>> But how to do the conversion after WeeWX created the SVG file, but >>>>>>> before WeeWX sends the data to the web server? >>>>>>> >>>>>>> The answer is to write a generator for use in skins. And that's it: >>>>>>> weewx-svg2png <https://github.com/roe-dl/weewx-svg2png> >>>>>>> >>>>>>> Now I look what is happening, and meanwhile I publish the generator >>>>>>> here. >>>>>>> >>>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "weewx-user" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to weewx-user+...@googlegroups.com. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/weewx-user/a4dfa6cd-44ca-4803-8f16-b0dcfd4f645dn%40googlegroups.com >>>>> >>>>> <https://groups.google.com/d/msgid/weewx-user/a4dfa6cd-44ca-4803-8f16-b0dcfd4f645dn%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>>> >>>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "weewx-user" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to weewx-user+...@googlegroups.com. >>>> >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/weewx-user/40aa1301-9c54-4210-a9c1-5d21f46a9cf0n%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/weewx-user/40aa1301-9c54-4210-a9c1-5d21f46a9cf0n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>>> >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "weewx-user" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to weewx-user+...@googlegroups.com. >>> >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/weewx-user/6bd6d023-6863-4d3e-8cdb-24876cd22f58n%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/weewx-user/6bd6d023-6863-4d3e-8cdb-24876cd22f58n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >>> >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "weewx-user" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to weewx-user+...@googlegroups.com. >> >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/weewx-user/4b2ccbfa-4a9f-49f0-ae24-b932a3ac7dc0n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/weewx-user/4b2ccbfa-4a9f-49f0-ae24-b932a3ac7dc0n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> >> > -- > You received this message because you are subscribed to the Google Groups > "weewx-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to weewx-user+...@googlegroups.com. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/53500b69-c8e1-48d0-aa3e-d7a535dbabcdn%40googlegroups.com > > <https://groups.google.com/d/msgid/weewx-user/53500b69-c8e1-48d0-aa3e-d7a535dbabcdn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/91bed633-ee1d-441a-880e-6119023b71d6n%40googlegroups.com.