editing allsky image before being sent by ftp to webserver #1656
-
Hello, I am trying to edit the allsky image with some weather information from Cloud Watcher before it is uploaded via ftp to the webserver. If I work locally I just have to edit /var/www/html/allsky/config.js imageName: "/allsky/image.jpg" so it does not go to current/tmp to fetch it. Then my python script fetches the image from current/tmp, edits it and saves it in /var/www/htmal/allsky/image.jpg But I cannot find the way to do it when my server is remote and images are uploaded to it via ftp. Is there a way to change the source directory for the ftp upload, so my script instead of the allsky software, places the image in that directory? Thanks in advance for your help!! Jose |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
@jsanchez73 Jose, so you want the saved images in ~/allsky/images/DATE to have the weather information in them, or just the images displayed on the local and/or remote web servers? |
Beta Was this translation helpful? Give feedback.
-
Hello Eric, Thanks a lot for your answer. Just the images displayed in the local and/or remote web servers. The information is both text and images (I add a compass and tables with various numerical information and icons). So I would like to modify the images in /home/pi/allsky/tmp before they are ftped to the web server. What I do now in the case of local server is to point the config.js to /var/www/html/allsky/image.jpg, I take the image in tmp, modify it , and save it in /var..../allsky. In the case of remote, the way I do it is to modify the saveImage.sh and force FILE_TO_UPLOAD="/home/pi/allsky/tmp/image1.jpg" before it calls upload.sh. Then I can take the image in tmp, modify it, and save it as image1.jpg in the same directory. It works but seems a little rough. Any though on how to better take advantage of the current Allsky functionality to do this or how to make my solution tidier would be appreciated. One thought I had was to include in ftp-setting.sh and ALTERNATIVE_FILE_TO_UPLOAD entry and modify saveImage.sh so I don`t have to hard code the modified image path. Thanks for your help, Jose |
Beta Was this translation helpful? Give feedback.
-
@jsanchez73, Jose, I think the next version of Allsky will greatly help with this. You'll be able to execute "modules" when saving an image. You'd want to execute the "save image to the ~/allsky/images/DATE" folder, then execute the "add text and images to an image", then "save image to ~/allsky/tmp/image.jpg". @Alex-developer. Alex, correct me if I'm wrong... |
Beta Was this translation helpful? Give feedback.
-
@EricClaeys The modules system will help with this. If the weather data is written to the extra data directory in a file then the overlay editor will allow it to be added to the image, like the Open Weather Map data is in this image. In the overlay editor you can also add the compass image if needed This will of course mean the data is included in the startrails/keograms/timelapses. If you didn't want this then the other option is to use the 'Save intermediate image' module to save a clean copy of the image to another folder and generate the startrails etc from those images |
Beta Was this translation helpful? Give feedback.
-
@EricClaeys @Alex-developer that sounds great. It will simplify what I am doing. Thanks a lot for your help |
Beta Was this translation helpful? Give feedback.
@jsanchez73, Jose, I think the next version of Allsky will greatly help with this. You'll be able to execute "modules" when saving an image. You'd want to execute the "save image to the ~/allsky/images/DATE" folder, then execute the "add text and images to an image", then "save image to ~/allsky/tmp/image.jpg".
@Alex-developer. Alex, correct me if I'm wrong...